diff --git a/nxc/protocols/smb.py b/nxc/protocols/smb.py index 0f43c728f..4c67b939f 100755 --- a/nxc/protocols/smb.py +++ b/nxc/protocols/smb.py @@ -206,6 +206,9 @@ def get_os_arch(self): return 0 def enum_host_info(self): + if self.args.force_smbv2: + self.force_smbv2 = True + self.local_ip = self.conn.getSMBServer().get_socket().getsockname()[0] try: @@ -590,9 +593,6 @@ def create_conn_obj(self): On first try, it will try to create a SMBv1 connection. On further tries, it will remember which SMB version is supported and create a connection object accordingly. """ - if self.args.force_smbv2: - self.force_smbv2 = True - if self.force_smbv2: return self.create_smbv3_conn()