raCAPTCHA ausgehebelt / antirecaptcha

download scientific paper

Auf Basis der Nachforschungen von Chad Houck und Jonathan Wilkins ist ein PHP-Skript entstanden, das die Bilder von reCAPTCHA erkennt. Dies wurde in ein Modul für das Programm jDownloader eingebunden.  Die Erfolgsquote liegt inzwischen bei 17% (basierend auf einem Test mit über 5000 Captchas), trotzdem sollte die ‘reconnect’-Funktion weiterhin benutzt werden. Bei jDownloader wird nach einigen fehlgeschlagenen Versuchen der Download auf “Fatal Error” gesetzt. Da hilft bisher nur ein manuelles “enable/resume”.

Das Skript selbst baut auf PHP v5 auf, benutzt zur Qualitätssteigerung eine Vergrößerung mittels hq2x und übergibt das so entzerrte und verbesserte Bild an die freie OCR-Software tesseract-ocr. Der Kontrast wird nun selektiv für jedes Wort angepasst, und zwar auf ein Verhältnis von weißen zu schwarzen Pixeln von 1.5 zu 1. Anschließend werden teilweise Artefakte durch einen primitiven Shärfe-Algorithmus entfernt. Das Wörterbuch von tesseract-ocr für Englisch wurde um 300.000 Einträge erweitert – ein sehr großes Wörterbuch basierend auf der englischen Ausgabe der gesamten Wikipedia vom 16.09.2010 wird mit Version 0.3a integriert.

Leider ist das Programm bisher nur unter Windows lauffähig, sollte aber mit ein wenig Sachverstand auch unter Linux zum Laufen gebracht werden – sei es nun unter Wine oder durch Ersetzen von PHP, hq2x und tesseract durch die entsprechenden Linux Versionen.

Update
Der Benutzer ‘estirwes’ vom offiziellen JDownloder-Forum hat eine Anleitung erstellt, um arc0.2f unter Linux zum Laufen zu bringen. Ich habe diese Methode noch nicht testen können, werde diese aber nach aller Voraussicht nach in das nächste Update mit einbauen.
/Update

Um das Modul zu jDownloader hinzuzufügen, muss das Archiv in den Ordner “*JDownloader-Installationsordner*” extrahiert werden. Zum Entpacken bieten sich 7-Zip oder WinRAR an.

Die Programmierer von jDownloader entwickeln gerade eine rein Java basierte Version. Sobald diese stabil läuft und eine gute Erkennungsrate bietet, wird dieses Projekt hier eingestellt.

Alle Programme, die hier verwendet wurden, sind unter copyrightfreien Lizenzen veröffentlicht worden, dies gilt auch für das Modul selbst.

Visual C Runtime 2008 wird benötigt!
Download v0.2f Mirror1

Download v0.2f Mirror2

Download v0.2f Mirror3

Download v0.2f Mirror4

Download v0.2f Mirror5


