Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pwn import *
- printable = [chr(i) for i in range(32, 255)]
- # ^FBi\*PpUDA-\,[l`.1qTUPg`.10_QgcckJ^]VQ_cP0tZd6_TWRaQU5_[Dc2VS';
- a = 'hacktoday{ '
- goal = '''^FBi\*PpUDA-\,[l`.1qTUPg`.10_QgcckJ^]VQ_cP0tZd6_TWRaQU5_[Dc2VS';'''
- ind = 0
- if __name__ == '__main__' :
- r = remote('35.185.187.162', 17001)
- print(len(printable))
- while True:
- # print('--------------------------')
- text = r.recvuntil('kamu').decode().split(': basebox : ')[-1].split()[0]
- payload = a[:-1] + printable[ind]
- r.sendline(payload)
- print('payload =', payload)
- print('text =', text)
- print('potongan goal =',goal[:len(text)])
- print('index =', ind)
- if text == goal:
- break
- if text[:-2] == goal[:len(text) - 2]:
- a += printable[ind]
- ind = 0
- ind+=1
- if ind >= len(printable):
- ind = 0
- r.interactive()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement