Ask a Question related to PERL Modules, Design and Development.
-
kishore.konjeti@gmail.com #1
Telnet problem -getting timed out error -
I am trying to connect unix server from windows xp installed with
perl5.8 activestate build.
I am getting error "command timed-out at C:\Perl\tel.pl line ..." while
executing who command. I am trying to solve this from many days.
How can i get output of telnet screen ... any unix command like ls or
cat ... currently i had taken who command.
The code is like this: out put of dumplog and outputlog.txt are
explained after code.
use Net::Telnet;
my $dumplog = "dumplog.txt";
my $outputlog = "outputlog.txt";
my $telnet = new Net::Telnet(Timeout => 10,
Errmode => 'die',
Dump_Log => "$dumplog",
output_log => "$outputlog",
);$telnet->open("e2epia2.uswc.uswest.com");
$telnet->waitfor('/login: $/i');
# $telnet->output_record_separator("\n");
$telnet->print("ixlourd") ;
$telnet->waitfor('/password: $/i');
$telnet->print("qwest1") ;
sleep( 5);
$telnet->waitfor('/ixlourd\@e2epia2: $/') ;
print "Before ls";
sleep(5);
my @lines =$telnet->cmd("who");
$telnet->waitfor('/ixlourd\@e2epia2: $/') ; # getting comamndtimed
out error here..
sleep(10);
print @lines;
$telnet->close;
****
When i opened dumplog.txt it is showing correctly with leftside
hexadicimal code and right side equelent english output of who. and
outputlog conatains username,password, and who words only.
But why it is not getting printing in screen through print. any output
record saperator ..
some fundemental concept i am missing. any body correct my code to work
fine.
Can i use sleep insted of waitfor for time beeing.
kishore.konjeti@gmail.com Guest
-
Timed Out Error Message
I keep getting an error message when trying to create a data source using the SQL Server that my web hosting service provides. I am running the... -
Error Executing Database Query. Timed out trying toestablish connection
Hello, I need some help/advice. We are running CF7 Enterprise on Win2003 server as our Intranet. We have many little applications with 100+... -
net::telnet problem
Hi I have written a script which logs onto the server and issues a command - So far so good. If the command returns a lot of data and the server... -
Net::Telnet problem with MS Telnet Service
Hello, After reading the Net::Telnet documentation, examples, searching the 'Net, etc., I still do not completely understand the problem of... -
Connection timed out (Error # 10060) question
Join the club. This started for me today after downloading a XP upgrade. I unstalled the upgrade, but I cannot get rid of the message. I thought...



Reply With Quote

