Login webpage using wget

0

I have problems with logging in to this webpage using wget:

http://dealers.volare-kinderfietsen.nl/index.php?dispatch=auth.login_form

Normally this is no problem for me. I just want to store the cookies when I login to this page. I use:

wget --save-cookies cookies.txt --keep-session-cookies --post-data="user_login=myloginname&password=mypassword" "http://dealers.volare-kinderfietsen.nl/index.php?dispatch=auth.login_form"

But for some reason it does`nt let me login to this form. I googled some and this page is a cs cart webshop system... maybe anyone has some information about this?

Thanks in advance

Peter

Posted 2013-05-29T14:52:35.230

Reputation: 1

Answers

1

I'm not really familiar with CS-Cart, but in examining the HTML of the linked page, I note the following two hidden fields in the form:

<input type="hidden" name="form_name" value="main_login_form" />
<input type="hidden" name="return_url" value="index.php?dispatch=auth.login_form" />

Without creating an account on the site, I can't be certain, but considering that the form tag's target is /, it seems likely that you'll need to include at least the form_name field's value, if not both of them, in your POST in order for CS-Cart to know what to do with the form data.

Aaron Miller

Posted 2013-05-29T14:52:35.230

Reputation: 8 849

Thanks Aaron; Ok I changed the query to:

wget --save-cookies cookies.txt --keep-session-cookies --post-data="form_name=main_login_form&return_url=index.php?dispatch=auth.login_form&user_login=mylogin&password=mypass" "http://dealers.volare-kinderfietsen.nl/index.php?dispatch=auth.login_form"

but no luck.... does it matter that i have a question mark in the value for return_url?

– Peter – 2013-05-29T17:46:14.397

It shouldn't matter, no. You may wish to use Firebug's net panel, or Wireshark or an equivalent packet analysis tool, to see exactly what's going over the wire in the POST request made from the actual page; perhaps there's some Javascript munging the form data before it's sent to the server, in which case you'll need to replicate its effect in your own requests in order to get back a login cookie. – Aaron Miller – 2013-05-29T17:49:39.843

mmmm lo luck.. in firebug I only have thes post items:

dispatch[auth.login] Inloggen form_name main_login_form password ******* return_url index.php?dispatch=auth.login_form user_login *********

I tried adding all these paramaters ... No Luck and No javascript :( – Peter – 2013-05-29T18:11:08.893