Wacko Images

import numpy as np
from PIL import Image
from Crypto.Util.number import inverse
enc_image = Image.open('enc.png')
img = np.array(enc_image)
a, b, c = img.shape
key = [41, 37, 23]
for x in range(0, a):
for y in range(0, b):
pixel = img[x, y]
for i in range(0, 3):
pixel[i] = inverse(key[i], 251) * pixel[i] % 251
img[x, y] = pixel
flag = Image.fromarray(img)
flag.save('flag.png')actf{m0dd1ing_sk1llz}
Last updated
Was this helpful?