cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: help with form fill

From: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Wed, 26 Mar 2008 11:20:32 +0100

Pullus Cuetlachtli wrote:
> curl -A "Mozilla/5.0" -b cookies.txt -c newcookies.txt -k -u
> admin:password -F policy=@xxxx.img
> https://123.123.123.123:981/Firmware_update.html

To begin with, you are posting to the wrong URL. You need to use the URL
specified in the form action attribute, in this case
"/90?swsessioncookie=T2WVUW2-DsgX5eJ-uJ7LuE".

curl -A "Mozilla/5.0" -b cookies.txt -c newcookies.txt -k -u
admin:password -F "policy=@xxxx.img"
"https://123.123.123.123:981/90?swsessioncookie=T2WVUW2-DsgX5eJ-uJ7LuE"

I guess your script has to extract the correct URL, as I suspect the
swsessioncookie would be different each time.

Linus
Received on 2008-03-26