# anti-recaptcha v0.2f (c)opyleft 2010 http://wegeneredv.de/arc **************
# ****************************************************************************
# future fixes and changes:
# – gaining greater recognization rates by using wikipedia as wordlist
# – see included paper ‘antirecaptcha.pdf’ for further information or
# download it from http://wegeneredv.de/antirecaptcha.pdf
# – clean up source / replace repeating code by functions
# – convert to c++ using http://github.com/facebook/hiphop-php
#
# ****************************************************************************
# Installation:
# copy directly to your jDownloader installation directory (e.g.
# c:\program files\jDowloader and extract.
# -runs only on Windows systems-
#
# ****************************************************************************
# Changelog:
#
# v0.2f
# – seperated both words by 100px
# – cleaned up directories – thx for the help @marc
# (http://board.gulli.com/member/974202-marcelser/)
# – fixed empty outputs from tesseract, so no captcha popups anymore
# – updates from jDownloader should work again, no need to block them
#
# v0.2e
# – fixed some tesseract issues
#
# v0.2d
# – support for one-click hoster maintained, hotfile and others now work. you
# have to ignore the updates of jDownloader, because i had to made changes
# to the file ‘outdated.dat’. if this file is changed, jD tries to download
# an untampered version.
#
# v0.2c
# – applied selective contrast to both words
# – improved success rate to 17% by adding a bigger wordlist to tesseract
# – some hoster aren’t supported any longer due to plugin errors caused by jD
#
# v0.2b
# – removed intersection cleaning due to ineffectivity
# – added experimental sharpening
# – changed from VietOCR to tesseract
#
# v0.2a
# – pushed recognization rate to ca. 10%
# – multiple iterations to ocr (‘best match’)
# – partially cleaned intersections between letters
# – cleaned up sourcecode
# – added support for the following one-click-hoster:
# combozip.com,cramit.in,crazyupload.com,drop.io,enterupload.com,extabit.com,
# filebling.com,filechip.com,filescloud.com,fileserve.com,filesmonster.com,
# filesonic.com,filestab.com,filestrack.com,filevo.com,freakshare.net,
# free-share.ru,hatlimit.com,hidemyass.com,hostingcup.com,maknyos.com,
# mediafire.com,putshare.com,quickupload.com,slingfile.com,tgf-services.com
# uploadfloor.com
#
# v0.1b
# – changed the directory structure
#
# v0.1
# – first version tested
#
# known bugs:
# – none ;)

TwitterBlogger PostMister-WongDeliciousDiggFacebookShare

