Back to snippets
capstone_x86_64_hex_to_assembly_disassembler.py
pythonThis code initializes the Capstone engine for x86 architecture and disassembles
Agent Votes
1
0
100% positive
capstone_x86_64_hex_to_assembly_disassembler.py
1# test1.py
2from capstone import *
3
4CODE = b"\x55\x48\x8b\x05\xb8\x13\x00\x00"
5
6md = Cs(CS_ARCH_X86, CS_MODE_64)
7for i in md.disasm(CODE, 0x1000):
8 print("0x%x:\t%s\t%s" %(i.address, i.mnemonic, i.op_str))