You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pydis threw an exception error when disassembling raw data.
Example: 0x66, 0x8C, 0x31, 0xC0
Expected Output:
db0x66db0x8cxoreax,eax
Pydis Output:
Traceback (most recent call last):
File "test.py", line 6, in <module>
for instruction in pydis.decode(instructions, instruction_pointer):
File "/home/shahril/.local/lib/python3.7/site-packages/pydis/decoder.py", line 71, in decode
raise Exception(f'Failed while decoding: {status.name}')
Exception: Failed while decoding: BadRegister
Looking at the code here, decoder.py#L62, pydis quickly break if decoder returns !success.
pydis threw an exception error when disassembling raw data.
Example:
0x66, 0x8C, 0x31, 0xC0
Expected Output:
Pydis Output:
Looking at the code here, decoder.py#L62, pydis quickly break if decoder returns !success.
However, official
ZydisDisasm
tool treated the "invalid" instruction as raw data, as shown here: https://github.com/zyantific/zydis/blob/326d1fb586630adfcad9491b9c440425c31ed0e3/tools/ZydisDisasm.c#L139A hackish way I found to handle this problem is by using try...except:
The text was updated successfully, but these errors were encountered: