-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$ in banner; expect4r assumes prompt on ios #6
Comments
Hi Brad, Thanks for the feedback, Jean-Michel |
This is the exact banner: ^ I was going to modify that but I didn't want to hard code anything in the code. It's seems the $ is what is throwing it off. I'm also not able to change the banner on the entire population of devices. Brad |
A little more testing here. We have some interesting line in our configs and thus need a very specific regex for the prompt. (please excuse my rookie coding skills) Here's some examples: an ACL with a remark: remark 1########################################### an IPSLA with an 'owner' owner User Name user@foo.com Both seem to trigger a prompt find. So rather than hard code it (in ios.rb) Allow the passing of a prompt: def initialize(args) The reason for the \r in the regex is, nx-os appears to add a \r to the promt sometime (\rhostname#) Brad |
Removing the '$' char from the prompt seems a better approach. |
Hey there-
First thanks for your work on this. It is proving to be very useful. It working fine on our lab but our production routers have a banner motd with a $ in it and it is parsed as a prompt and therefore the password never given:
debug: buf0: [,and may result in fines of $]
debug: match PROMPT
debug: ,and may result in fines of $
debug: print: "show ip route\r", io_writer: #File:0x007fcfe89a8ca0
The actual line of the banner is:
,and may result in fines of $250,000 and/or imprisonment.
Any thoughts?
Brad
The text was updated successfully, but these errors were encountered: