mirror of
https://github.com/Pennyw0rth/NetExec
synced 2026-06-06 16:34:30 +00:00
FIX a bytes-like object is required, not str
This commit is contained in:
@@ -258,6 +258,9 @@ class smb(connection):
|
||||
except KeyError:
|
||||
self.logger.debug("Error getting server information...")
|
||||
|
||||
if isinstance(self.server_os.lower(), bytes):
|
||||
self.server_os = self.server_os.decode("utf-8")
|
||||
|
||||
if "Windows 6.1" in self.server_os and self.server_os_build == 0 and self.os_arch == 0:
|
||||
self.server_os = "Unix - Samba"
|
||||
elif self.server_os_build == 0 and self.os_arch == 0:
|
||||
@@ -266,9 +269,6 @@ class smb(connection):
|
||||
|
||||
self.logger.extra["hostname"] = self.hostname
|
||||
|
||||
if isinstance(self.server_os.lower(), bytes):
|
||||
self.server_os = self.server_os.decode("utf-8")
|
||||
|
||||
try:
|
||||
self.signing = self.conn.isSigningRequired() if self.smbv1 else self.conn._SMBConnection._Connection["RequireSigning"]
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user