miasm
Reverse engineering framework
callback Namespace Reference

Functions

def cb_x86_callpop (mdis, cur_bloc, offset_to_dis)
 

Variables

tuple shellcode
 
 machine = Machine("x86_32")
 
 loc_db = LocationDB()
 
 cont = Container.from_string(shellcode, loc_db)
 
 mdis = machine.dis_engine(cont.bin_stream, loc_db=loc_db)
 
 asmcfg = mdis.dis_multiblock(0)
 
 dis_block_callback
 
 asmcfg_after = mdis.dis_multiblock(0)
 

Function Documentation

◆ cb_x86_callpop()

def callback.cb_x86_callpop (   mdis,
  cur_bloc,
  offset_to_dis 
)
1000: call 1005
1005: pop

Will give:

1000: push 1005
1005: pop

Variable Documentation

◆ asmcfg

callback.asmcfg = mdis.dis_multiblock(0)

◆ asmcfg_after

callback.asmcfg_after = mdis.dis_multiblock(0)

◆ cont

◆ dis_block_callback

callback.dis_block_callback

◆ loc_db

callback.loc_db = LocationDB()

◆ machine

callback.machine = Machine("x86_32")

◆ mdis

callback.mdis = machine.dis_engine(cont.bin_stream, loc_db=loc_db)

◆ shellcode

tuple callback.shellcode
Initial value:
1 = (
2  b"\xe8\x00\x00\x00\x00" # CALL $
3  b"X" # POP EAX
4  b"\xc3" # RET
5 )