rizin/test/scripts/dk_9.py
2024-11-09 20:48:42 +08:00

12 lines
426 B
Python

import sys
import rzpipe
rzp = rzpipe.open("bins/elf/analysis/calls_x64", flags=["-a", "x86", "-d", "-1"])
expected = "child received signal 9"
sys.stdout.write(rzp.cmd("")) # should print nothing
actual = rzp.cmd("wx ebfe; dk 9; dc") # ebfe is infinite loop
actual += rzp.cmd("")
if expected in actual or "Process exited with status=0x9" in actual:
sys.stderr.write(expected + "\n")
else:
sys.stderr.write(actual)