MCPcopy Create free account
hub / github.com/JonathanSalwan/Triton / getFormatString

Function getFormatString

src/examples/python/hooking_libc.py:85–91  ·  view source on GitHub ↗
(addr)

Source from the content-addressed store, hash-verified

83
84
85def getFormatString(addr):
86 return getMemoryString(addr) \
87 .replace("%s", "{}").replace("%d", "{:d}").replace("%#02x", "{:#02x}") \
88 .replace("%#x", "{:#x}").replace("%x", "{:x}").replace("%02X", "{:02x}") \
89 .replace("%c", "{:c}").replace("%02x", "{:02x}").replace("%ld", "{:d}") \
90 .replace("%*s", "").replace("%lX", "{:x}").replace("%08x", "{:08x}") \
91 .replace("%u", "{:d}") \
92
93
94# Simulate the strlen() function

Callers 1

printfHandlerFunction · 0.70

Calls 1

getMemoryStringFunction · 0.70

Tested by

no test coverage detected