User Tools

Site Tools


informatica:linux:curl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
informatica:linux:curl [2020/05/29 16:44] joseinformatica:linux:curl [2020/05/29 16:47] (current) – removed jose
Line 1: Line 1:
-====== Post con curl ====== 
-Instalamos la extensión "HTTP header live" 
  
-http://localhost:8000/mw-config/index.php 
- 
-Pulsamos continue y nos fijamos en los POST de http headers: 
- 
-{{:informatica:linux:post01.png|}} 
- 
-Si hacemos click lo abre en otra ventana: 
- 
-{{:informatica:linux:post02.png|}} 
- 
- 
-Para simularlo, primero vamos a la primera web y guardamos la cookie 
- 
-<code> 
-curl -A "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0" \ 
-     -c cookie1 \ 
-     -D header1 \ 
-     -o page1.html \ 
-     -L "http://localhost:8000/mw-config/index.php" 
-</code> 
- 
-<code> 
-curl -A "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0" \ 
-     -b cookie1 \ 
-     -c cookie2 \ 
-     -D header2 \ 
-     -o page2.html \ 
-     -X POST \ 
-     -d "LanguageRequestTime=1590767092&uselang=en&ContLang=en&submit-continue=Continue" \ 
-     -e "http://localhost:8000/mw-config/index.php" \ 
-     -L "http://localhost:8000/mw-config/index.php?page=Welcome" 
-</code> 
- 
-<code> 
-curl -A "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0" \ 
-     -b cookie2 \ 
-     -c cookie3 \ 
-     -D header3 \ 
-     -o page3.html \ 
-     -X POST \ 
-     -d "submit-continue=Continue" \ 
-     -e "http://localhost:8000/mw-config/index.php?page=Welcome" \ 
-     -L "http://localhost:8000/mw-config/index.php?page=Language" 
-</code> 
- 
- 
-POST:  
-  DBType=mysql&mysql_wgDBserver=app-db&mysql_wgDBname=my_wiki&mysql_wgDBprefix=prueba&mysql__InstallUser=root&mysql__InstallPassword=wiki&sqlite_wgSQLiteDataDir=/var/www/data&sqlite_wgDBname=my_wiki&submit-continue=Continue → 
- 
-<code> 
-curl -A "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0" \ 
-     -b cookie3 \ 
-     -c cookie4 \ 
-     -D header4 \ 
-     -o page4.html \ 
-     -d "DBType=mysql&mysql_wgDBserver=app-db&mysql_wgDBname=my_wiki&mysql_wgDBprefix=prueba&mysql__InstallUser=root&mysql__InstallPassword=wiki&sqlite_wgSQLiteDataDir=/var/www/data&sqlite_wgDBname=my_wiki&submit-continue=Continue" \ 
-     -e "http://localhost:8000/mw-config/index.php?page=DBConnect" \ 
-     -L "http://localhost:8000/mw-config/index.php?page=DBConnect" 
-</code> 
- 
-POST: 
-  mysql__SameAccount=1&mysql_wgDBuser=wikiuser&mysql_wgDBpassword=&submit-continue=Continue 
- 
-<code> 
-curl -A "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0" \ 
-     -b cookie4 \ 
-     -c cookie5 \ 
-     -D header5 \ 
-     -o page5.html \ 
-     -d "mysql__SameAccount=1&mysql_wgDBuser=wikiuser&mysql_wgDBpassword=&submit-continue=Continue" \ 
-     -e "http://localhost:8000/mw-config/index.php?page=DBSettings" \ 
-     -L "http://localhost:8000/mw-config/index.php?page=DBSettings" 
-</code> 
informatica/linux/curl.1590770652.txt.gz · Last modified: 2020/05/29 16:44 by jose