No such thing as a small change | |
PerlMonks |
perl script logging into multiple routersby xubu83 (Initiate) |
on May 19, 2015 at 18:00 UTC ( [id://1127159]=perlquestion: print w/replies, xml ) | Need Help?? |
xubu83 has asked for the wisdom of the Perl Monks concerning the following question: Hello, I tried to login to a router with a perl script. I opened a thread about this 2 days ago: http://www.perlmonks.org/?node_id=1126932 Here is the code for the script for logging into 1 router. This script works fine.
Now i have some problems if i modify the script for logging into 3 routers. I made a text file with the 3 IP's of the routers i want to login. The perl script is reading the IP's from the text file and fills the 3 IP's as strings in an array. I use a for loop for looping through the array and to setup a connection with the 3 routers. I have a 401 Authentication error when i run the script.
This is the error message: ** GET http://192.168.1.1:80 ==> 401 Unauthorized Error GETing http://192.168.1.1:80: Unauthorized at routerlogin.pl line 21. For some reason there is a problem when using variable $url in $browser -> credentials and $browser->get. I tried lots of things but can't figure it out. anyone a suggestion?
Back to
Seekers of Perl Wisdom
|
|