simonitor

For privacy reasons, I use prepaid debit cards instead of credit cards. Right now, I mostly use Simon gift cards.

Like most prepaid card web sites, Simon’s can show your card’s balance and transaction history in real time. However, it’s a little tedious to navigate the site and enter the card number and CCV each time. So, I automated it.

simonitor.sh is a shell script that fetches the available balance, expiration date, and address (if registered) for one or more Simon gift cards. It uses curl to POST each card number and CCV to Simon’s web site, then handles the cookies, follows links, and screen scrapes the resulting HTML.

Here’s an example run:

$ simonitor.sh 9999012345789/123 8888012345789/456#uber
Enter the captcha string: ABC123
99990123456789/123: $232.67, expires 08/2008
                    Joe Bob  Mountain View, CA 94043 650-123-4567
88880123456789/456#uber: $39.91, expires 12/2008
                    Jimmy J  Mountain View, CA 94043 650-321-7654

Simon uses a CAPTCHA to discourage bots. This script displays the CAPTCHA image to the user, asks them for its text, and passes that text back to the site.

It also supports comments, e.g. the #uber after the second card. I store my active cards in a file and use a command line like simonitor.sh `cat my_cards`, so I use comments to remind myself of cards set up with specific services.

Naturally, Simon tweaks their web site every now and then, which breaks this script. When they do, I’ve found the Live HTTP Headers Firefox plugin indispensable for capturing the actual requests and POST data sent over the wire.

I briefly considered writing a Greasemonkey script, but I have a small brain, and the shell script was simpler and didn’t need a browser.

simonitor.sh is in the public domain.

Leave a Reply

Your email address will not be published.