This commit is contained in:
fluzzi 2022-08-18 18:00:55 -03:00
parent 0fad67513f
commit 943865958d
2 changed files with 4 additions and 4 deletions

View File

@ -393,7 +393,7 @@ class node:
passwords = self._passtx(self.password)
else:
passwords = []
expects = ['yes/no', 'refused', 'supported', 'cipher', 'sage', 'timeout', 'unavailable', 'closed', '[p|P]assword:|[u|U]sername:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching host key"]
expects = ['yes/no', 'refused', 'supported', 'cipher', 'sagenotinuse', 'timeout', 'unavailable', 'closed', '[p|P]assword:|[u|U]sername:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching host key"]
elif self.protocol == "telnet":
cmd = "telnet " + self.host
if self.port != '':
@ -406,7 +406,7 @@ class node:
passwords = self._passtx(self.password)
else:
passwords = []
expects = ['[u|U]sername:', 'refused', 'supported', 'cipher', 'sage', 'timeout', 'unavailable', 'closed', '[p|P]assword:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching host key"]
expects = ['[u|U]sername:', 'refused', 'supported', 'cipher', 'sagenotinuse', 'timeout', 'unavailable', 'closed', '[p|P]assword:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching host key"]
else:
raise ValueError("Invalid protocol: " + self.protocol)
child = pexpect.spawn(cmd)

View File

@ -2259,7 +2259,7 @@ tasks:
passwords = self._passtx(self.password)
else:
passwords = []
expects = ['yes/no', 'refused', 'supported', 'cipher', 'sage', 'timeout', 'unavailable', 'closed', '[p|P]assword:|[u|U]sername:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching host key"]
expects = ['yes/no', 'refused', 'supported', 'cipher', 'sagenotinuse', 'timeout', 'unavailable', 'closed', '[p|P]assword:|[u|U]sername:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching host key"]
elif self.protocol == "telnet":
cmd = "telnet " + self.host
if self.port != '':
@ -2272,7 +2272,7 @@ tasks:
passwords = self._passtx(self.password)
else:
passwords = []
expects = ['[u|U]sername:', 'refused', 'supported', 'cipher', 'sage', 'timeout', 'unavailable', 'closed', '[p|P]assword:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching host key"]
expects = ['[u|U]sername:', 'refused', 'supported', 'cipher', 'sagenotinuse', 'timeout', 'unavailable', 'closed', '[p|P]assword:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching host key"]
else:
raise ValueError("Invalid protocol: " + self.protocol)
child = pexpect.spawn(cmd)