Skip to content

cjmielke/secret.sloth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

secret.sloth

Minimal code example for that CTF task that drove you insane

alt text

  1. Use Google lens or tineye to find the original unmodified image 2: Use this code
orig=Im.open('secret-sloth.png')
sloth = np.asarray(sloth)[:,:,:3].astype(int)

orig=Im.open('iHCQX6p.png')         # original sloth image found on reddit
orig = np.asarray(orig).astype(int)

# compute FFT for the original sloth image, and the one with the secret message
origfft=np.fft.fft2(orig)
slothfft=np.fft.fft2(sloth)

# Now the magic! We subtract the spectra of the original sloth from the secret sloth, 
# leaving behind just the spectral components that contain the message
out = abs(np.fft.fft2(slothfft-origfft))
out = abs(slothfft-origfft)

# normalize
out=(out+out.min())
out/=out.max()

ax.imshow(10*out)

alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published