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

Method do_invoke

tools/gef.py:9045–9064  ·  view source on GitHub ↗
(self, _: List[str])

Source from the content-addressed store, hash-verified

9043 _aliases_ = ["fmtstr-helper",]
9044
9045 def do_invoke(self, _: List[str]) -> None:
9046 dangerous_functions = {
9047 "printf": 0,
9048 "sprintf": 1,
9049 "fprintf": 1,
9050 "snprintf": 2,
9051 "vsnprintf": 2,
9052 }
9053
9054 nb_installed_breaks = 0
9055
9056 with RedirectOutputContext(to="/dev/null"):
9057 for function_name in dangerous_functions:
9058 argument_number = dangerous_functions[function_name]
9059 FormatStringBreakpoint(function_name, argument_number)
9060 nb_installed_breaks += 1
9061
9062 ok(f"Enabled {nb_installed_breaks} FormatString "
9063 f"breakpoint{'s' if nb_installed_breaks > 1 else ''}")
9064 return
9065
9066
9067@register

Callers

nothing calls this directly

Calls 3

okFunction · 0.70

Tested by

no test coverage detected