Merge branch 'dynamic-feature-extraction' of https://github.com/mandiant/capa into dynamic-feature-extraction

This commit is contained in:
Yacine Elhamer
2023-10-16 12:04:47 +02:00

View File

@@ -62,10 +62,12 @@ def format_address(address: frz.Address) -> str:
assert isinstance(pid, int)
return f"process ppid: {ppid}, process pid: {pid}"
elif address.type == frz.AddressType.THREAD:
assert isinstance(address.value, int)
tid = address.value
assert isinstance(address.value, tuple)
ppid, pid, tid = address.value
assert isinstance(ppid, int)
assert isinstance(pid, int)
assert isinstance(tid, int)
return f"thread id: {tid}"
return f"process ppid: {ppid}, process pid: {pid}, thread id: {tid}"
elif address.type == frz.AddressType.CALL:
assert isinstance(address.value, tuple)
ppid, pid, tid, id_ = address.value