in reply to Re: Cannot get enable> mode to work
in thread Cannot get enable> mode to work
It doesn't like the format. But individually works just fine.....# authentication if ($telnet->waitfor('/Username: $/i')) { $telnet->print($username); } elsif ($telnet->waitfor('/Password: $/i')) { $telnet->print($password); } # Wait for the prompt, send "enable" and enable-pwd elsif ($telnet->waitfor('/>/')) { $telnet->print('enable'); $telnet->waitfor('/Password: $/i'); $telnet->print($enpwd); } else { $telnet->waitfor('/>/'); $telnet->print('enable'); $telnet->waitfor('/Password: $/i'); $telnet->print($enpwd); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Cannot get enable> mode to work
by VinsWorldcom (Prior) on Sep 18, 2014 at 18:14 UTC | |
by ArifS (Beadle) on Sep 19, 2014 at 13:10 UTC |