Skip to content

Commit 9e61764

Browse files
authored
Merge pull request Pennyw0rth#447 from Pennyw0rth/neff-fix-loading-modules
Fix module loading for ssh, vnc and ftp
2 parents 95ac371 + 8211c33 commit 9e61764

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

nxc/protocols/ftp.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ def proto_logger(self):
2525
def proto_flow(self):
2626
self.proto_logger()
2727
if self.create_conn_obj() and self.enum_host_info() and self.print_host_info() and self.login():
28-
pass
28+
if hasattr(self.args, "module") and self.args.module:
29+
self.load_modules()
30+
self.logger.debug("Calling modules")
31+
self.call_modules()
32+
else:
33+
self.logger.debug("Calling command arguments")
34+
self.call_cmd_args()
2935

3036
def enum_host_info(self):
3137
welcome = self.conn.getwelcome()

nxc/protocols/ssh.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ def proto_flow(self):
3333
return
3434
if self.login():
3535
if hasattr(self.args, "module") and self.args.module:
36+
self.load_modules()
37+
self.logger.debug("Calling modules")
3638
self.call_modules()
3739
else:
40+
self.logger.debug("Calling command arguments")
3841
self.call_cmd_args()
3942
self.conn.close()
4043

nxc/protocols/vnc.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ def proto_flow(self):
3131
self.print_host_info()
3232
if self.login():
3333
if hasattr(self.args, "module") and self.args.module:
34+
self.load_modules()
35+
self.logger.debug("Calling modules")
3436
self.call_modules()
3537
else:
38+
self.logger.debug("Calling command arguments")
3639
self.call_cmd_args()
3740

3841
def proto_logger(self):

0 commit comments

Comments
 (0)