Skip to content

Commit

Permalink
Merge pull request #137 from fpreynaud/bugfix
Browse files Browse the repository at this point in the history
Fix bug in WCC module
  • Loading branch information
NeffIsBack authored Dec 8, 2023
2 parents 388208d + 5c87c27 commit 76836dc
Showing 1 changed file with 4 additions and 8 deletions.
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

0 comments on commit 76836dc

Please sign in to comment.