xct's notes
Search…
CTF
The more obscure crypto stuff goes here

Decode Flag from Long

1
from Crypto.Util.number import long_to_bytes
2
3
m = ...
4
print(long_to_bytes(m))
Copied!

Subtract 2 Images (similar to xor)

1
from PIL import Image, ImageChops
2
3
i1 = Image.open('1.png')
4
i2 = Image.open('2.png')
5
6
iFlag = ImageChops.add(ImageChops.subtract(i2, i1), ImageChops.subtract(i1, i2))
7
iFlag.show()
Copied!
Last modified 8mo ago