cURL / Mailing Lists / curl-users / Single Mail

curl-users

cURL and Limesurvey

From: lakk_esbjrn <lakk_esbjrn_at_yahoo.fr>
Date: Mon, 24 Aug 2009 07:12:45 +0200

Hi everybody,

I would like to fill the fields of this short survey
http://www.genproc.com/limesurvey/index.php?sid=12148&lang=fr using
win32 cURL.Exe
I used two ways (one choice per question, to start slowly) :
/
curl -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.2)
Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)" -e
"http://www.genproc.com" -c "cookielime.txt"
"http://www.genproc.com/limesurvey/index.php?sid=12148&lang=fr"

curl -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.2)
Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)" -b "cookielime.txt"
-e "http://www.genproc.com/limesurvey/index.php" -F 12148X6X8XP=Y -F
C12148X6X8VISTA= -F C12148X6X8SEVEN= -F 7C12148X6X8AUTRE= -F
7C12148X6X5IE=Y -F 7C12148X6X5firf= -F 7C12148X6X5saf= -F 7C12148X6X5gc=
-F 7C12148X6X5op= -F 7C12148X6X5autre= -F 7C12148X6X6Rusto= -F
7C12148X6X6Bagle= -F 7C12148X6X6Haxfi= -F 7C12148X6X6WareO= -F
7C12148X6X6Lop= -F 7C12148X6X6Navip= -F 7C12148X6X6WinSo= -F
7C12148X6X6Toolb= -F 7C12148X6X6Vundo= -F 7C12148X6X6Smitf= -F
7C12148X6X6SDfix= -F 7C12148X6X6WebHa= -F 7C12148X6X6GAIN= -F
7C12148X6X6NdotN= -F 7C12148X6X6Purit= -F 7C12148X6X6Look2= -F
7C12148%SNfi= -F 7C12148X6X6USBFi= -F 7C12148X6X6Yoog= -F
7C12148X6X6MBR= -F 7C12148X6X6TDSS= -F 7C12148X6X71= -F 7C12148X6X72= -F
7C12148X6X73= -F 7C12148X6X74= -F 7C12148X6X75= -F 7C12148X6X76= -F
7C12148X6X77= -F 7C12148X6X78= -F 7C12148X6X79= -F 7C12148X6X7PLD10= -F
MULTI12148X6X8=4= -F 12148X6X8XP=Y -F java12148X6X8XP=Y -F
java12148X6X8VISTA= -F java12148X6X8SEVEN= -F java12148X6X8AUTRE= -F
display12148X6X8=on= -F MULTI12148X6X5=6= -F java12148X6X5IE= -F
12148X6X5firf=Y -F java12148X6X5firf=Y -F java12148X6X5saf= -F
java12148X6X5gc= -F java12148X6X5op= -F java12148X6X5autre= -F
display12148X6X5=on= -F MULTI12148X6X6=21 -F java12148X6X6Rusto= -F
java12148X6X6Bagle= -F 12148X6X6Haxfi=Y -F java12148X6X6Haxfi=Y -F
12148X6X6WareO=Y -F java12148X6X6WareO=Y -F java12148X6X6Lop= -F
java12148X6X6Navip= -F java12148X6X6WinSo= -F java12148X6X6Toolb= -F
java12148X6X6Vundo= -F java12148X6X6Smitf= -F 12148X6X6SDfix=Y -F
java12148X6X6SDfix=Y -F java12148X6X6WebHa= -F java12148X6X6GAIN= -F
java12148X6X6NdotN= -F java12148X6X6Purit= -F java12148X6X6Look2= -F
java12148X6X6MSNfi= -F java12148X6X6USBFi= -F java12148X6X6Yoog= -F
java12148X6X6MBR= -F java12148X6X6TDSS= -F display12148X6X6=on -F
MULTI12148X6X7=10 -F java12148X6X71= -F java12148X6X72= -F
java12148X6X73= -F java12148X6X74= -F java12148X6X75= -F java12148X6X76=
-F 12148X6X77=Y -F java12148X6X78= -F java12148X6X79= -F
java12148X6X7PLD10= -F display12148X6X7=on -F move=movesubmit -F
move2=+Envoyer+ -F thisstep=1 -F sid=12148 -F token=
"http://www.genproc.com/limesurvey/index.php?sid=12148&lang=fr" > xu.html

