Hi everyone,
I downloaded this module Net::Telnet........im not really good working with
module but i made it work for now but it doesnt meet my objective.....Which
is ..1. open a telenet port; 2. get supplied passwd and username for
verification, execute desired command and wait for my exit command.
my ($logname,$passwd);
print ("Login :");
$logname = <STDIN>;
chop($logname);
print("Passwd:");
$passwd = <STDIN>;
chop($passwd);
use Net::Telnet(); #use module blib/lib/Net/Telnet.pm
$t= use Net::Telnet ( Timeout => 10,Prompt => '/bash\$ $/' );
$t->open(); #open port 23
$t->login($logname,$passwd); #pass variable to method login to verify
@lines = $t->cmd(/bin/who | ls -l); #command requested
print"(@lines\n"); #print the requested ouput
from this code when logname or passwd has no match it terminate and also
when requested command is outputted...
Question is how can i make it running and wait till i terminate it myself?
pls see Telnet.pm code at Net::Telnet thanks...........
Joe
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]