CatSpam: An Innovative Approach to Spam

I often come up with programming ideas as I’m trying to fall asleep and, more often than not, this forces me out of bed to start some silly work. About a year ago I had an idea: Would it be possible to create a script to text friends, family and/or strangers with some form of spam. For some reason I landed on the innocuous topic of feline facts and got right to work.

My first idea was to use the email system that has been in place for some time now to send the text messages. However, this requires me to know what network the phone is on and that’s a problem I wasn’t interested in dealing with. Then I remembered Google Voice… For the uninitiated, anyone with a Google account can now get an additional phone number, free of charge. You can configure Google Voice to forward your calls to whichever phones you chose while keeping your primary phone number concealed.

Python, being one of my favorite languages was the clear choice for this task. It turns out that Google has no public API for their Google Voice service. Thankfully, some pro programmers have created Google Voice libraries for a handful of languages, including Python. I used pygooglevoice which ended up being a pleasure to work with. The program prompts the user for their Google login (which is securely handed off to Google for verification) and then asks the user for the phone number they would like to send spam to. Also configurable is a time interval in which the texts will be sent. The cat facts are read from a file located in the same directory and, in theory, could be replaced with any text file in the same format.

Enough about the program – here it is:

If you’re interested in the actual catfacts.txt file you can check it out here: catfacts.txt

Here are packaged executables for Windows and OSX – make sure you have a catfacts.txt file in the same directory as the executable or the app will crash!