-
-
Save goelp14/9c5810894045813b22ede6a2eca4e23d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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