ANSSI-FR / bootcode_parser

A boot record parser that identifies known good signatures for MBR, VBR and IPL.
GNU General Public License v3.0
97 stars 27 forks source link

python errors in construct #3

Closed abazhaniuk closed 6 years ago

abazhaniuk commented 7 years ago

$ python bootcode_parser.py --type MBR --input testdata/mbr* Traceback (most recent call last): File "bootcode_parser.py", line 124, in class MasterBootRecord(BootRecord): File "bootcode_parser.py", line 126, in MasterBootRecord construct.HexDumpAdapter(construct.Bytes("bootloader_code", 440)), AttributeError: 'module' object has no attribute 'HexDumpAdapter'

sc-anssi commented 7 years ago

It seems that you have a more recent version of python-construct than the one needed by bootcode_parser (which is python-construct = 2.5.2). Construct API changed quite dramatically with version 2.8 and I have to update bootcode_parser... eventually. In the mean time, you can pip install python-construct in a version that is compatible (ie. 2.5.x). Sorry about that.

PracaGrande commented 7 years ago

Had the same issue but installing the proper version fixes it as mentioned before. $ sudo pip install construct==2.5.2