mirror of
https://github.com/Pennyw0rth/NetExec
synced 2026-06-06 16:34:30 +00:00
[connection.py] Neff review I
Signed-off-by: XiaoliChan <2209553467@qq.com>
This commit is contained in:
+1
-1
@@ -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 = ""
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user