Skip to content

Instantly share code, notes, and snippets.

@nick3499
Created August 10, 2021 02:56
Show Gist options
  • Save nick3499/adbd18e72b858df7ec53f2e0484203e5 to your computer and use it in GitHub Desktop.
Save nick3499/adbd18e72b858df7ec53f2e0484203e5 to your computer and use it in GitHub Desktop.
Shell: exiftool, wget, cut, base64
#!/bin/zsh
# Get `cat.jpg` file and find the kidden key
#
# have only been able to get this to work inside the same directory where
# `exiftool` was installed
# in other words, both the `cat.jpg` file and this script must be
# stored in the `exiftool` directory for this to work
#
# get the `cat.jpg` file from picoctf.net
sudo wget https://mercury.picoctf.net/static/7cf6a33f90deeeac5c73407a1bdc99b6/cat.jpg
#
# grep the `License` key line
# cut the base64 hash from that grepped line
# pipe that base64 hash to `base64 -d` for the solution
METADATA="$(echo $(./exiftool cat.jpg | grep License) | cut -d' ' -f 3 | base64 -d)"
# print picoCTF key to terminal
echo $METADATA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment