Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@lttn1204
Created January 31, 2021 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lttn1204/ab61eb9194f395582e850279dab9d323 to your computer and use it in GitHub Desktop.
Save lttn1204/ab61eb9194f395582e850279dab9d323 to your computer and use it in GitHub Desktop.
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