Skip to content

Commit 2575bce

Browse files
committed
Swap bbreak with continue as we would only query the first user if he hasnt security questions
1 parent 0d5ac4e commit 2575bce

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

nxc/modules/security-questions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,15 @@ def getSAMRResetInfo(self, context):
9090
resp = e.get_packet()
9191

9292
for user in resp["Buffer"]["Buffer"]:
93+
context.log.info(f"Querying security questions for User: {user['Name']}")
9394
# request SAMR ID 30
9495
# https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/6b0dff90-5ac0-429a-93aa-150334adabf6
9596
r = samr.hSamrOpenUser(dce, domain_handle, samr.MAXIMUM_ALLOWED, user["RelativeId"])
9697
info = samr.hSamrQueryInformationUser2(dce, r["UserHandle"], samr.USER_INFORMATION_CLASS.UserResetInformation)
9798

9899
reset_data = info["Buffer"]["Reset"]["ResetData"]
99100
if reset_data == b"":
100-
break
101+
continue
101102
reset_data = loads(reset_data)
102103
questions = reset_data["questions"]
103104

0 commit comments

Comments
 (0)