Skip to content

Instantly share code, notes, and snippets.

@jeswinsimon
Created May 28, 2019 03:42
Show Gist options
  • Save jeswinsimon/451c52450a2a0caab59dac99dc96662e to your computer and use it in GitHub Desktop.
Save jeswinsimon/451c52450a2a0caab59dac99dc96662e to your computer and use it in GitHub Desktop.
Find the smallest integer where the SHA256 hash of 'catch-me-if-you-can'+integer will start with 9 zeroes.
#!/bin/bash
counter=1
key=catch-me-if-you-can
value=0
while [[ $value != 000000000* ]]
do
value=$(echo -n $key+$counter | shasum -a 256)
echo $counter
echo $value
((counter++))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment