Archive for January, 2009

Cracking Captcha in Javascript!

Cracking captcha in Javascript: Yes you read it right :)   Now it is proved that captcha can be cracked by writing an OCR engine using Neural Nets in Javascript.

ShaunF has written a GreaseMonkey script that automatically solves the captcha provided by the site Megaupload.

Click here to check out the online demo of this hack.

John Resig dissects the neural network Javascript OCR captcha code and explained how the hack works.

  1. The HTML 5 Canvas getImageData API is used to get at the pixel data from the Captcha image. Canvas gives you the ability to embed an image into a canvas (from which you can later extract the pixel data back out again).
  2. The script includes an implementation of a neural network, written in pure JavaScript.
  3. The pixel data, extracted from the image using Canvas, is fed into the neural network in an attempt to divine the exact characters being used – in a sort of crude form of Optical Character Recognition (OCR).

On the related note,  sometime back I’ve written a post on  “Is Captcha Secure?”

Now it is proved that Captcha isn’t Secure.  Thanks to ShaunF for his amazing piece of Javascript code :)

Naveen. V

Leave a Comment

JQuery1.3 released

Few months back I’ve started using JQuery whenever I handle any client-side code. I was pleased with the way it worked and has written a post “JQuery Rocks“.

Today John Resig team has done a major release of JQuery 1.3. The major features of this release are

  • Sizzle: A sizzlin’ hot CSS selector engine.
  • Live Events: Event delegation with a jQuery twist.
  • jQuery Event Overhaul: Completely rewired to simplify event handling.
  • HTML Injection Rewrite: Lightning-fast HTML appending.
  • Offset Rewrite: Super-quick position calculation.
  • No More Browser Sniffing: Using feature detection to help jQuery last for many more years to come.

The full details of this release can be seen here and the JQuery minified code can be downloaded here

You can hit “http://api.jquery.com” to see the latest JQuery and JQuery UI documentation. It has the live running examples and the links to edit and experiment with the code examples given.

Also most importantly, this API site is also available offline as Adobe AIR application. Click here to download and install AIR API browser.

I’m really excited to try out the new features in the release. If time permits ;) I will be playing with JQuery in the next couple of days and will try to integrate it in my existing codebase.

Leave a Comment