示例#1
0
def async_get_funcs(file_name, use_ghidra=True):

    if use_ghidra:
        ret_list = gh.get_function_information(file_name)
    else:
        ret_list = fh.get_function_information(file_name)
    for func in ret_list:
        func['file_name'] = file_name
    return ret_list
示例#2
0
def get_vulnerabilities(file_name, ld_path):
    print("[+] Recovering Function Prototypes")
    if use_ghidra:
        arg_funcs = gh.get_function_information(file_name)
    else:
        arg_funcs = fh.get_arg_funcs(file_name)
    for func in arg_funcs:
        func['file_name'] = file_name

    arg_funcs = fix_functions(arg_funcs)
    print("[+] Analyzing {} functions".format(len(arg_funcs)))

    return get_bugs_from_functions(arg_funcs, ld_path)
def get_vulnerabilities(file_name, ld_path):
    print("[+] Getting argument functions")
    if use_ghidra:
        arg_funcs = gh.get_function_information(file_name)
    else:
        arg_funcs = fh.get_arg_funcs(file_name)
    for func in arg_funcs:
        func['file_name'] = file_name

    arg_funcs = fix_functions(arg_funcs)
    #arg_funcs = [x for x in arg_funcs if 'mtd_write_firmware' in x['name']]
    print("[+] Analyzing {} functions".format(len(arg_funcs)))

    return get_bugs_from_functions(arg_funcs, ld_path)