cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: help with form fill

From: Pullus Cuetlachtli <pullusum_at_gmail.com>
Date: Wed, 26 Mar 2008 14:05:03 +0200

Yeah, you're absolutely right. This "swsessioncookie" string is same
as in "Cookie: session=" header. Is there a way to use it in the URL?
when I use the old one, I get "session timeout" from server. Maybe to
save the cookie and then immediately send it with curl?
Thanks!

On Wed, Mar 26, 2008 at 12:20 PM, Linus Nielsen Feltzing <linus_at_haxx.se> wrote:
> 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