Skip to content

Commit b27b20f

Browse files
authored
Merge branch 'main' into fix/mssql-integrated-auth-tds-error-handling
2 parents 3ff1e89 + 600abd6 commit b27b20f

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
@@ -435,6 +435,9 @@ def handle_mssql_reply(self):
435435

436436
def rid_brute(self, max_rid=None):
437437
entries = []
438+
if self.conn.lastError:
439+
self.logger.fail(f"Cannot perform RID bruteforce due to invalid connection: {self.conn.lastError}")
440+
return entries
438441
if not max_rid:
439442
max_rid = int(self.args.rid_brute)
440443

@@ -447,6 +450,7 @@ def rid_brute(self, max_rid=None):
447450
domain_sid = SID(bytes.fromhex(raw_domain_sid.decode())).formatCanonical()[:-4]
448451
except Exception as e:
449452
self.logger.fail(f"Error parsing SID. Not domain joined?: {e}")
453+
return entries
450454

451455
so_far = 0
452456
simultaneous = 1000

0 commit comments

Comments
 (0)