Skip to content

Instantly share code, notes, and snippets.

@kirkins
Last active January 31, 2019 04:13
Show Gist options
  • Save kirkins/256627c9a5a0765673f44e8dd48fbda9 to your computer and use it in GitHub Desktop.
Save kirkins/256627c9a5a0765673f44e8dd48fbda9 to your computer and use it in GitHub Desktop.
Starbucks bulk card checker
#!/usr/bin/env bash
echo ""
while IFS=, read -r CARD_NUMBER CARD_PIN
do
printf "$CARD_NUMBER "
wget -O - -o /dev/null https://www.starbucks.com/card/guestbalance --post-data="Card.Number=$CARD_NUMBER&Card.Pin=$CARD_PIN" \
| grep fetch_balance_value \
| grep -oP '\>\K[^</]+'
done < cards.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment