Title: net::telnet
What specifically do you want it to wait for?  Do you really expect to get '/c:>\\\\/' from your telnet server?  I haven't used Net::Telnet, but it seems like if you are looking for a match, then you want to take the single quotes off.  Also, is the prompt you're waiting for "c:>\\", or "c:\>"?  Maybe I just don't understand how the module works.
-----Original Message-----
From: Eric Logeson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 12:08 PM
To: [EMAIL PROTECTED]
Subject: net::telnet

(this is a repost, when I sent it to [EMAIL PROTECTED] I got a bounce indicating my mail didn't make it)


Hello
I am using the telnet server that comes with win2k.  The authentication level is set to "0" clear text.  I can't seem to get the following to work, the script fails at line 9 indicating that it timed out waiting for a "match".  I have tried many iterations of '/c:>\\\\/' but no luck.  I also verified that I can telnet into the telnet server from the command line.  Has anybody been successful using net::telnet with win2k's built telnet server?

use Net::Telnet;
$telnet = new Net::Telnet(Timeout=>4,
                          Errmode=>'die');
$telnet->open('testserver.com');
$telnet->waitfor('/login: $/i');
$telnet->print('user');
$telnet->waitfor('/password: $/i');
$telnet->print('password');
$telnet->waitfor('/c:>\\\\/');
 $telnet->print('dir');
 $output = $telnet->waitfor('/c:>\\\\/');
 print $output;
   
Thanks
Eric



_________________
Eric Logeson
919-680-5679
www.dukece.com


--------------------------------------------------------------------------------
This email may contain confidential and privileged
material for the sole use of the intended recipient.
If you are not the intended recipient, please contact
the sender and delete all copies.

Reply via email to