Skip to content

Instantly share code, notes, and snippets.

@goelp14
Created January 7, 2021 05:27
Show Gist options
  • Save goelp14/9c5810894045813b22ede6a2eca4e23d to your computer and use it in GitHub Desktop.
Save goelp14/9c5810894045813b22ede6a2eca4e23d to your computer and use it in GitHub Desktop.
from pwn import *
saveNotebook = []
r = remote('<TCP-URL-HERE-NO-TCP://-INCLUDED>', <PORT>)
r.recvuntil('rounds?\n\n') # Don't include any of the irrelevant beginning part of the connection
f = open("output.txt", "w+") # open file to save connection results
output = r.recvuntil('..> ') # since we are always going until we need to send something which is marked by '..>'
f.write(output.decode('utf-8')) # since all the results from connections are bytes decode it to normal string
# repeat until all 1000 wishes have been gathered
for i in range(999):
r.send(b'n\n')
output = r.recvuntil('..> ')
f.write(output.decode('utf-8'))
print(output) # check on console if its working
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment