cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: login does not pass through the POST request

From: Pourriels <pourriels.xfm_at_gmail.com>
Date: Thu, 14 Jul 2011 18:33:58 +0800

Using Firebug, and investigating the source code, I could find only the 3
POST parameters (login, password, Button_DoLogin)

I try now to use the Tamper plugin for Firefox, and I have indeed 4 POST
parameters instead of 3:

login=mylogin
password=mypassword
Button_DoLogin.x=33
Button_DoLogin.y=6

And the last values for Button_DoLogin.x and Button_DoLogin.y are always
different. (Maybe some coordinates?)

Anyway.

I tried to use curl again using

*curl.exe --data
'login=mylogin&password=mypassword&Button_DoLogin.x=33&Button_DoLogin.y=6'
www.centralgreen.com.sg/login.php?ccsForm=Login*

But the login apparently still doesn't go through (the output is the form,
filled with only the password, and an error message The value in field
Username is required.)

Here is the full list of info I get from Tamper

*Host* centralgreen.com.sg
*User-Agent* Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0
*Accept* text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
*Accept Language* en-us,en;q=0.5
*Accept Encoding* gzip, deflate
*Accept Charset* ISO-8859-1,utf-8;q=0.7,*;q=0.7
*Keep Alive *115
*Connection* keep-alive
*Referer* http://centralgreen.com.sg/login.php
*Cookie* PHPSESSID=65fbxxxxxxx02694e3a72xxxxxxxx;
Valley_ParkLogin=04E203A459FCxxxxxxxA2DCD9AAE5B9678G08C04F1952155E2482xxxxxxxxxxxxx

1/ do I need to enable the cookies if I just want to login once and that's
it (I understand that I will need it anyway if I want to proceed to other
pages)
2/ How to follow redirects and how do I know if I need it?

Thank you

Xavier

On Thu, Jul 14, 2011 at 5:52 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Thu, 14 Jul 2011, Pourriels wrote:
>
> *curl.exe --data "login=mylogin&password=**mypassword&Button_DoLogin=**
>> Login"
>>
>> www.centralgreen.com.sg/login.**php?ccsForm=Login*<http://www.centralgreen.com.sg/login.php?ccsForm=Login*>
>>
>
> As you can see in the result of the page, the password is passed in the
>> form, but not the login. Could it be possible than the ccs script at the
>> beginning modifies something?
>>
>
> Use firebug or livehttpheaders etc to see what your browser actually sends
> in this case.
>
> Also, you may need to follow redirects and enable cookies.
>
> --
>
> / daniel.haxx.se
> ------------------------------**------------------------------**-------
> List admin: http://cool.haxx.se/list/**listinfo/curl-users<http://cool.haxx.se/list/listinfo/curl-users>
> FAQ: http://curl.haxx.se/docs/faq.**html<http://curl.haxx.se/docs/faq.html>
> Etiquette: http://curl.haxx.se/mail/**etiquette.html<http://curl.haxx.se/mail/etiquette.html>
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-07-14