Rizin
unix-like reverse engineering framework and cli tools
test_evm.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 # Capstone Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com>
4 
5 from __future__ import print_function
6 from capstone import *
7 
8 cs = Cs(CS_ARCH_EVM, 0)
9 cs.detail = True
10 
11 for i in cs.disasm("\x60\x61\x55", 0x100):
12  print("0x%x:\t%s\t%s" %(i.address, i.mnemonic, i.op_str))
13  if i.pop > 0:
14  print("\tPop: %u" %i.pop)
15  if i.push > 0:
16  print("\tPush: %u" %i.push)
17  if i.fee > 0:
18  print("\tGas fee: %u" %i.fee)
19  if len(i.groups) > 0:
20  print("\tThis instruction belongs to groups: ", end=''),
21  for m in i.groups:
22  print("%s " % i.group_name(m), end=''),
23  print()
size_t len
Definition: 6502dis.c:15