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

Method stop

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

Source from the content-addressed store, hash-verified

4049 return
4050
4051 def stop(self) -> bool:
4052 reset_all_caches()
4053 msg = []
4054 ptr, addr = gef.arch.get_ith_parameter(self.num_args)
4055 addr = lookup_address(addr)
4056
4057 if not addr.valid:
4058 return False
4059
4060 if addr.section.is_writable():
4061 content = gef.memory.read_cstring(addr.value)
4062 name = addr.info.name if addr.info else addr.section.path
4063 msg.append(Color.colorify("Format string helper", "yellow bold"))
4064 msg.append(f"Possible insecure format string: {self.location}('{ptr}' {RIGHT_ARROW} {addr.value:#x}: '{content}')")
4065 msg.append(f"Reason: Call to '{self.location}()' with format string argument in position "
4066 f"#{self.num_args:d} is in page {addr.section.page_start:#x} ({name}) that has write permission")
4067 push_context_message("warn", "\n".join(msg))
4068 return True
4069
4070 return False
4071
4072
4073class StubBreakpoint(gdb.Breakpoint):

Callers

nothing calls this directly

Calls 8

reset_all_cachesFunction · 0.85
lookup_addressFunction · 0.85
push_context_messageFunction · 0.85
is_writableMethod · 0.80
read_cstringMethod · 0.80
colorifyMethod · 0.80
joinMethod · 0.80
get_ith_parameterMethod · 0.45

Tested by

no test coverage detected