# get res if simu.found: res = simu.found[0] for i inrange(3): # print stdin/stdout/stderr, stdin is flag print(res.posix.dumps(i)) else: print("No result!")
if simu.found: res = simu.found[0] for i inrange(3): print(res.posix.dumps(i)) else: print("No result!") """ b'JLVUSGJZ' b'Enter the password: ' b'' """
defsuccess(state): output = state.posix.dumps(1) # get output from stdout returnb"Good Job."in output
defabort(state): output = state.posix.dumps(1) # get output from stdout returnb"Try again."in output
simu.explore(find=success, avoid=abort) if simu.found: res = simu.found[0] for i inrange(3): print(res.posix.dumps(i)) else: print("No result!") """ b'OHYJUMBE' b'Enter the password: Good Job.\n' b'' """
if simu.found: res = simu.found[0] solu0 = res.solver.eval(passwd0) # you can also use init_state.regs.eax replace passwd0 solu1 = res.solver.eval(passwd1) solu2 = res.solver.eval(passwd2)