46 Responses to “raCAPTCHA ausgehebelt / antirecaptcha”

  1. [...] http://wegeneredv.de/arc/ [...]

  2. wie bekomme ich das Plugin unter Windows Server 2008 R2 zum laufen.
    Jedes mal stürtzt die CLI von PHP ab mit dem Verweis auf die php5ts.dll.
    Hab schon ne andere PHP-Version 5.3.3 und 5.3.2.

  3. Ich würde probieren, die 5.2.2 stable auszuprobieren, vielleicht hilft das. was genau für eine fehlermeldung kommt denn?
    http://windows.php.net/download/

  4. Danke.

  5. Great Job!
    Thank you. Waiting for next versión.

  6. Wow! Tolle Arbeit!!!!

    Funktioniert super! Hoffentlich wird die Erkennungsrate noch etwas besser. Aber ansonsten top!

    Kannst du auch oron.com mit einbauen????

  7. danke!
    oron sollte eigentlich funktionieren:

    jacinfo.xml:

    (...)services="365files.com;bitshare.com;combozip.com;cramit.in;cramitin.eu;cramitin.net;cramitin.us;crazyupload.com;drop.io;easy-share.com;enterupload.com;extabit.com;filebling.com;filechip.com;filefactory.com;filter.net;filescloud.com;fileserve.com;filesmonster.com;filesonic.com;filestab.com;filestrack.com;filevo.com;freakshare.net;free-share.ru;hatlimit.com;hidemyass.com;hitfile.net;hostingcup.com;hotfile.com;ifile.it;loadfiles.in;maknyos.com;mediafire.com;oron.com;putshare.com;quickupload.com;slingfile.com;tgf-services.com;turbobit.net;uploaded.to;uploadfloor.com"(...)

  8. THX. It works. And might get better.

    I added

    imagejpeg($cropped_img,’MY_’ . date (“Y.m.d_His”) . ‘ OCR ‘ . $word_tess_text . ‘.jpg’);

    after line 809.

    This saves the captchas with the recognized two-word in the filename.

    (So I could inspect some of the results)

    1. Often words are completely recognized as numbers. Not good. I removed the numbers 0-9 from the white-list. I know this will miss some captchas, but enhances otherwise.

    2. Often there is only ONE word in the answer. The separation betweeen the two words is missed. Perhaps the bitmap should be divided right from the beginning and there should be a single OCR-run for each word. Putting the text together (concatenating) afterwards.

  9. thx for your suggestions

    ad 1) i thought about that too – maybe ill change tha in the next version

    ad 2) i tested this in v0.2e – tesseract didn’t recognize words shorter than 4 letters and therefore i had to put the images together again :-/

  10. Hi,

    I tried your current version. On one system it works like a charme. On the other one the output.txt is always “!§$%&@”. Does anyone knows where is the problem?

    Thank you

  11. I got it, vcredist2008 was needed.

  12. Any plans for a mac port? How difficult could it be? Can I help?

  13. The jDownloader Devs work on a Java Port

  14. Würde es helfen ein Wörterbuch speziell für reCaptcha zu erstellen? Es sind ja nicht alle Wörter der reCaptchas in Englisch und außerdem sind viele (wie ich meine) keine sinnvollen Wörter. Wie viele verschiedene Wörter benutzt eigentlich reCaptcha?

  15. da recaptcha, wie du schon richtig meintest, nicht nur mehr englische bücher scannt, müsste man ein riesiges wörterbuch haben – arbeite gerade an einem aus der englischen wikipedia – aber man müsste dann wohl alle sprachen nehmen :) viel rechenarbeit auf jeden fall

  16. OK, ich verstehe! Ein Wörterbuch manuell aus den Grafiken zu erstellen macht also keinen Sinn, da der Wortschatz viel zu groß ist. Kann ich dir helfen bei der Erstellung des Wörterbuches z.B. indem ich die anderssprachige Wikipedia durchsuche? Du hast doch sicher ein Skript, dass das automatisiert.

  17. [...] reCAPTCHA ausgehebelt / antirecaptcha [...]

  18. Danke an tiny, ich hatte auch das Problem mit “!§$%&@” in der output.txt.

  19. ¡¡Genial trabajo!
    Estaba harto de las dichosas captchas. Esperamos tus nuevas versiones.
    Gracias, danke.

  20. This new version released gives problems about HotFile, FileSonic and MediaFire. FileServe is perfect instead! HotFile and FileSonic have the countdown before of the request of ReCaptcha, maybe this is the problem. In FileServe, infact, there is the request of ReCaptcha before and after that begins the countdown! Maybe this can help, I hope so!!

  21. Hi,
    when will be work on linux?

    Thanks

  22. Sublime! Das Erhabene? Sublim?
    ;)

  23. Hi, for developer this plugin in MAC or Linux? It’s possible?

  24. Wow, works like a charm. Hopefully the java version would come out soon so that I could use it on my linux system. Thanks for the great work!

  25. Felicitaciones desde España, buen trabajo

    Herzlichen Glückwunsch aus Spanien, gute Arbeit

  26. YEAH!!!! GREAT Job…

    TNX 1k

    changed by admin – i dont allow these questions ;) , but the script can be adapted to other functions ;)

    thank you

  27. Works!!!! :D

  28. Gracias, lo probare para ver que tal.

  29. [...] Plugin JDownloader wegeneredv.de/arc/  por jsujar hace 2 segundos [...]

  30. [...] » noticia original [...]

  31. felicitaciones buen trabajo, sigue asi

  32. nice endlich wagt sich wer an recaptcha ran. aber noch ein paar anmerkungen dazu:

    1wort plus leerzeichen reicht völlig aus http://s7.directupload.net/file/d/2341/u6rhrnwr_jpg.htm als lösung reicht ” unienes” ich hoff das leerzeichen am anfang wird nicht geschluckt.

    wörterbuch?! warum reden alle immer von wörterbüchern, wie im bild unschwer zu erkennen ist, handelt es sich nur noch um phantasiewörter, wodurch ein wörterbuch in egal welcher sprache nichts bringen sollte.

    ka warum in der whitelist auch zahlen sind, wie jemand schon angesprochen hatte, besteht das lösungwort allein aus buchstaben. sollten zahlen, speziallzeichen oder ganz komische sachen im wort enthalten seien, ist es das wort das google auch nciht kennt, welches man ganz einfach mit leerzeichen ” ” beantworten kann.

  33. Its workin just fine. Bin hier schon vorn paar Tagen mit nem Lächeln angekommen.
    JD läuft fast ununterbrochen und im Bezug auf Fileserve hatte ich bestimmt ne Erfolgsquote von 98% (kein Scheiß)

    Gestern hab ich dann: http://jdownloader.org/news/blog/x20101106-135631recaptcha-anticaptcha-method entdeckt, allerdings ist es nicht mehr verfügbar. Das erinnert mich an die JD portable, der auch schon seit Monaten nicht mehr offiziel auf JD.org angeboten wird.

    Wie wird das in Zukunft laufen? Hat jemand Infos?

  34. No seas pelotudo flaco dejate de romper las pelotas con estas pelotudeces

  35. http://jdownloader.org/news/blog/x20101106-135631recaptcha-anticaptcha-method is wirklich down, warum weiß ich allerdings ned. aber das war eh das gleiche wie arc0.2f
    http://jdownloader.org/news/blog/x20101106-135631recaptcha-anticaptcha-method seems to be offline, dunno why. but was the same as arc0.2f

  36. Che anda de maravillas, te felicito.

  37. danke benjamin, absolut määchtiges skript, dass du da entwickelt hast!
    ich hoffe mal, es öffnet einigen firmen die augen wie unnütz und lästig dieser ganze captcha-mist ist!

  38. Mit der Anleitung von ‘estirwes’ aus dem JD-Forum und den Tipps von ‘gala’ hier in den Kommentaren läuft das Teil nahezu perfekt unter Ubuntu 10.10!
    Klasse Sache!!!

  39. Bei mir läuft das ganze nicht. Denke das liegt an der fehlenden jacinfo.xml
    Außerdem wäre ein Reupp sehr nett, da nur noch MU und Uploading online sind.
    Welche Einträge muss die Datei haben? Würde sie dann manuell erstellen.

  40. Hi Wegener,

    Can you tell me how to install this on MAC or Linux ?
    I used Jdownloader on that platform

    Appreciate if u can reply to my mail

    Thanks,

  41. Wurde die Entwicklung eingestellt? Wäre sehr schade :(

  42. a spanish team has taken over his work

  43. Hola, veo que es un proyecto bastante pesado y fuerte muchas gracias por tu aportación te ayudaria pero no se programar, pero si en alguna otra cosa puedo ayudarte con gusto hermano. Aqui estoy

    Saludos desde México.

    Hi, I see this is a greatest and biggest project, thank you very much for your effort and contribution, i want hep you but i dont programm, but if anything else I can help with taste brother. I’m here

    Greetings from México.

  44. Hi,
    wie bekomme ich das arc in JDownl. zum Laufen ?
    Es scheint nicht anzulaufen, da ich nirgendwo einen php-Script Start
    sehen kann und ich die Captures noch von Hand eingeben soll :-(
    System: xp
    PHP-Version: “No-Thread-Control” 5.3.6 bzw. 5.2.17 versucht
    Installation mit/ohne (other) CGI versucht
    arc entpackt & Verzeichnis ‘antirecaptcha’ verschoben
    nach C:\Programme\JDownloader\jd\captcha\methods\

    Greets, Tom

  45. Muchas gracias por el gran trabajo del equipo, estuve viendo que se actualizo el metodo de captcha y el script ya no sirve como antes, estuve haciendo pruebas y luego del 4 intento aprox. los caracteres son mucho mas legibles, espero que mi comentario sirva para mejorar algo.
    Saludos

  46. Nach der Installation willer immer noch die Captchas manuell eingeben lassen…

Discussion Area - Leave a Comment