OT: Perl and Javascript
Kenneth E. Lussier
ken.lussier at zuken.com
Tue Jun 10 16:52:50 EDT 2003
On Tue, 2003-06-10 at 16:31, pll at lanminds.com wrote:
>
> In a message dated: Tue, 10 Jun 2003 16:24:43 EDT
> Morbus Iff said:
>
> > >Since we seem to have an abundance of Perl experts today, I have a
> > >perplexing problem... I am trying to write a script that logs into a
> > >website. The problem that I am running into is that the website requires
> > >javascript. If the site detects that the "browser" doesn't support
> > >javascript, then it loads the login form as an "unmodifiable form text
> > >field" (as reported by lynx). Does anyone know a way around this?
> >
> >If the login is authenticated with javascript (?!!), then you're screwed.
> >What web site is it? Your best bet is to find out what the javascript is
> >exactly doing.
>
> Which shouldn't be too hard, since you should be able to View->Source
> and see the java script lines to determine what's going on.
I was just looking at the source, and it looks like I have another
problem. The site *ALSO* requires cookies to be enabled (which I can get
around using HTTP::Cookies, I think). The login code on the site doesn't
use javascript, except for the button:
<td valign="top">
<img src="/images/login_bar.gif" border=0>
<FORM name=loginForm id=loginForm
action="/scripts/loginmanager.dll?login" method=post onSubmit="return
prepare(this)"
target=_top>
<INPUT TYPE=hidden NAME="MfcISAPICommand" VALUE="Login">
<INPUT TYPE=hidden NAME="hashed" VALUE="0">
<INPUT TYPE=hidden NAME=challenge
value="647c2fc1fd44c1dbed0f58315e9dd1935876f5ec">
<TABLE id=loginTable cellSpacing=1 cellPadding=1 width=150 border=0
style="WIDTH: 150px">
<TR>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=1>User
Name<br> </font>
<INPUT id=a name=a disabled></TD></tr>
<tr>
<TD><FONT face="Verdana, Arial, Helvetica, sans-serif"
size=1>Password<br></font>
<INPUT id=b type=password name=b disabled LANGUAGE=javascript
onKeyPress="return b_onkeypress()"></TD></TR>
<tr>
I looked at CPAN, and I installed JavaScript-0.52. But, in all honesty,
I read through the documentaion on CPAN, and I think I'm more lost now
than I was 20 minutes ago!!
C-Ya,
Kenny
--
----------------------------------------------------------------------------
"Tact is just *not* saying true stuff" -- Cordelia Chase
Kenneth E. Lussier
Sr. Systems Administrator
Zuken, USA
PGP KeyID CB254DD0
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xCB254DD0
More information about the gnhlug-discuss
mailing list