Skip to content

Send Images to GSA Captcha Breaker from a Java Application

edited March 2013 in Need Help
Hi all, 

I have a Java application that will send images to GSA CB and catch the result, accessing(using Apache HTTP Client) the URL "http://<my_ip_address>/gsa_test.gsa". This is working fine, but i have some questions.

1 - ) Is that the correct way to do this, or has another solution that make me able to send images from a Java Application to GSA CB Program?

2 - ) In this process, how can I send a parameter telling CB to use a specific engine, like exists on the "CapBreak_CMD.exe" program in CB setup folder? (ex. when send a image, i need inform CB to use the engine "Wordpress (8 chars)").

3 - ) I saw that on Windows Start Menu, exists 3 shortcuts to 3 pdfs files (Documentation, Macro Guide and Script Language Documentation), but the files doesn't exists in my PC. Please, where can I download these files or any documentation about GSA CB like a user guide?

Thanks very much for all and I appologize for my poor english.

Congratulations to the GSA Captcha Breaker team.

Comments

  • SvenSven www.GSA-Online.de

    1) see the *.dpr file (pascal source) or simply use one of the supported captcha service apis (decaptcher or dbc). The later way let's you also use an captcha service in your java program if someone doesn't want to use CB.

    2) again see the dpr file.

    3) WOW thats a terrible mistake you found. That files have no use in CB but belong to Search Engine Ranker. Must have mixed up something on the setup. I remove that now for the nect version.

  • Hi Sven, tanks for reply.

    I will explain much better my problem and how i like to use CB.

    In my Lan, i have a machine A , with ip 192.168.0.101, that will running CB.
    Others machines, running a java application will access this machine A to send an image and catch the result returned by CB.

    Considering this situation, a way that i found to resolve was use the "Test Page" on "http://192.168.0.101/gsa_test.gsa". So, machine B will make a HTTP request to machine A, using URL "http://192.168.0.101/gsa_teste.gsa", and will send a image file, waiting for the result "The Solution is :: 1exy", for example. 

    This process is working so far, but my question is: At the moment when the image is sent, exists a way to inform CB, which engine he must use? I don't know how to made this in the situation explained above, only using CapBreak_CMD, locally in the machine A. My problem is that i can't use the CapBreak_CMD program, because i will use CB remotelly, not locally. 
    I have looked .dpr file and i could be wrong, but i think this is not good for me, since it only works locally.

    Regarding captcha services(decaptcher, DBC) mentioned by you, how can I use the simulation suported by CB and using this, i will be able to choose the correct engine?

    Thanks very much. again.
  • SvenSven www.GSA-Online.de
    Have a look at the decaptcha api and add parameter "captcha_plattform=engine" to it and send it directly to the IP of your choice. 
  • Hi Sven, Thanks so much. 

    I did what you said and this worked for me, using the Decaptcher api with "captcha_plattform" parameter, CB break captcha using the correct engine. 

    But other problem appeared. I have a limitation in my current solution. I can't change the host file in machines that will access CB, because in a moment, the machine will access the CB and in other moment will access the original Decaptcher service. So, if I change the host file, machine will always send to CB.

    How can I simulate Decaptcher service without changing host file? It's possible?
    I tryed, only change the URL to "http://192.168.0.101" and send image respecting Decaptcher api (without host file changes), but CB sends only the 9.99 response.

    Since already thank you so much for your help.
  • SvenSven www.GSA-Online.de

    Oh well than use the gsa_test.gsa method add the "captcha_plattform=engine" in addition.


  • can't you use another service for emulating instead?
  • Ok, Sven i will try that.

    Ozz, i'm trying to emulate Decapcher service because the classes with access structure are ready and used to acess the original service. We use the DeathByCaptcha service too.

    So, i will make some more tests and put results here. 

    Thanks.
  • Hi all.

    I tested Decaptcher emulate using the URL with CB machine IP(ex: http://192.168.0.18/) and worked. 

    The solution is that:

    On java application, that uses Apache HTTP Cliente, I setted de URL to "http://192.168.0.18/" using POST método, but on POST method header, i put explicity the Host parameter(Host=poster.decaptcher.com). So the complete structure is.

    POST PARAMETERS:
    function=picture2
    username=any
    password=any
    pict_to=60000
    pict_type=0
    captcha_plattform=any engine defined on CB
    pict=imagem file that we need to break.

    ADD the following header to request:
    Host=poster.decaptcher.com

    I think that CB emulates each service, looking for Host header of Request. If this not setted explicitly, the Apache HTTP Client sets automatically, based on URL value.

    So, this is working very well for me. 

    To conclude, I would like to suggests something. I missed a documentation for the CB, like a users-guide. If CB team make available, will help new users a lot. 

    One More time, thanks so much for you all, Sven and Ozz. I am very pleased with CB suports. 
  • SvenSven www.GSA-Online.de
    Yep thats all correct. It looks at the HOST parameter in header to see what the client expects and sends data back according to that.
  • what is this pict=imagem ?
    imagem ?
    do i save captcha myself and send that file ?

    captcha_plattform=any
    is this correct ?

    also what are these 3 parameters

    function=picture2
    pict_to=60000
    pict_type=0
  • @sven
    1.Why when i put captcha_plattform=myName I  see sometimes result from other engine?
    2. In my engine i choose in sdk use hash values after filter number 2. but it seems that CB skip my settings. 
     
  • SvenSven www.GSA-Online.de
    1. because this engine parameter is only used when there are matching selected types from that engine and more than one.
    2. hashes are only useful if the resulting chars are always looking the same, else use mask or leave it to ocr only.
  • @sven can i send a few engine with captcha_plattform=myName?
  • SvenSven www.GSA-Online.de
    edited November 2015
    hmm no, just one...but I will add support for it.
    Next version supports it when adding more than one engine name with commas.
Sign In or Register to comment.