mirror of
https://github.com/Pennyw0rth/NetExec
synced 2026-06-06 16:34:30 +00:00
If len(val_list) is zero val_list[0] will crash, this will now return the empty list
This commit is contained in:
@@ -18,6 +18,9 @@ def parse_result_attributes(ldap_response):
|
||||
# If we can't decode the value, we'll just return the bytes
|
||||
val_decoded = val.__bytes__()
|
||||
val_list.append(val_decoded)
|
||||
attribute_map[str(attribute["type"])] = val_list if len(val_list) > 1 else val_list[0]
|
||||
if len(val_list) == 1:
|
||||
attribute_map[str(attribute["type"])] = val_list[0]
|
||||
else:
|
||||
attribute_map[str(attribute["type"])] = val_list
|
||||
parsed_response.append(attribute_map)
|
||||
return parsed_response
|
||||
|
||||
Reference in New Issue
Block a user