Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Perl by Wingman ( 16 years ago )
stat ~ # cat /scripts/test-telnet.pl
#!/usr/bin/perl -w
use strict;
use Net::Telnet;
my $t = new Net::Telnet( Timeout => 15, Prompt => '/(:[0-9]|:([a-zA-Z]+?))#$/');
my $login = "wingman";
my $pw = "******";
#my $ip = "10.170.108.10";
my $ip = "10.170.108.12";
eval {
$t->open($ip);
$t->login($login, $pw);
$t->print("ena admi");
$t->waitfor('/PassWord:.*$/');
$t->print("admin");
my @out = $t->cmd("sh sw");
foreach(@out){
print $_;
}
};
print $@ if $@;
Revise this Paste