Jim Witte wrote:
Is there a way that I could emulate a web-browser in Perl (to automate
login procedures for a website, etc), and then transfer cookie
information, etc to a graphical browser when I'm done?
I must have asked this question a billion billion[1] times when
I first started with CGI.pm -- the short answer: Sort of
yes - maybe no -- long answer: it all depends upon how the
server you are authenticating to handles "hand off"
security. If it was a server I wrote - then no, you
couldn't do it. I spend a lot of time making sure my
CGI and Basic Authentication isn't hi-jacked by
man-in-the-middle attacks.
But, if it is generally a Basic Authentication
question, then See;
http://www.empowermentzone.com/perl_cgi.txt
http://search.cpan.org/~lwwwp/
Also, install -
Bundle::LWP
Ultimately you could write a Perl script which handles
the whole conversation as a proxy for the graphical
browser; but not "hand off" the session once you've
authenticated. The first time you hand it off and they
try to access it - the remote server may invalidate any
authentication forcing the graphical client to log-in again.
Lots of security holes and potential for abuse in what
you are seeking.
-Sx-
(1. with apologies to Carl Sagan.)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>