From 8211c33765a2ecedea7f5a1239ab98ac3e9f57ea Mon Sep 17 00:00:00 2001 From: Alexander Neff Date: Sat, 12 Oct 2024 09:24:18 -0400 Subject: [PATCH] Fix module loading for ssh, vnc and ftp --- nxc/protocols/ftp.py | 8 +++++++- nxc/protocols/ssh.py | 3 +++ nxc/protocols/vnc.py | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/nxc/protocols/ftp.py b/nxc/protocols/ftp.py index bf2a39ada..4a576cbec 100644 --- a/nxc/protocols/ftp.py +++ b/nxc/protocols/ftp.py @@ -25,7 +25,13 @@ def proto_logger(self): def proto_flow(self): self.proto_logger() if self.create_conn_obj() and self.enum_host_info() and self.print_host_info() and self.login(): - pass + if hasattr(self.args, "module") and self.args.module: + self.load_modules() + self.logger.debug("Calling modules") + self.call_modules() + else: + self.logger.debug("Calling command arguments") + self.call_cmd_args() def enum_host_info(self): welcome = self.conn.getwelcome() diff --git a/nxc/protocols/ssh.py b/nxc/protocols/ssh.py index a3394d55a..c5afab97d 100644 --- a/nxc/protocols/ssh.py +++ b/nxc/protocols/ssh.py @@ -33,8 +33,11 @@ def proto_flow(self): return if self.login(): if hasattr(self.args, "module") and self.args.module: + self.load_modules() + self.logger.debug("Calling modules") self.call_modules() else: + self.logger.debug("Calling command arguments") self.call_cmd_args() self.conn.close() diff --git a/nxc/protocols/vnc.py b/nxc/protocols/vnc.py index fd3413f30..fb6e4d298 100644 --- a/nxc/protocols/vnc.py +++ b/nxc/protocols/vnc.py @@ -31,8 +31,11 @@ def proto_flow(self): self.print_host_info() if self.login(): if hasattr(self.args, "module") and self.args.module: + self.load_modules() + self.logger.debug("Calling modules") self.call_modules() else: + self.logger.debug("Calling command arguments") self.call_cmd_args() def proto_logger(self):