cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Post login information

From: Fredrik Gustafsson <iveqy_at_iveqy.com>
Date: Wed, 31 Jan 2007 19:05:08 +0100

Oh, very nice idéa. I've been thinking about doing something likely for
a while. I would appriciate if you whant to post the code when finish.

Anyway, that post string seams very complicated. Maybe it helds a random
code, generated by javascript?

If I was you I should trie to use the website with javascript turned
off, is it possible (this test could require dillo as a webbrowser,
sometimes).

Do a login with javascript and live http headers and save the post just
like you already did.

Clean your browser cache and cookies.

Do a login with...

Are the posts identical? If they are not, you probably found the
problem.

regards
iveqy

On Wed, Jan 31, 2007 at 06:28:20PM +0100, Giuseppe Calà wrote:
> Hi to everyone,
> this is my first post in this mailinglist since i'm new using libcurl. I
> use this library above all creating little programs to send sms thanks to
> the several internet web services. Until now! I discovered this site:
>
> http://www.jajah.com/login.aspx
>
> after the subscription, 10 sms are available.
>
> To grab some info for the login form I use the firefox extension "Live
> HTTP Headers" and then i customize the program to handle the form. But i
> have errors.
>
> This is the section code (i use QT for the gui):
>
> [CODE]
> CURL *easyHandle;
> curl_global_init(CURL_GLOBAL_ALL );
> easyHandle = curl_easy_init();
> string data =
> "__LASTFOCUS=&__EVENTTARGET=ctl00%24ContentBox1%24LoginButton&__EVENTARGUMENT=&__VIEWSTATE=%2FwEPDwUJLTk1NjgyMzQzD2QWAmYPZBYCAgUPZBYCAgMPZBYCZg9kFgJmDxYCHglpbm5lcmh0bWwFFjxiPkFjY2VkaSAoTG9naW4pIDwvYj5kGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBSBjdGwwMCRDb250ZW50Qm94MSRQZXJtYW5lbnRMb2dpbg%3D%3D&ctl00%24ContentBox1%24Email="
> + lineEdit2->text() + "&ctl00%24ContentBox1%24Pwd=" + lineEdit3->text();
> curl_easy_setopt(easyHandle, CURLOPT_POSTFIELDS, data.c_str());
> curl_easy_setopt(easyHandle, CURLOPT_VERBOSE, 1);
> curl_easy_setopt(easyHandle, CURLOPT_URL, "http://www.jajah.com/login.aspx
> ");
> curl_easy_perform(easyHandle);
> curl_easy_cleanup(easyHandle);
> curl_global_cleanup();
> [/CODE]
>
> lineEdit2 store the email
> lineEdit1 store the password
>
> Since informations inserted during subscription are fake the data for the
> login, hoping that someone can help me, are:
> email: swoomanoln_at_kriocoudek.mailexpire.com
> password: 123qwe
>
> Looking at the web page source i can see several javascript code: is,
> perhaps, this the problem?
>
> Hoping that someone can help me, thanks in advance
> Giuseppe
Received on 2007-01-31