For architectures other than mips, this script will print a non-null proc object regardless if the bug flag is set. However, for mips, it will only print a valid value if bug is false.
from pandare import Panda
bug = True
arch = "mips"
panda = Panda(generic=arch)
@panda.queue_blocking
def driver():
panda.revert_sync("root")
if not bug:
panda.load_plugin("osi")
@panda.cb_before_block_exec
def bbe(cpu, tb):
proc = panda.plugins['osi'].get_current_process(cpu)
print(proc)
if proc != panda.ffi.NULL:
panda.disable_callback("bbe")
panda.run()
For architectures other than mips, this script will print a non-null proc object regardless if the
bug
flag is set. However, for mips, it will only print a valid value ifbug
is false.