Wednesday, October 21, 2009

The Man: 1, Mike: 0 (but maybe you can help)

(for how to help, skip to the end)

My friend Michael had a recent vendetta against The Man (Southwest Airlines, in this case). They bumped him from a flight and gave him a $350 travel voucher in return. He wrote down the number and threw away the paper, happily dreaming of trips to exotic locations.

There was just one small problem: he only wrote down one number—the voucher number. Turns out that you also need the security code, or your voucher number is useless. He contacted Southwest, and they said they couldn't help him. Rather than give up, though, he vowed to try all 9999 possible security codes at Southwest's web site until he found the right one. He estimated that after 25 days he'd have a 50% chance of finding the right one.

I saw Mike's blog entry about his fight, and as one who detests The Man as much as the next guy, I took pity on him. No, I didn't start spending my free time entering numbers at; instead, I wrote a computer program to enter them for me.

The robot

After a bit of work, I had created a robot that would go through the booking process on Southwest's web site all the way to the point where you enter the voucher number. Over the course of a few hours (while I slept last night), it tried all 9999 four-digit security codes.

Unfortunately, I discovered when I woke up this morning that none of the security codes had worked. None of them. (On the bright side, at least Mike didn't have to spend 50 days entering numbers manually, only to discover that none had worked.)

What went wrong?

There are a few possible reasons why it didn't work:
  1. Mike wrote down the wrong voucher number.
  2. The security code format isn't a 4-digit number.
  3. There's a bug in my program.
Reason #1 is a lost cause. If that's the real explanation, there's no hope.

Reason #2 seems possible, but Southwest's booking site, as well as pages found by Googling, lead me to believe that it is, in fact, a four-digit numeric code. (Anybody know for sure?)

How to help

So that leaves Reason #3: I messed up. However, you can help me debug my program. I need two things:
  1. If you're a programmer, you can take a look at my program and let me know if you find any bugs.
  2. If you have a Southwest voucher number and security code, you could let me test my program with them. (I promise I won't steal your flight...)
If you're a Python programmer, feel free to take a look at (Warning: really ugly quick-and-dirty code. Also, you'll need mechanize to run it.)

Because I don't have a working voucher number/security code combination, I can't be 100% sure that my program will recognize a correct combination. I'm pretty confident that it works, but I can't be sure unless I test it with a real voucher number/security code pair. If you too want to get back at The Man, and you're willing to let me try your voucher number (not to buy a ticket, just to validate my program), drop me a line. Thanks!


jacob said...

I performed a similar effort with the universal remote that I was trying to get to work with my really obscure brand of TV. 001, 002, 003, 004...

It only took a few hours to find a code that reasonably worked: 191.

kt said...

Maybe the code is alphanumeric? That would not surprise me and would explain why it didn't work...

Bruce said...

I thought it might be alphanumeric, but all of the examples and documentation I've found online indicate that it's numeric only. Plus, entering an alphanumeric code produces a different type of error message than entering an incorrect numeric code (the same type as entering a too-short voucher number, or leaving the security code blank).

The good news is that I don't have to go through the other 1,669,617 or so possible alphanumeric codes that I haven't tried yet. :) That would take about 34 days.