bug fixes

This commit is contained in:
fluzzi 2023-04-14 18:30:58 -03:00
parent 8235de23ec
commit 98a85154cb
4 changed files with 9 additions and 9 deletions

View File

@ -1,2 +1,2 @@
__version__ = "3.0.4" __version__ = "3.0.5"

View File

@ -768,7 +768,7 @@ class connapp:
else: else:
node["options"] = defaults["options"] node["options"] = defaults["options"]
if edit["logs"]: if edit["logs"]:
questions.append(inquirer.Text("logs", message="Pick logging path/file ", validate=self._default_validation, default=defaults["logs"])) questions.append(inquirer.Text("logs", message="Pick logging path/file ", validate=self._default_validation, default=defaults["logs"].replace("{","{{").replace("}","}}")))
else: else:
node["logs"] = defaults["logs"] node["logs"] = defaults["logs"]
if edit["user"]: if edit["user"]:
@ -828,7 +828,7 @@ class connapp:
else: else:
profile["options"] = defaults["options"] profile["options"] = defaults["options"]
if edit["logs"]: if edit["logs"]:
questions.append(inquirer.Text("logs", message="Pick logging path/file ", default=defaults["logs"])) questions.append(inquirer.Text("logs", message="Pick logging path/file ", default=defaults["logs"].replace("{","{{").replace("}","}}")))
else: else:
profile["logs"] = defaults["logs"] profile["logs"] = defaults["logs"]
if edit["user"]: if edit["user"]:

View File

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

View File

@ -1581,7 +1581,7 @@ __pdoc__ = {
else: else:
node["options"] = defaults["options"] node["options"] = defaults["options"]
if edit["logs"]: if edit["logs"]:
questions.append(inquirer.Text("logs", message="Pick logging path/file ", validate=self._default_validation, default=defaults["logs"])) questions.append(inquirer.Text("logs", message="Pick logging path/file ", validate=self._default_validation, default=defaults["logs"].replace("{","{{").replace("}","}}")))
else: else:
node["logs"] = defaults["logs"] node["logs"] = defaults["logs"]
if edit["user"]: if edit["user"]:
@ -1641,7 +1641,7 @@ __pdoc__ = {
else: else:
profile["options"] = defaults["options"] profile["options"] = defaults["options"]
if edit["logs"]: if edit["logs"]:
questions.append(inquirer.Text("logs", message="Pick logging path/file ", default=defaults["logs"])) questions.append(inquirer.Text("logs", message="Pick logging path/file ", default=defaults["logs"].replace("{","{{").replace("}","}}")))
else: else:
profile["logs"] = defaults["logs"] profile["logs"] = defaults["logs"]
if edit["user"]: if edit["user"]:
@ -2404,7 +2404,7 @@ tasks:
passwords = self._passtx(self.password) passwords = self._passtx(self.password)
else: else:
passwords = [] passwords = []
expects = ['yes/no', 'refused', 'supported', 'cipher', 'ssh-keygen.*\"', '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', 'ssh-keygen.*\"', 'timeout', 'unavailable', 'closed', '[p|P]assword:|[u|U]sername:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching"]
elif self.protocol == "telnet": elif self.protocol == "telnet":
cmd = "telnet " + self.host cmd = "telnet " + self.host
if self.port != '': if self.port != '':
@ -2417,7 +2417,7 @@ tasks:
passwords = self._passtx(self.password) passwords = self._passtx(self.password)
else: else:
passwords = [] passwords = []
expects = ['[u|U]sername:', 'refused', 'supported', 'cipher', 'ssh-keygen.*\"', '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', 'ssh-keygen.*\"', 'timeout', 'unavailable', 'closed', '[p|P]assword:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching"]
else: else:
raise ValueError("Invalid protocol: " + self.protocol) raise ValueError("Invalid protocol: " + self.protocol)
attempts = 1 attempts = 1