def check_bugs(arg_funcs): for func in arg_funcs: if not func['posted_results'] and func['task'].ready(): failed = func['task'].failed() func['result'] = func['task'].get(propagate=False) # Can't serialize a task task = func.pop('task') if use_elastic: small_func = get_small_function(func) eh.import_item(es, eh.function_index, small_func) if failed: func['result'] = None elif func['result']: print_function(func) make_exploit(func) func['task'] = task func['posted_results'] = True return arg_funcs
def check_bugs(arg_funcs): for func in arg_funcs: if not func['posted_results'] and func['task'].ready(): failed = func['task'].failed() func['result'] = func['task'].get(propagate=False) # Can't serialize a task task = func.pop('task') if use_elastic: small_func = get_small_function(func) eh.import_item(es, eh.function_index, small_func) if failed: func['result'] = None elif func['result']: print("\nFound {} in {} in {}".format( func['result']['type'], func['result']['func_name'], func['result']['file_name'])) if use_elastic: eh.import_item(es, eh.vulnerability_index, func) func['task'] = task func['posted_results'] = True return arg_funcs