Here is a small example demonstrating how to plug an inspector, add start an execution, pause, and test the current progress.
Here are the involved services:
import reven
import time
rvn = reven.reven_connection("localhost", 13370)
if len(rvn.run_get_all()) > 0:
sys.stderr.write("[!] An analysis has already been done. Let's not start a new one.\n")
sys.exit(1)
print reven.inspector_list
for arg in reven.inspector_list["stop_execution"].arguments:
print arg
stopper = reven.stop_execution(False, "malloc", 0)
rvn.engine_plug_inspector(stopper)
rvn.engine_start_execution()
max = 10
progress = rvn.engine_get_progress()
while progress.busy and max > 0:
print "Analyzing %s" % progress.text
time.sleep(1)
progress = rvn.engine_get_progress()
max -= 1
if max < 0 and progress.busy:
rvn.engine_pause_execution()
rvn.engine_resume_execution()