cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Problem with submits

From: Ralph Mitchell <rmitchell_at_eds.com>
Date: Mon, 11 Mar 2002 23:50:54 -0600

I'd agree with this - my own approach is to grab the login page and save it to a file, then edit out all the recognisable html until I'm left with just <form> elements. I make sure I return every single rotten thing, including the submit button value.

Also, remember to escape any returned values that have spaces (or other special characters) in them - e.g. if the "submit" button has a value of "Login Now", send back "Login%20Now". It might work with an actual space, but then again, it might not.

Have you displayed the returned page in a browser ? It might have some helpful hints...

Ralph

"Roth, Kevin P." wrote:

> To be certain, you'd have to hook up a tool that could monitor exactly what your browser sends, and try to mimic that. Unfortunately, this is never very easy with SSL. One thought would be to save the source code from the page in your browser, edit it to post to your own web server (or any web server that's non-SSL), and then use a network monitor such as ethereal.
>
> My initial guess (knowing nothing else here) is that you need to pass up the name and value of the "submit" button. Your browser would normally do this, and perhaps the web site is looking for that.
>
> --Kevin
>
> -----Original Message-----
> From: Brett King [mailto:Fleabagdj_at_btopenworld.com]
> Sent: Monday, March 11, 2002 10:39 AM
>
> I am working with curl version 7.6. I am trying to carry out a HTTP POST of data to a site using SSL.
>
> The page is a logon page and I supply the password and username using the -d 'Username'='Username' -d 'Password'='password'. I have enabled cookies using the -b and -D option to read and write them. I have a referer using -e.
>
> When the command is issued I get the same page returned with my both the username and password populated.
>
> There is nothing in the Javascript returned in the HTML result to denote that the page would then be resubmitted by the browser and no indication of error.
>
> Does anyone have any suggestion as I am past my knowlegde.
Received on 2002-03-12