Merge pull request #137 from fpreynaud/bugfix

Fix bug in WCC module
main
Alex 2023-12-08 01:08:12 +01:00 committed by GitHub
commit 76836dcc9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 8 deletions

View File

@ -588,16 +588,12 @@ class HostChecker:
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 #
################################################