KuechA / pestudio-cli

Python tool to analyze PE file for patterns used by malware
19 stars 11 forks source link

Header #1

Open dwightee opened 3 years ago

dwightee commented 3 years ago

Hi, I was trying your PE-analyzer. It seems like the header option is not working, not even on your example. Am I doing something wrong, here ?

terminal: `Entering interactive mode... Please specify file to analyze or type help

f ./tests/tls_upx.exe header Printing header Traceback (most recent call last): File "pestudio.py", line 507, in interactiveMode(args.file) File "pestudio.py", line 286, in interactiveMode peAnalyzer.printHeaderInformation() File "/Users/mates/Documents/MALWARE/PE-Studio/pestudio-cli-master/PeAnalyzer.py", line 1146, in printHeaderInformation table.add_row(["Machine", constants.MACHINE_TYPE[machine]]) KeyError: MACHINE_TYPES.I386`

KuechA commented 3 years ago

Hi, unfortunately I don't have the time to debug the error in detail. However, it seems like LIEF, one of our dependencies, changed its API and now returns an enum instead of an integer as machine type. You could try to fix it by using machine.value as key in line 1146 instead of only machine or to use an older version of LIEF.