Link to home
Start Free TrialLog in
Avatar of rootman103
rootman103

asked on

Net::Telnet prompt issue

Hi Experts,

I have a perl script that is using Net::Telnet and it gets as far as teh login prompt.

the session is a specific interface and retruns the following promtps when I telent from any host.

Enter User Name:
Enter User Password:

it my current script, it opens the socket and times out waiting for the proper login prompt.

how can i set my prompt to make this work.

here is a snipit of my code:

 use Net::Telnet ();
   my $username = "fred";
   my $passwd = "flintstone";
   my $ip = 10.1.1.1;
   my $t = new Net::Telnet(Prompt => '/Enter User Name:/ ');
    $t->open($ip);
    $t->login($username, $passwd);

any help here is greatly appreciated.

Thanks

Rootman 103
ASKER CERTIFIED SOLUTION
Avatar of nanoterabeta
nanoterabeta

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rootman103
rootman103

ASKER

awesome, this worked.

now all i need to do is get it ot print my end results.


Thanks,

Rootman 103
sorry for the delay in giving you the points.

Thanks again.

Rootman103