On 6/10/02 8:55 PM, "bob ackerman" <[EMAIL PROTECTED]> wrote:
> # Fetch the page > $admin = ARGV[0]; #password > print $admin,"\n"; > my $ua = LWP::UserAgent->new; > my $req = HTTP::Request->new(GET => 'http://192.168.0.1/status.htm'); > $req->authorization_basic('', $admin); #not working > my $thePage = $ua->send_request($req); > > but it doesn't seem to authenticate. i have tried various usernames: 'root' > , 'admin'. my logged in user name. > doesn't help. Couple of things: 1) Are you sure the URI is correct? 2) When you log into the router administration page manually, using your web browser, do you have to enter a username or password? Those should be the values that you should enter using the script. If you don't need a username or password, maybe the problem is that you're passing a password, and that's screwing it up somehow. 3) FYI, the script I posted -- which seems to be what you modelled yours after -- assumes that you're getting at the router from behind the router. Stupid point, yes, and I'm sure you already know that, but I've gotten tripped up making enough moronic mistakes that I feel obliged to point them out. - geoff -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]