def main(): file_name = sys.argv[1] lines = [] f = open(file_name, "r") for line in f: lines.append(line) verify(parse_lines(lines)) f.close()
} # Decompile using Radare2. start = time.time() decompile_info = decompiler.decompile_binary(args.file, lifting_options.get("entry")) print("Decompiling took %7.5f seconds." % (time.time() - start)) # Lift into LLVM. start = time.time() module = lifter.lift_binary(decompile_info, args.file, lifting_options) print("Lifting took %7.5f seconds." % (time.time() - start)) # Verify? start = time.time() verifier.verify(module) print("Verifying took %7.5f seconds." % (time.time() - start)) # Create a temporary file to hold the LLVM results. if args.llvm_file != '': llvm_file = args.llvm_file f = open(llvm_file, 'w') else: f = tempfile.NamedTemporaryFile(mode='w', suffix='.ll') llvm_file = f.name f.write(str(module)) f.flush() # Construct a command line to invoke seahorn based on arguments. if args.solver == 'chc': cmd = 'sea pf --bv-chc --inline'