Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Print containing function name for interesting functions #19

Merged
merged 1 commit into from
Apr 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions DriverBuddyReloaded/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
from datetime import date

import ida_nalt
import ida_funcs
import ida_segment
import idautils
import idc
from DriverBuddyReloaded.vulnerable_functions_lists.c import *
Expand Down Expand Up @@ -181,8 +183,10 @@ def get_xrefs(func_map, log_file):
code_refs = idautils.CodeRefsTo(int(address), 0)
for ref in code_refs:
# xref = "0x%08x" % ref
print("\t- Found {} at 0x{addr:08x}".format(name, addr=ref))
log_file.write("\t- Found {} at 0x{addr:08x}\n".format(name, addr=ref))
n = ida_funcs.get_func_name(ref) \
or ida_segment.get_segm_name(ida_segment.getseg(ref))
print("\t- Found {} in {} at 0x{addr:08x}".format(name, n, addr=ref))
log_file.write("\t- Found {} in {} at 0x{addr:08x}\n".format(name, n, addr=ref))


def get_driver_id(driver_entry_addr, log_file):
Expand Down