diff --git a/nxc/connection.py b/nxc/connection.py index b990ae22..ee981bc6 100755 --- a/nxc/connection.py +++ b/nxc/connection.py @@ -75,7 +75,7 @@ class connection(object): self.args = args self.db = db self.hostname = host - self.port = None + self.port = self.args.port self.conn = None self.admin_privs = False self.password = "" diff --git a/nxc/protocols/ftp.py b/nxc/protocols/ftp.py index d8995c13..edd77eeb 100644 --- a/nxc/protocols/ftp.py +++ b/nxc/protocols/ftp.py @@ -14,7 +14,6 @@ class ftp(connection): super().__init__(args, db, host) def proto_logger(self): - self.port = self.args.port self.logger = NXCAdapter( extra={ "protocol": "FTP", diff --git a/nxc/protocols/ldap.py b/nxc/protocols/ldap.py index 71add1e7..c81c2cb4 100644 --- a/nxc/protocols/ldap.py +++ b/nxc/protocols/ldap.py @@ -153,8 +153,6 @@ class ldap(connection): connection.__init__(self, args, db, host) def proto_logger(self): - # self.logger = nxc_logger - self.port = self.args.port self.logger = NXCAdapter( extra={ "protocol": "LDAP", diff --git a/nxc/protocols/mssql.py b/nxc/protocols/mssql.py index 97d87d59..b2387d94 100755 --- a/nxc/protocols/mssql.py +++ b/nxc/protocols/mssql.py @@ -50,7 +50,6 @@ class mssql(connection): self.call_cmd_args() def proto_logger(self): - self.port = self.args.port self.logger = NXCAdapter( extra={ "protocol": "MSSQL", diff --git a/nxc/protocols/rdp.py b/nxc/protocols/rdp.py index 78b85088..1164af1d 100644 --- a/nxc/protocols/rdp.py +++ b/nxc/protocols/rdp.py @@ -94,7 +94,6 @@ class rdp(connection): # self.call_cmd_args() def proto_logger(self): - self.port = self.args.port self.logger = NXCAdapter( extra={ "protocol": "RDP", diff --git a/nxc/protocols/smb.py b/nxc/protocols/smb.py index 1f5d74b1..c8ae1fdd 100755 --- a/nxc/protocols/smb.py +++ b/nxc/protocols/smb.py @@ -173,7 +173,6 @@ class smb(connection): connection.__init__(self, args, db, host) def proto_logger(self): - self.port = self.args.port self.logger = NXCAdapter( extra={ "protocol": "SMB", diff --git a/nxc/protocols/ssh.py b/nxc/protocols/ssh.py index 24b8bf19..0a37aebe 100644 --- a/nxc/protocols/ssh.py +++ b/nxc/protocols/ssh.py @@ -24,7 +24,6 @@ class ssh(connection): super().__init__(args, db, host) def proto_logger(self): - self.port = self.args.port self.logger = NXCAdapter( extra={ "protocol": "SSH", diff --git a/nxc/protocols/vnc.py b/nxc/protocols/vnc.py index fa4ccae8..88436b78 100644 --- a/nxc/protocols/vnc.py +++ b/nxc/protocols/vnc.py @@ -39,7 +39,6 @@ class vnc(connection): self.call_cmd_args() def proto_logger(self): - self.port = self.args.port self.logger = NXCAdapter( extra={ "protocol": "VNC", diff --git a/nxc/protocols/wmi.py b/nxc/protocols/wmi.py index cab4cf9c..21ea3bab 100644 --- a/nxc/protocols/wmi.py +++ b/nxc/protocols/wmi.py @@ -51,7 +51,6 @@ class wmi(connection): connection.__init__(self, args, db, host) def proto_logger(self): - self.port = self.args.port self.logger = NXCAdapter(extra={'protocol': 'WMI', 'host': self.host, 'port': self.port,