31 Dec 2011

Breaking Aljazeera’s CAPTCHA

No Comments Projects, Web

I was on Aljazeera Arabic’s website the other day and, as I was voting on a poll, was presented the following screen:

The CAPTCHA in the screen above immediately caught my attention. The distortions in it seemed very simple, the text was not warped in any form and no overlap between characters.

The following is a URL for one of the CAPTCHAs:

http://www.aljazeera.net/Portal/KServices/Controles/SecureCAPTCHA/
GenerateImage.aspx?Code=EANmyyXghpajFhOX6rCRKQ==&Length=4

Opening the URL above and refreshing the page a few times gives the following CAPTCHAs:







The dashed grey lines are randomized, while the letters in the CAPTCHAs above are static. The letters are encoded in the Code parameter in the URL. Notice that there are two forms for each character; a straight form and another that is slightly rotated.

Aljazeera’s CAPTCHA can easily be broken by doing the following:

  1. Removing the dashed grey lines
  2. Finding the characters in the image
  3. Separating the characters in the image
  4. Classifying each character

I’ll be using Octave/Matlab for the above tasks and will be explaining my algorithm using the following CAPTCHA as an example.

Read more

26 Sep 2011

Interning at TellApart

2 Comments Rants

My Summer this year was unique in many ways. It was the first time I ever see the Pacific, the North American West Coast, California, and the San Francisco Bay Area. It was also the coldest Summer I ever experienced, having to wear a sweater on most nights. Apparently, this is the “normal” San Francisco Summer. More importantly though, was my Summer internship at TellApart.

TellApart is the fourth company I join for an internship and, over the course of sixteen weeks, my internship at TellApart grew to become the most rewarding and memorable internship I have experienced so far.

One of my main goals in joining TellApart was to experience the startup culture in Silicon Valley. TellApart has a very open and transparent culture; every member of the team knows about everything that goes on in the company. The team, aside from being super-talented, is always willing to listen to ideas, comments and suggestions (even from the intern!) A big portion of my internship was spent working on ideas that I proposed myself, and I started working on them within a week of proposing them!

Being a small company, it was very insightful to see the company evolve over a period of 16 weeks. Read more

13 Aug 2011

El-Tetris in HTML5. See it in action!

No Comments Projects, Web

Following up on my previous post on the El-Tetris algorithm, a Tetris player that clears 16 million rows on average per Tetris game, I thought I would provide an implementation, rather than just a description of the algorithm.

This algorithm is implemented fully in Javascript and the rendering is done in HTML5 canvas. The rendering is purely for cosmetic reasons (so you can actually see how the game is progressing). If you’re only interested in the final score, you can choose to speed up the game by enabling “Hardcore Mode”. In that mode, rendering the board will be disabled and the algorithm will run continuously in the background. You can also change the size of the board; the smaller the board, the shorter the game.

Full source code can be found here.

Note: For faster execution, use Google Chrome.