Skip to content

Instantly share code, notes, and snippets.

@bonprosoft
Last active October 20, 2019 09:00
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 bonprosoft/3dba4e4c499a2b1c5b84d6291b1ddcee to your computer and use it in GitHub Desktop.
Save bonprosoft/3dba4e4c499a2b1c5b84d6291b1ddcee to your computer and use it in GitHub Desktop.
SECCON 2019 Online CTF: sandstorm
import cv2
import numpy
image = cv2.imread('./sandstorm.png')
height, width = image.shape[:2]
new_height = height // 8
new_width = width // 8
new_image = numpy.zeros((new_height, new_width, 3))
for h in range(0, new_height):
for w in range(0, new_width):
new_image[h][w] = image[h*8][w*8]
cv2.imwrite('key.png', new_image)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment