cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Sending password and username

From: <salexandre.bm_at_gmail.com>
Date: Tue, 3 May 2011 22:32:26 +0100

Le 3 mai 2011 à 22:11, darekg11 <darekg11_at_tlen.pl> a écrit :

>
>
>
> Dnia 3 maja 2011 21:03 Iskander Ben mahmoud <salexandre.bm_at_gmail.com> napisał(a):
>
>
> you can use the option : CURLOPT_POSTFIELDS and post le user name and the password, ( suppose that the post url is : connect.php?usr=XXXX&pass=XXXX ) if you are using firefox you can get $_POST var with "data tamper" add-on
>
> 2011/5/3 Alan Wolfe <alan.wolfe_at_gmail.com>
> Essentially you have to look at how the site itself sends the username
> and password in the http request, and then mimic that http request
> with libcurl.
>
> libcurl does HTTP but it doesn't parse html or fill out web forms.
>
> On Tue, May 3, 2011 at 10:49 AM, darekg11 <darekg11_at_tlen.pl> wrote:
> > Hi, how can I send password and username to the server? There is one site with login page with 2 boxes: username and password. How can I send information there and receive anwser from server?
> >
> > -------------------------------------------------------------------
> > List admin: http://cool.haxx.se/list/listinfo/curl-library
> > Etiquette: http://curl.haxx.se/mail/etiquette.html
> >
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
>
>
> --
> Skander Ben Mahmoud
> Administrateur et Créateur de Pro-Programming.net.
> -------------------------------------------------------------------List admin: http://cool.haxx.se/list/listinfo/curl-libraryEtiquette: http://curl.haxx.se/mail/etiquette.html
>
>
> I used add-on and got:
> POSTDATA=login=eqeae&passwd=adadad
>
> So in libcurl I send login=xxx&passwd=xxx ?
>
>
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

Yes, if you are coding in C:

char *data="login=xxx&passwd=xxx";

... some code ...
curl_esay_setopt(handle,CURLOPT_POSTFIELDS,data);
...

Skander Ben Mahmoud
Créateur et Administrateur de Pro-programming.net

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-03