[OS X] Install Pwntcha

Pwntcha is an open source tool for breaking CAPTCHAs. While it is a few years old and only works for very simple CAPTCHAs, it’s still and interesting project and would be a good place to start if you wanted to write a program to break more complex ones. To install it on OS X:

  1. Install the Simple DirectMedia Layer library: From Terminal and with MacPorts installed, type
    sudo port install libsdl_image

    As an alternative, installing imlib2 would probably also work.

    I encountered an error installing db46, one of the dependencies of libsdl and imlib2, which I fixed by installing the Java for Mac OS X 10.6 Update 3 Developer Package.

  2. Check out a copy of Pwntcha via SVN:
    svn co svn://svn.zoy.org/caca/pwntcha/trunk pwntcha
  3. Compile:
    cd pwntcha
    sudo make install
  4. Lastly, run the program:
    curl -O http://hactheplanet.com/blog/wp-content/uploads/2011/01/authimage.jpeg
    pwntcha authimage.jpeg

The image is analyzed to be 5Z28AF.

This entry was posted in Uncategorized and tagged , , , . Permalink.

6 Responses to [OS X] Install Pwntcha

  1. Mark says:

    Hello! Thanks for taking the time to post this. I ran into a couple problems though, wondering if you could enlighten me.

    One (this one I figured out): There’s no ‘configure’ file included in the svn download. Before running ‘./configure’, I had to run ‘./bootstrap’, which created the configure file.

    Secondly (I didn’t figure this one out): I used the example image from your blog, but wen I ran ‘pwntcha authimage.jpg’ I received the output:

    pwntcha: image size 155×50, 196 colours
    pwntcha: probably an authimage captcha
    pwntcha: cannot load font share/authimage/font.png

    I also tried running another image, with a more standard font, and simply received the output:

    pwntcha: image size 71×21, 3 colours
    pwntcha: probably a scode/trencaspammers captcha

    So it seems like it’s reading it alright, but it’s not making any guesses as to what the characters are. Maybe I’m missing something simple?


    • Mark says:

      To add to the previous comment, there is always an empty line after the outputs, before the prompt for the next command (like pwntcha is guessing a blank image with no characters, and simply a newline).

      Not sure if that helps or even makes any sense. Perhaps I need to create / install / do something with a font or something? No idea.

    • hac says:

      Thanks for finding the step that I missed, and thanks for waiting. Here’s the solution to your problem:

      All the fonts are shared in the pwntcha/src directory. If you run pwntcha from within the build directory, then it will have no problem finding them. I think you changed directories, which is why it can’t find them.

      You need to do something like this:

      pwntcha authimage.jpeg -s ~/pwntcha/src

      To see why:

      pwntcha --help
  2. Fran says:

    i tried to use your rssFeed but it shows me some Xml errors…

  3. Anon says:

    Hello, when im trying this example I’m getting: cannot load image xx.jpg
    Anyone help?

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>