Skip to content

Commit beee54b

Browse files
committed
Fix debug logging
1 parent caba9f6 commit beee54b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

nxc/protocols/ssh.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ def plaintext_login(self, username, password, private_key=""):
120120

121121
self.check_shell(cred_id)
122122

123-
out = process_secret(self.password) if not self.args.key_file else f"{process_secret(self.password)} (keyfile: {self.args.key_file})"
123+
secret = process_secret(self.password) if not self.args.key_file else f"{process_secret(self.password)} (keyfile: {self.args.key_file})"
124124
display_shell_access = f"{self.uac}{self.server_os_platform}{' - Shell access!' if self.shell_access else ''}"
125-
self.logger.success(f"{self.username}:{process_secret(out)} {self.mark_pwned()} {highlight(display_shell_access)}")
125+
self.logger.success(f"{self.username}:{process_secret(secret)} {self.mark_pwned()} {highlight(display_shell_access)}")
126126
return True
127127
except AuthenticationException as e:
128128
if "Private key file is encrypted" in str(e):
@@ -164,7 +164,7 @@ def check_shell(self, cred_id):
164164
stdout = self.conn.exec_command("whoami /priv")[1].read().decode(self.args.codec, errors="ignore")
165165
if stdout:
166166
self.server_os_platform = "Windows"
167-
self.logger.debug(f"Windows detected for user: {stdout}")
167+
self.logger.debug("Windows detected")
168168
self.shell_access = True
169169
self.check_windows_priv(stdout)
170170
self.db.add_loggedin_relation(cred_id, host_id, shell=self.shell_access)

0 commit comments

Comments
 (0)