Skip to content

Commit 19f979c

Browse files
authored
Merge branch 'main' into fix/mssql-attribute-error
2 parents e8c2584 + 600abd6 commit 19f979c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

nxc/protocols/mssql.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,9 @@ def handle_mssql_reply(self):
423423

424424
def rid_brute(self, max_rid=None):
425425
entries = []
426+
if self.conn.lastError:
427+
self.logger.fail(f"Cannot perform RID bruteforce due to invalid connection: {self.conn.lastError}")
428+
return entries
426429
if not max_rid:
427430
max_rid = int(self.args.rid_brute)
428431

@@ -435,6 +438,7 @@ def rid_brute(self, max_rid=None):
435438
domain_sid = SID(bytes.fromhex(raw_domain_sid.decode())).formatCanonical()[:-4]
436439
except Exception as e:
437440
self.logger.fail(f"Error parsing SID. Not domain joined?: {e}")
441+
return entries
438442

439443
so_far = 0
440444
simultaneous = 1000

0 commit comments

Comments
 (0)