Skip to content

Commit 7070305

Browse files
committed
Add faster login for kerberos
1 parent cafa670 commit 7070305

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

nxc/protocols/smb.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,6 @@ def print_host_info(self):
313313
return True
314314

315315
def kerberos_login(self, domain, username, password="", ntlm_hash="", aesKey="", kdcHost="", useCache=False):
316-
# Re-connect since we logged off
317-
self.create_conn_obj()
318316
self.logger.debug(f"KDC set to: {kdcHost}")
319317
lmhash = ""
320318
nthash = ""
@@ -373,6 +371,7 @@ def kerberos_login(self, domain, username, password="", ntlm_hash="", aesKey="",
373371
if self.args.continue_on_success and self.signing:
374372
with contextlib.suppress(Exception):
375373
self.conn.logoff()
374+
self.create_conn_obj()
376375
return True
377376
except SessionKeyDecryptionError:
378377
# success for now, since it's a vulnerability - previously was an error

0 commit comments

Comments
 (0)