fox-it / dissect.target

The Dissect module tying all other Dissect modules together. It provides a programming API and command line tools which allow easy access to various data sources inside disk images or file collections (a.k.a. targets).
GNU Affero General Public License v3.0
37 stars 41 forks source link

Linux images: ValueError: invalid literal for int() with base 10: 'None' #736

Open DissectBot opened 4 days ago

DissectBot commented 4 days ago

Hello there!

I get this error quite often when I try to get information about linux images (e.g. ip adresses):

Traceback (most recent call last): File "/usr/local/bin/target-query", line 8, in sys.exit(main()) File "/usr/local/lib/python3.9/dist-packages/dissect/target/tools/utils.py", line 255, in wrapper return func(*args, **kwargs) File "/usr/local/lib/python3.9/dist-packages/dissect/target/tools/query.py", line 384, in main raise e File "/usr/local/lib/python3.9/dist-packages/dissect/target/tools/query.py", line 373, in main for record_entries in entry: File "/usr/local/lib/python3.9/dist-packages/dissect/target/plugins/general/osinfo.py", line 28, in osinfo value = getattr(self.target._os, os_func) File "/usr/local/lib/python3.9/dist-packages/dissect/target/helpers/cache.py", line 228, in cache_wrapper return cache.call(*args, **kwargs) File "/usr/local/lib/python3.9/dist-packages/dissect/target/helpers/cache.py", line 104, in call func_cache[key] = self.func(*args, **kwargs) File "/usr/local/lib/python3.9/dist-packages/dissect/target/plugins/os/unix/linux/_os.py", line 44, in ips for ip in parse_unix_dhcp_log_messages(self.target): File "/usr/local/lib/python3.9/dist-packages/dissect/target/helpers/network_managers.py", line 533, in parse_unix_dhcp_log_messages for record in messages: File "/usr/local/lib/python3.9/dist-packages/dissect/target/plugins/os/unix/log/journal.py", line 428, in journal uid=get_optional(entry.get("uid"), int), File "/usr/local/lib/python3.9/dist-packages/dissect/target/plugins/os/unix/log/journal.py", line 261, in get_optional return to_type(value) if value else None ValueError: invalid literal for int() with base 10: 'None'

Is there a way to fix this?