Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in WCC module #137

Merged
merged 2 commits into from
Dec 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions nxc/modules/wcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,16 +588,12 @@ def get_value(subkey_handle, dwIndex=0):
subkey_handle = ans["phkResult"]

if valueName is None:
_, _, data = get_value(subkey_handle)
return get_value(subkey_handle)[3]
else:
found = False
for _, name, _data in subkey_values(subkey_handle):
for _, name, data in subkey_values(subkey_handle):
if name.upper() == valueName.upper():
found = True
break
if not found:
return DCERPCSessionError(error_code=ERROR_OBJECT_NOT_FOUND)
return data
return data
return DCERPCSessionError(error_code=ERROR_OBJECT_NOT_FOUND)

# Methods for getting values from SAMR and SCM #
################################################
Expand Down