[michaelv.org - cooler than triangles!][michaelv.org - cooler than triangles!]

Magnetic Stripe Reading

I bought a USB magnetic stripe reader off eBay for a fantastic deal of $25.50 shipped, brand new. More specifically, the three track version of this series. Whenever a card with a magnetic stripe is swiped, the card data is "typed" into my computer as if typed on the regular keyboard.

I've written a small program that when run installs a Windows hook to intercept key data. I configured my stripe reader to start all returned data with ASCII 127 so that I can pick it out from normal keypresses. The result is that my program will detect a card swipe and if the card is a driver's license (following AAMVA format) or a credit/debit card, display all the information nicely formatted in a window. You can download this with source here.

The program creates an icon in the system tray. Right clicking the icon exits the program and left clicking shows the information window if you closed it. When a driver's license is swiped, the program automatically launches a browser window that shows the Google maps satellite photo of the person's house. It's very creepy.