cURL / Mailing Lists / curl-users / Single Mail

curl-users

Authenticating via https form

From: Mark Eyman <meyman_at_higherone.com>
Date: Fri, 11 Feb 2005 16:14:15 -0500

I'm using
$ curl -V
curl 7.11.1 (i686-pc-cygwin) libcurl/7.11.1 OpenSSL/0.9.7e zlib/1.2.2
Protocols: ftp gopher telnet dict ldap http file https ftps
Features: SSL libz NTLM Largefile

I'm trying to authenticate to a URL that contains a form:

curl -i https://www.theurl.com/condev/uld.asp

HTTP/1.1 200 OK
Date: Fri, 11 Feb 2005 19:41:56 GMT
Content-Length: 1167
Content-Type: text/html
Set-Cookie: ASPSESSIONIDCCRSDTBD=ENOHDMFALMNCOAAFKGFFABDJ; path=/
Cache-control: private

<form action="uldconfirm.asp" method="post" name = "loginform">
<input type="text" name="LoginID" size="20">
<input type="password" name="Pwd" size="20">
<INPUT TYPE="submit" VALUE="Submit">
</form>

Judging from what I can find on this site, I tried:

curl -d "LoginID=xxxxxx&Pwd=yyyyy&=Submit" https://www.theurl.com/condev/uld.asp

This encountered:

1. My password contains some special characters: (%!). The "!" in particular, made bash to return an error: "bash: !: event not found".
I put a single quote " ' " in front of the "!".

After that:
2. Command returned content of the original URL. Same as if I do curl https://www.theurl.com/condev/uld.asp

Can somebody suggest the right course of actions?
Thanks
-Mark
Received on 2005-02-11