Commit f749e30c authored by 广宏伟's avatar 广宏伟

Merged in dev (pull request #127)

Dev
parents f1f264f1 88a9e2d3
......@@ -183,13 +183,13 @@ class TelnetConnection:
r'incorrect|failed|失败|错误', re.I
)
self.username_pattern = re.compile(
r'login:\s*$|username:\s*$|用户名:\s*$|账\s*号:\s*$', re.I
r'login:?\s*$|username:?\s*$|用户名:?\s*$|账\s*号:?\s*$', re.I
)
self.password_pattern = re.compile(
r'password:\s*$|passwd:\s*$|密\s*码:\s*$', re.I
r'Password:?\s*$|passwd:?\s*$|密\s*码:?\s*$', re.I
)
self.success_pattern = re.compile(
r'Last\s*login|success|成功', re.I
r'Last\s*login|success|成功|#|\$', re.I
)
def get_socket(self):
......
......@@ -407,7 +407,7 @@ class InteractiveServer:
self.client.send(wr(_('Tips: Enter the asset ID and log directly into the asset.'), before=1))
prompt_page_up = _("Page up: P/p")
prompt_page_down = _("Page down: Enter|N/n")
prompt_back = _("BACK: B/b")
prompt_back = _("BACK: b/q")
prompts = [prompt_page_up, prompt_page_down, prompt_back]
prompt = '\t'.join(prompts)
self.client.send(wr(prompt, before=1))
......@@ -416,7 +416,7 @@ class InteractiveServer:
opt = net_input(self.client, prompt=':')
if opt in ('p', 'P'):
return PAGE_UP
elif opt in ('B', 'b'):
elif opt in ('b', 'q'):
return BACK
elif opt.isdigit() and self.search_result and 0 < int(opt) <= len(self.search_result):
self.proxy(self.search_result[int(opt)-1])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment