Skip Menu |

This queue is for tickets about the Net-CLI-Interact CPAN distribution.

Report information
The Basics
Id: 94839
Status: resolved
Priority: 0/
Queue: Net-CLI-Interact

People
Owner: Nobody in particular
Requestors: abraxxa [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.133420
Fixed in: (no value)



Subject: login to device in priviledge mode fails
login failed to remote host - prompt does not match at /home/ahartmai/perl5/perlbrew/perls/18/lib/site_perl/5.18.1/Net/Appliance/Session/Transport.pm line 78 line 78 reads: $self->prompt_looks_like('generic') or die 'login failed to remote host - prompt does not match'; Why does it check for the generic prompt although it matched the 'priviledged' prompt before according to the debug log? This happened on a Checkpoint Gaia firewall with a user that has /bin/bash as shell with the following phrasebook: prompt generic match /> $/ prompt privileged match /\[Expert@.+\]\# $/ prompt user match /[Uu]sername: $/ prompt pass match /[Pp]assword: $/ macro begin_privileged send exit match privileged macro end_privileged send clish match generic macro disconnect send logout My current solution is to swap the generic and priviledged prompts as well as the commands sent in begin_ and end_priviledged.
Hi, On Thu Apr 17 13:28:08 2014, ABRAXXA wrote: Show quoted text
> login failed to remote host - prompt does not match at > /home/ahartmai/perl5/perlbrew/perls/18/lib/site_perl/5.18.1/Net/Appliance/Session/Transport.pm > line 78 > > line 78 reads: > $self->prompt_looks_like('generic') > or die 'login failed to remote host - prompt does not match'; > > Why does it check for the generic prompt although it matched the > 'priviledged' prompt before according to the debug log?
When you connect (as a human, without Net::Appliance::Session), are you immediately in Expert mode? This might cause the debug log to report that the privileged mode prompt matched, because part of the login tries each prompt to see what is seen. I think the generic prompt should match both privileged and unprivileged prompts (so ">" or "#" for this platform, it seems). If you change the regex and try again, does that help? regards, oliver. Show quoted text
> This happened on a Checkpoint Gaia firewall with a user that has > /bin/bash as shell with the following phrasebook: > > prompt generic > match /> $/ > > prompt privileged > match /\[Expert@.+\]\# $/ > > prompt user > match /[Uu]sername: $/ > > prompt pass > match /[Pp]assword: $/ > > macro begin_privileged > send exit > match privileged > > macro end_privileged > send clish > match generic > > macro disconnect > send logout > > My current solution is to swap the generic and priviledged prompts as > well as the commands sent in begin_ and end_priviledged.
Closing this ticket. As far as I can tell all the shipped phrasebook generic prompts already support going straight to > or # mode prompts. -- regards, oliver.