def main(): args = parse_arguments() m = Manticore(args.programs[0], args.programs[1:]) m.policy = args.policy m.args = args if args.workspace: m.workspace = args.workspace if args.profile: m.should_profile = args.profile if args.dumpafter != 0: m.dumpafter = args.dumpafter if args.maxstorage != 0: m.maxstorage = args.maxstorage if args.maxstates != 0: m.maxstates = args.maxstates if args.coverage: m.coverage_file = args.coverage if args.names is not None: m.apply_model_hooks(args.names) if args.procs: m.workers = args.procs if args.env: for entry in args.env: name, val = entry[0].split('=') m.env_add(name, val) if args.assertions: m.load_assertions(args.assertions) if args.verbose: m.verbosity = 4 else: m.verbosity = 1 logger.info('Loading program: {}'.format(args.programs)) logger.info('Workspace: {}'.format(m.workspace)) m.run(args.timeout) m.dump_stats()
#!/usr/bin/env python import sys from manticore import Manticore # This example demonstrates loading a simple binary in Manticore, # running it to completion without any callbacks or instrumentation # and producing basic information about the paths explored if __name__ == '__main__': path = sys.argv[1] # Create a new Manticore object m = Manticore(path) # Start path exploration. start() returns when Manticore # finishes m.run() # Print high level statistics m.dump_stats()