Created
August 16, 2019 13:32
-
-
Save realsung/4b18c6543a60fd26f381943119a652c3 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 * | |
from ast import literal_eval | |
p = remote('218.158.141.182',52387) | |
for i in range(100): | |
payload="" | |
print p.recvuntil('Step : ' + str(i+1) + "\n\n") | |
text = p.recvline() | |
text = list(text) | |
del(text[-1]) | |
heigth = p.recvline() | |
table = p.recvline() | |
table = table[9:] | |
dictionary = literal_eval(table) | |
value = list(dictionary.keys()) | |
while len(text) != 0: | |
for i in range(1,5): | |
tmp = text[:i] | |
tmp2 = ''.join(i for i in tmp) | |
for j in range(5): | |
if tmp2 == dictionary[value[j]]: | |
payload += value[j] | |
del text[:i] | |
print payload | |
p.sendline(payload) | |
p.interactive() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment