[Tutor] Help with CGI login

James sendme105@hotmail.com
Thu, 16 Aug 2001 18:09:55 -0700


>>http://www.listbot.com/cgi-bin/customer?Act=3DNULL

> Login with your browser.  Make a note of the URL that is used.  That
> is, identify all form fields and their values.  Forms are submitted in
> the URL.  For example, with my DSL connection I need to login via a
> web form.  A big PITA so instead I made a little python script that
> gets run when the interface is brought up.  The core looks like this :
>
>     urllib.urlopen(
>         "http://www2.frontierdsl.com:9061/dashboard?fcn=serviceLogon&"
>         +
"service=frontiernet.dsl&username=myname&password=mypassword").read()


I tried this, but the fields seem to be hidden from view when logging in.
I've been trying to figure out the fields from the html source for the page,
but haven't got it right yet.

Here's some snips of the relevant (i think) html source:
<p class="main">
<form method="post" action="customer" NAME="the_form" onSubmit="test_js();">
<!-- BEGIN LOGIN TITLE BAR -->
...             <input type=text name="customer_e_mail_login" size=25
maxlength=128
                VALUE=""></td>
                <input type=password name="customer_password_login" size=20
                maxlength=10></td>
                <input type=hidden name="login" alt="Subscriber Login"
                  value="subscriber_login">
                <input type=image src="/images/login.gif" width=61 height=18
                value="Login" alt="Login" border=0>
              <td width="100%" align=center class="table-cell">
                <A HREF="customer?Act=send_password&customer_e_mail_login=">
                  Lost yours?</a>
              ...
<INPUT TYPE=HIDDEN NAME="login" VALUE="customer_login">
<INPUT TYPE=HIDDEN NAME="js_test" VALUE="old">
<INPUT TYPE=HIDDEN NAME="LEC" VALUE="">
<input type="hidden" name="Act" value="NULL">
<!-- END LOGIN FORM -->
</form>
<!-- END FORM TAG -->

I'm trying things like
http://www.listbot.com/cgi-bin/customer?Act=login&customer_e_mail_login=emai
l@addy.com&customer_password_login=mypass=

manually with my browsers address bar.

Could the @ be a special character that would normally require a '\' in
python?  (as in '\\' or '\%')

Thanks,

James.