detect_rep/ASM2VEC_plus_scripts/asm2code_cmd.py

19 lines
321 B
Python
Raw Normal View History

2023-04-05 10:04:49 +08:00
import os
def asm2code_cmd(asm):
cmd = f''
cmd = cmd + f'rasm2 -a x86 -b 32 "' + asm + f'"'
os.system(cmd)
def code2asm_cmd(code):
cmd = f''
cmd = cmd + f'rasm2 -a x86 -b 32 -d ' + code
os.system(cmd)
if __name__ == '__main__':
asm2code_cmd("mov eax, 33")
code2asm_cmd("b821000000")