MCPcopy Create free account
hub / github.com/HexHive/NASS / setup

Method setup

tools/gef.py:9104–9123  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

9102 return
9103
9104 def setup(self) -> None:
9105 ok("Tracking malloc() & calloc()")
9106 self.bp_malloc = TraceMallocBreakpoint("__libc_malloc")
9107 self.bp_calloc = TraceMallocBreakpoint("__libc_calloc")
9108 ok("Tracking free()")
9109 self.bp_free = TraceFreeBreakpoint()
9110 ok("Tracking realloc()")
9111 self.bp_realloc = TraceReallocBreakpoint()
9112
9113 ok("Disabling hardware watchpoints (this may increase the latency)")
9114 gdb.execute("set can-use-hw-watchpoints 0")
9115
9116 info("Dynamic breakpoints correctly setup, "
9117 "GEF will break execution if a possible vulnerabity is found.")
9118 warn(f"{Color.colorify('Note', 'bold underline yellow')}: "
9119 "The heap analysis slows down the execution noticeably.")
9120
9121 # when inferior quits, we need to clean everything for a next execution
9122 gef_on_exit_hook(self.clean)
9123 return
9124
9125 def dump_tracked_allocations(self) -> None:
9126 global gef

Callers 1

do_invokeMethod · 0.95

Calls 8

TraceFreeBreakpointClass · 0.85
infoFunction · 0.85
warnFunction · 0.85
gef_on_exit_hookFunction · 0.85
colorifyMethod · 0.80
okFunction · 0.70

Tested by

no test coverage detected