[ale] Using Perl to Access Linksys
Armsby John-G16665
John.Armsby at motorola.com
Mon Jan 20 13:00:18 EST 2003
I will be trying this...... Thanks for the tips....
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
$req = HTTP::Request->new(GET => 'http://myProtectedURL');
$req->authorization_basic('myuserid', 'mypassword');
print $ua->request($req)->as_string;
-----Original Message-----
From: Denny Chambers [mailto:dchambers at bugfixer.net]
To: ale at ale.org
Sent: Monday, January 20, 2003 10:23 AM
To: ale at ale.org
Subject: Re: [ale] Using Perl to Access Linksys
If the login is coming from the linksys web servers, as Basic
Authenication, then add a "Authorization" header to you GET requests.
The header will look like this:
Authorization: BASIC d3fF53C7hRG6edk8Ut=
The last part of this header (d3fF53C7hRG6edk8Ut=) is the
username/password. The username/password is Base64Encoded, in the form
of username:password.
HTH,
Denny
Armsby John-G16665 wrote:
>All,
>
>I thought I would ask you guys before I tried the Perl guys.....
>
>
>I have a DHCP account Mindspring and a Linksys switch/router. I want perl to log into the router and mail the html of the /Status.htm page. From there, I can access my PC as I have port forwarding. I used the Oreiley book to "get" the page, but the login/password prompt defeats me.
>
>I have no problem "getting" any html page and putting it in a variable. Unfortunately the html login prompt is not captured, it is not an html "page".
>
>Anyone scripting into Linksys to the the WAN IP?
>
>John
>
>_______________________________________________
>Ale mailing list
>Ale at ale.org
>http://www.ale.org/mailman/listinfo/ale
>
>
>
>
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list