Skip to content

Commit 07540ee

Browse files
committed
Renanem priv functions to reflect its implementation
1 parent 176b961 commit 07540ee

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

nxc/protocols/ssh.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def plaintext_login(self, username, password, private_key=""):
160160
self.db.add_loggedin_relation(cred_id, host_id, shell=shell_access)
161161

162162
if shell_access and self.server_os_platform == "Linux":
163-
self.check_if_admin()
163+
self.check_linux_priv()
164164
if self.admin_privs:
165165
self.logger.debug(f"User {username} logged in successfully and is root!")
166166
if self.args.key_file:
@@ -176,11 +176,11 @@ def plaintext_login(self, username, password, private_key=""):
176176

177177
return True
178178

179-
def check_if_admin(self):
179+
def check_linux_priv(self):
180180
self.admin_privs = False
181181

182182
if self.args.sudo_check:
183-
self.check_if_admin_sudo()
183+
self.check_linux_priv_sudo()
184184
return
185185

186186
# we could add in another method to check by piping in the password to sudo
@@ -207,7 +207,7 @@ def check_if_admin(self):
207207
self.logger.display(tips)
208208
return
209209

210-
def check_if_admin_sudo(self):
210+
def check_linux_priv_sudo(self):
211211
if not self.password:
212212
self.logger.error("Check admin with sudo does not support using a private key")
213213
return

0 commit comments

Comments
 (0)