OT: Perl and Javascript

Dan Coutu coutu at snowy-owl.com
Tue Jun 10 16:38:49 EDT 2003


Hmm, you're writing a perl script that is acting as a browser (of sorts) 
in order to login to a remote
site and then do other things there (I"m assuming.)

If so then you should be receiving the HTTP data, including the request 
from the server that they
are using to determine whether or not your 'browser' supports 
javascript. You could examine
what they are asking and perhaps determine how to provide the 'proper' 
response to fake
out the other end. Of course it will then probably throw some JavaScript 
at your code with
the expectation that it will do something with it. You will then need to 
analyze that and see if
you can figure out how to throw back a useful result to the server 
(despite not actually parsing
the JavaScript). All this may be possible but you may need to understand 
(or learn) a fair
amount about HTTP (the protocol itself) to pull it off.

Of course, you could surf CPAN to see if someone else already did the 
grunt work for you.
http://www.cpan.org/


Kenneth E. Lussier wrote:

>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?
>
>TIA,
>Kenny
>  
>





More information about the gnhlug-discuss mailing list