Skip to content

Commit

Permalink
[SMB] Put condition in a right way
Browse files Browse the repository at this point in the history
Signed-off-by: XiaoliChan <[email protected]>
  • Loading branch information
XiaoliChan committed Dec 27, 2024
1 parent d3e31c9 commit 7c527e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nxc/protocols/smb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit 7c527e0

Please sign in to comment.