cURL / Mailing Lists / curl-users / Single Mail

curl-users

How to accomplish a simple login?

From: John Mann <johnmann_at_attbi.com>
Date: Mon, 1 Apr 2002 23:55:51 -0500

Hello all,

I am trying to use a set of curl commands in a shell script to archive my
delphi discussion forum. Before I can get to the actual messages, I have to
go through a login screen. After much pain, I was able to get curl to use a
Netscape cookie to bring up the login screen with my username already
entered, but with a seemingly blank password. If I was using Netscape, at
this point I would simply type in my password and click the "Login" button.
Then I would be able to move on and start browsing the messages. I tried
looking at the documents to learn how to simulate this login using curl, but
I can't figure it out. The form at Delphi seems more complicated than the
ones used in the example documentation. Here is the form I am presented
with (I took out a bunch of table stuff to make it more readable):

<form method=post
action="http://login.prospero.com/dir-login/index.asp?webtag=wackypacks&lgnF
=l&lgnDST=http%3A%2F%2Fforums%2Edelphiforums%2Ecom%2Fwackypacks%2F"
target="_self" name="LogMeIn"><b>Enter your Forum Membername <br>or your
E-mail Address:</b><br><input type=text name=membername value="MYUSERNAME"
size=25><b>Enter your Password</b><br><input type=password
name="Additional_info" value=" " size=25><input type=submit
name="Log_in" value="Login" onClick="this.className='b2'"
onBlur="this.className='button'" class=button ><br>Save password on this
computer? <input type=checkbox name="Save_addinfo" value=true checked>Enter
as a &nbsp;<input type=submit name="guest" value="Guest"
onClick="this.className='b2'" onBlur="this.className='button'" class=button
><a
href="/dir-login/index.asp?webtag=wackypacks&lgnF=r&lgnDST=http%3A%2F%2Fforu
ms%2Edelphiforums%2Ecom%2Fwackypacks%2F" target="_self"><b>New</b> to
Forums? Create a new account.</a><a
href="/dir-login/index.asp?webtag=wackypacks&lgnF=f&lgnDST=http%3A%2F%2Fforu
ms%2Edelphiforums%2Ecom%2Fwackypacks%2F" target="_self"><b>Forgotten</b>
your Forums password? </a></form>

It seems the key input element is called "Log_in", but instead of having a
"value", in has something like this:

onClick="this.className='b2'"

I have no clue what that is doing, or how to tell curl to "click this
button" and move on. Any ideas? Thanks in advance for any help you can
provide.

John
Received on 2002-04-04