Hi all,
This is the code I use to login to any device.( I will not be able to see any window but it will be able to login to the device and give the command specified)... can you tell me what changes I should do so that I can see what happens ...(like telnetting to the device ) Hope you can get my question
[CODE=perl]
$telnet3 = new Net::Telnet(
Timeout => 10,
Errmode => 'die',
);
$telnet3->open('192.168. 134.36'); # Substituted fake IP
$telnet3->waitfor('/Enter login: $/i');
$telnet3->print('user' ); # Substituted fake User
$telnet3->waitfor('/Enter password: $/i');
$telnet3->print('pass' ); # Substituted fake PW
$telnet3->waitfor('/> $/i');
print "Logged in to device\n";
telnet3->print("reboot" );
[/CODE]
This is the code I use to login to any device.( I will not be able to see any window but it will be able to login to the device and give the command specified)... can you tell me what changes I should do so that I can see what happens ...(like telnetting to the device ) Hope you can get my question
[CODE=perl]
$telnet3 = new Net::Telnet(
Timeout => 10,
Errmode => 'die',
);
$telnet3->open('192.168. 134.36'); # Substituted fake IP
$telnet3->waitfor('/Enter login: $/i');
$telnet3->print('user' ); # Substituted fake User
$telnet3->waitfor('/Enter password: $/i');
$telnet3->print('pass' ); # Substituted fake PW
$telnet3->waitfor('/> $/i');
print "Logged in to device\n";
telnet3->print("reboot" );
[/CODE]
Comment