traces.add(x) if len(traces) >= max_subtraces: break sys.stdout.flush() print "\t"+rclass if __name__ == "__main__": prog = sys.argv[1] ignored_mods = None if len(sys.argv) == 3: ignored_mods = readmodfile(sys.argv[2]) elif len(sys.argv) > 3 or len(sys.argv) < 2: sys.exit(-1) elf = ELF(prog) extract_raw_static_features(elf, 100) #if ignored_mods is not None: # elf._populate_libraries_ldd() # libs = filter(lambda mod: not (any(map(lambda l: l in mod, ignored_mods))), elf._libs.keys()) # #print libs # for lib in libs: # elf = ELF(lib) # extract_raw_static_features(elf, 1000)
width = options.width csvfile = sys.stdout os.chdir(GetDir(testcase)) program = GetCmd(None) os.chdir("crash") timeout = options.timeout envs = dict() args = GetArgs() files = GetFiles() # modules to include or ignore included_mods = readmodfile(incmodfile) ignored_mods = readmodfile(ignmodfile) original_inputs = RandomInputMutator(args + files, NullMutator) expanded_input_generator = RandomInputMutator(args + files, RandomExpanderMutator) mutated_input_generator = RandomInputMutator(args + files, RandomByteMutator) app = Process(program, envs, timeout, included_mods, ignored_mods, no_stdout=not show_stdout)
print r + " .", traces.add(x) if len(traces) >= max_subtraces: break sys.stdout.flush() print "\t" + rclass if __name__ == "__main__": prog = sys.argv[1] ignored_mods = None if len(sys.argv) == 3: ignored_mods = readmodfile(sys.argv[2]) elif len(sys.argv) > 3 or len(sys.argv) < 2: sys.exit(-1) elf = ELF(prog) extract_raw_static_features(elf, 100) #if ignored_mods is not None: # elf._populate_libraries_ldd() # libs = filter(lambda mod: not (any(map(lambda l: l in mod, ignored_mods))), elf._libs.keys()) # #print libs # for lib in libs: # elf = ELF(lib) # extract_raw_static_features(elf, 1000)
width = options.width csvfile = sys.stdout os.chdir(GetDir(testcase)) program = GetCmd(None) os.chdir("crash") timeout = options.timeout envs = dict() args = GetArgs() files = GetFiles() # modules to include or ignore included_mods = readmodfile(incmodfile) ignored_mods = readmodfile(ignmodfile) original_inputs = RandomInputMutator(args + files, NullMutator) expanded_input_generator = RandomInputMutator(args + files, RandomExpanderMutator) mutated_input_generator = RandomInputMutator(args + files, RandomByteMutator) app = Process(program, envs, timeout, included_mods, ignored_mods, no_stdout=not show_stdout) prt = TypePrinter("/dev/stdout", program) # unchanged input null_mutt, original_input = original_inputs.next() original_events = app.getData(prepare_inputs(original_input)) if original_events is None: