Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from pwn import *
ct=[]
def byte_xor( ba1, ba2):
return bytes([_a ^ _b for _a, _b in zip(ba1, ba2)])
for i in range(10):
p=connect('161.97.176.150' ,'3167')
rev=p.recvline().decode()[:-1]
rev=bytes.fromhex(rev)
if rev not in ct:
ct.append(rev)
for cipher in ct:
block1=b'}' + bytes([15])*15
encryptIV=byte_xor(block1,cipher[0:16])
for i in ct:
print(byte_xor(encryptIV,i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment