#!/usr/bin/env python3
fromsysimportargvfrompandareimportblocking,Panda# No arguments, i386. Otherwise argument should be guest arch
generic_type=argv[1]iflen(argv)>1else"x86_64"panda=Panda(generic=generic_type)@blockingdefrun_cmd():# First revert to root snapshot, then type a command via serial
panda.revert_sync("root")panda.record_cmd("echo test && bash -c \"echo test2\"",recording_name="test")panda.end_analysis()panda.queue_async(run_cmd)panda.run()