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

Method pprint

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

Source from the content-addressed store, hash-verified

5219 return self.name
5220
5221 def pprint(self) -> None:
5222 res = []
5223 for _name, _type in self.class_type._fields_:
5224 size = ctypes.sizeof(_type)
5225 name = Color.colorify(_name, gef.config["pcustom.structure_name"])
5226 type = Color.colorify(_type.__name__, gef.config["pcustom.structure_type"])
5227 size = Color.colorify(hex(size), gef.config["pcustom.structure_size"])
5228 offset = Color.boldify(f"{getattr(self.class_type, _name).offset:04x}")
5229 res.append(f"{offset} {name:32s} {type:16s} /* size={size} */")
5230 gef_print("\n".join(res))
5231 return
5232
5233 def __get_structure_class(self) -> Type:
5234 """Returns a tuple of (class, instance) if modname!classname exists"""

Callers 1

do_invokeMethod · 0.80

Calls 5

gef_printFunction · 0.85
colorifyMethod · 0.80
boldifyMethod · 0.80
joinMethod · 0.80
sizeofMethod · 0.45

Tested by

no test coverage detected