You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python3 ADExplorerSnapshot.py tests/data/Server.dat
[*] Server: .com
[] Time of snapshot:
[] Mapping offset: 0x2853a5
[] Object count: 3632
[+] Parsing properties: 1499
[+] Parsing classes: 269
[+] Parsing object offsets: 3632
[+] Restored pre-processed information from data cache
[v] Collecting data: 3169/3632 (0 users, 0 groups, 0 computers, 0 trusts)
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.8/site-packages/dissect/cstruct/types/instance.py", line 16, in getattr
return self._values[attr]
KeyError: 'category'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "ADExplorerSnapshot.py", line 2, in
adexpsnapshot.main()
File "ADExplorerSnapshot.py/adexpsnapshot/init.py", line 603, in main
ADExplorerSnapshot(fh, log)
File "ADExplorerSnapshot.py/adexpsnapshot/init.py", line 92, in init
self.process()
File "ADExplorerSnapshot.py/adexpsnapshot/init.py", line 158, in process
ret = fun(obj)
File "ADExplorerSnapshot.py/adexpsnapshot/init.py", line 364, in processUsers
if not (('user' in entry.classes and 'person' == entry.category) or 'msds-groupmanagedserviceaccount' in entry.classes):
File "ADExplorerSnapshot.py/adexpsnapshot/parser/classes.py", line 59, in getattr
return getattr(self._data, attr)
File "/opt/anaconda3/lib/python3.8/site-packages/dissect/cstruct/types/instance.py", line 18, in getattr
raise AttributeError("Invalid attribute: %r" % attr)
AttributeError: Invalid attribute: 'category'
How do I need to solve this problem?Thanks
The text was updated successfully, but these errors were encountered:
Thanks for opening an issue report!
I've pushed commit f0c20cc, which hopefully fixes your issue.
This was an interesting error message... while it can access the classes property on the object, it seemingly can't access the category property and then the __getattr__ method gets called as a fallback. Except that the category property does exist. Apparently errors in the property method aren't properly propagated, and fallback happens to __getattr__. https://groups.google.com/g/comp.lang.python/c/BZf-d0rLP8U
I have encountered a problem
python3 ADExplorerSnapshot.py tests/data/Server.dat
[*] Server: .com
[] Time of snapshot:
[] Mapping offset: 0x2853a5
[] Object count: 3632
[+] Parsing properties: 1499
[+] Parsing classes: 269
[+] Parsing object offsets: 3632
[+] Restored pre-processed information from data cache
[v] Collecting data: 3169/3632 (0 users, 0 groups, 0 computers, 0 trusts)
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.8/site-packages/dissect/cstruct/types/instance.py", line 16, in getattr
return self._values[attr]
KeyError: 'category'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "ADExplorerSnapshot.py", line 2, in
adexpsnapshot.main()
File "ADExplorerSnapshot.py/adexpsnapshot/init.py", line 603, in main
ADExplorerSnapshot(fh, log)
File "ADExplorerSnapshot.py/adexpsnapshot/init.py", line 92, in init
self.process()
File "ADExplorerSnapshot.py/adexpsnapshot/init.py", line 158, in process
ret = fun(obj)
File "ADExplorerSnapshot.py/adexpsnapshot/init.py", line 364, in processUsers
if not (('user' in entry.classes and 'person' == entry.category) or 'msds-groupmanagedserviceaccount' in entry.classes):
File "ADExplorerSnapshot.py/adexpsnapshot/parser/classes.py", line 59, in getattr
return getattr(self._data, attr)
File "/opt/anaconda3/lib/python3.8/site-packages/dissect/cstruct/types/instance.py", line 18, in getattr
raise AttributeError("Invalid attribute: %r" % attr)
AttributeError: Invalid attribute: 'category'
How do I need to solve this problem?Thanks
The text was updated successfully, but these errors were encountered: