Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix module loading for ssh, vnc and ftp #447

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion nxc/protocols/ftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 3 additions & 0 deletions nxc/protocols/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
3 changes: 3 additions & 0 deletions nxc/protocols/vnc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down