Skip to content

Commit ec05735

Browse files
committed
Fix copilot solution where smbv1 could not be initialized anymore
1 parent 5793ccc commit ec05735

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

nxc/protocols/smb.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,9 @@ def create_conn_obj(self, no_smbv1=False):
601601
"""
602602
# Initial negotiation
603603
if self.smbv1 is None and not no_smbv1 and not self.args.no_smbv1:
604-
if not self.create_smbv1_conn() and not self.is_timed_out:
604+
if self.create_smbv1_conn():
605+
return True
606+
elif not self.is_timed_out:
605607
# Fallback if SMBv1 fails
606608
return self.create_smbv3_conn()
607609
else:

0 commit comments

Comments
 (0)