bongtrop / hbctool

Hermes Bytecode Reverse Engineering Tool (Assemble/Disassemble Hermes Bytecode)
MIT License
444 stars 71 forks source link

disasm error #19

Closed blueveno closed 1 year ago

blueveno commented 2 years ago

Hi, i got error with command "hbctool disasm index.android.bundle test_hasm". Please help: [*] Disassemble 'index.android.bundle' to 'test_hasm' path Traceback (most recent call last): File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Program Files\Python310\Scripts\hbctool.exe__main.py", line 7, in File "C:\Program Files\Python310\lib\site-packages\hbctool\init.py", line 61, in main disasm(args[''], args['']) File "C:\Program Files\Python310\lib\site-packages\hbctool\init.py", line 33, in disasm hbco = hbc.load(f) File "C:\Program Files\Python310\lib\site-packages\hbctool\hbc\init__.py", line 28, in load assert magic == MAGIC, f"The magic ({hex(magic)}) is invalid. (must be {hex(MAGIC)})" AssertionError: The magic (0x55425f5f20726176) is invalid. (must be 0x1f1903c103bc1fc6)

hexpwn commented 1 year ago

You don't seem to be passing a proper index.android.bundle file. Those initial bytes decode to

00000000: 5542 5f5f 2072 6176                      UB__ rav