/which give a strange error in the DOS window
/
>curl -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1
.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)" -b
"cookielime.txt" -e "http://www.genproc.com/limesurvey/index.php" -F
12148X6X8XP=Y -F C12148X6X8VISTA= -F C12148X6X8SEVEN= -F
7C12148X6X8AUTRE= -F 7C12148X6X5IE=Y -F 7C12148X6X5firf= -F
7C12148X6X5saf= -F 7C12148X6X5gc= -F 7C12148X6X5op= -F
7C12148X6X5autre= -F 7C12148X6X6Rusto= -F 7C12148X6X6Bagle= -F
7C12148X6X6Haxfi= -F 7C12148X6X6WareO= -F 7C12148X6X6Lop= -F
7C12148X6X6Navip= -F 7C12148X6X6WinSo= -F 7C12148X6X6Toolb= -F
7C12148X6X6Vundo= -F 7C12148X6X6Smitf= -F 7C12148X6X6SDfix= -F
7C12148X6X6WebHa= -F 7C12148X6X6GAIN= -F 7C12148X6X6NdotN= -F
7C12148X6X6Purit= -F 7C12148X6X6Look2= -F
7C12148//www.genproc.com/limesurvey/index.php"
> xu.html
*Illegally formatted input field!
curl: option -F: is badly used here
curl: try 'curl --help' or 'curl --manual' for more information*

/Second way, using -d option :

/curl -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.2)
Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)" -e
"http://www.genproc.com" -c "cookielime.txt"
"http://www.genproc.com/limesurvey/index.php?sid=12148&lang=fr"

curl -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.2)
Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)" -b "cookielime.txt"
-e "http://www.genproc.com/limesurvey/index.php" -d
"12148X6X8XP=Y%7C12148X6X8VISTA%7C12148X6X8SEVEN%7C12148X6X8AUTRE%7C12148X6X5IE=Y%7C12148X6X5firf%7C12148X6X5saf%7C12148X6X5gc%7C12148X6X5op%7C12148X6X5autre%7C12148X6X6Rusto%7C12148X6X6Bagle%7C12148X6X6Haxfi%7C12148X6X6WareO%7C12148X6X6Lop%7C12148X6X6Navip%7C12148X6X6WinSo%7C12148X6X6Toolb%7C12148X6X6Vundo%7C12148X6X6Smitf%7C12148X6X6SDfix%7C12148X6X6WebHa%7C12148X6X6GAIN%7C12148X6X6NdotN%7C12148X6X6Purit%7C12148X6X6Look2%7C12148X6X6MSNfi%7C12148X6X6USBFi%7C12148X6X6Yoog%7C12148X6X6MBR%7C12148X6X6TDSS%7C12148X6X71%7C12148X6X72%7C12148X6X73%7C12148X6X74%7C12148X6X75%7C12148X6X76%7C12148X6X77%7C12148X6X78%7C12148X6X79%7C12148X6X7PLD10&MULTI12148X6X8=4&12148X6X8XP=Y&java12148X6X8XP=Y&java12148X6X8VISTA=&java12148X6X8SEVEN=&java12148X6X8AUTRE=&display12148X6X8=on&MULTI12148X6X5=6&java12148X6X5IE=&12148X6X5firf=Y&java12148X6X5firf=Y&java12148X6X5saf=&java12148X6X5gc=&java12148X6X5op=&java12148X6X5autre=&display12148
X6X5=on&MULTI12148X6X6=21&java12148X6X6Rusto=&java12148X6X6Bagle=&12148X6X6Haxfi=Y&java12148X6X6Haxfi=Y&12148X6X6WareO=Y&java12148X6X6WareO=Y&java12148X6X6Lop=&java12148X6X6Navip=&java12148X6X6WinSo=&java12148X6X6Toolb=&java12148X6X6Vundo=&java12148X6X6Smitf=&12148X6X6SDfix=Y&java12148X6X6SDfix=Y&java12148X6X6WebHa=&java12148X6X6GAIN=&java12148X6X6NdotN=&java12148X6X6Purit=&java12148X6X6Look2=&java12148X6X6MSNfi=&java12148X6X6USBFi=&java12148X6X6Yoog=&java12148X6X6MBR=&java12148X6X6TDSS=&display12148X6X6=on&MULTI12148X6X7=10&java12148X6X71=&java12148X6X72=&java12148X6X73=&java12148X6X74=&java12148X6X75=&java12148X6X76=&12148X6X77=Y&java12148X6X77=Y&java12148X6X78=&java12148X6X79=&java12148X6X7PLD10=&display12148X6X7=on&move=movesubmit&move2=+Envoyer+&thisstep=1&sid=12148&token="
"http://www.genproc.com/limesurvey/index.php?sid=12148&lang=fr" > xu.html
/
The webpage xu.html is well downloaded, but it contains an error :
/
*Warning*: Missing argument 1 for submitfailed(), called in
/home/genproc/public_html/limesurvey/save.php on line 432 and defined in
*/home/genproc/public_html/limesurvey/index.php* on line *1598
*/The admin has received the report of this error just saying that there
is an SQL Error./*

*/Could you tell me what's wrong with my code, and what could be the
best option (-d or -F) to correctly fill this survey ?

Thank you/
/

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-08-24