Skip to content

Commit

Permalink
handles different login screens, enable password
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed Daif committed May 10, 2015
1 parent 9dc1077 commit c81736d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Exscript/protocols/drivers/zte.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
import re
from Exscript.protocols.drivers.driver import Driver

_user_re = [re.compile(r'user ?name:', re.I)]
_user_re = [re.compile(r'user ?name:', re.I), re.compile(r'login', re.I)]
_password_re = [re.compile(r'(?:User )?Password:', re.I)]
_prompt_re = [re.compile(r'[\r\n][\-\w+\.]+(?:\([^\)]+\))?[>#] ?$|(?:\(y/n\)\[n\])')]
_prompt_re = [re.compile(r'[\r\n][\-\w+\.\(\)]+(?:\([^\)]+\))?[>#$] ?$|(?:\(y/n\)\[n\])'),
re.compile(r"[\r\n]Password: ?", re.I)] # password prompt to be used in privilege mode when it has
# a password different from the login password.
_error_re = [re.compile(r'%Error'),
re.compile(r'(?:Unrecognized|Incomplete) command', re.I), re.compile(r'Invalid input', re.I)]

Expand Down

0 comments on commit c81736d

Please sign in to comment.