Skip to content

Instantly share code, notes, and snippets.

@aivarsk
Last active May 7, 2025 16:37
Show Gist options
  • Save aivarsk/3e543544f9f3331f891b55d960bc9432 to your computer and use it in GitHub Desktop.
Save aivarsk/3e543544f9f3331f891b55d960bc9432 to your computer and use it in GitHub Desktop.
solve_me() for Python3.11+
def solve_me(solution):
res = solution()
del res
if res:
print("Solved")
solution = lambda: [
g.write(b"\x09\x09\x09\x09")
for x, y, g in [
(x, y.find(globals()["solve_me"].__code__._co_code_adaptive), g)
for x, y, g in [
(x, g.read(y - x), g)
for x, y, g in [
(int(x[0], 16), int(x[1], 16), open("/proc/self/mem", "r+b"))
for x in [
x[0].split("-")
for x in [x.split(" ") for x in open("/proc/self/maps")][:-1]
if "w" in x[1]
]
]
if g.seek(x)
]
]
if y != -1 and g.seek(x + y + 18)
]
solve_me(solution)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment