1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DeathbyCaptcha API Example

Discussion in 'Other Scripting Languages' started by johnjohn123, Aug 14, 2015.

  1. johnjohn123

    johnjohn123 Registered Member

    Joined:
    Jun 19, 2012
    Messages:
    66
    Likes Received:
    26
    Okay so basically I need to use deathbycaptcha's service to break some captchas but I can't really figure out how to use their API. They have an autoit API client that is provided to use but I don't know how to use it.

    So far I have my bot designed such that once it gets to a captcha, it will save the captcha image to the c drive. Let's just say it saves the captcha image to "c:/image.jpg" for the sake of this explanation. So now I have the image and I need it sent to deathbycaptcha's service to get solved and need the result returned back into a variable so I can solve the captcha.

    Here is an excerpt code sample:

    Code:
    ; Usage example
    ; =============
    ;
    ; Call DeathByCaptchaDecode() function with your DBC username, password,
    ; CAPTCHA file name, and desired solving timeout (in seconds) as arguments.
    ; You'll receive an array of two elements: numeric CAPTCHA ID and its text;
    ; CAPTCHA ID will be greater than zero if the CAPTCHA was solved.
    ;
    $result = DeathByCaptchaDecode($CmdLine[1], $CmdLine[2], $CmdLine[3], 60)
    MsgBox(0, "decode()", StringFormat('ID: %s, text: %s', $result[0], $result[1]))
    Where exactly do I put my DBC username, password and captcha filename? Lets just say my username is "123" password "123" and as above the file name is "c:/image.jpg". The whole $CmdLine[1] is what is throwing me off.
     
    Last edited: Aug 14, 2015
  2. johnjohn123

    johnjohn123 Registered Member

    Joined:
    Jun 19, 2012
    Messages:
    66
    Likes Received:
    26
    Also here is the function that is being called for reference. I don't think I have to modify anything in this part of the code. Just listing it as a reference.

     
  3. etiohhpasdfaef

    etiohhpasdfaef Newbie Premium Member

    Joined:
    Nov 3, 2015
    Messages:
    20
    Likes Received:
    0
    Just watch the function declaration: Func DeathByCaptchaDecode($username, $password, $captchaFileName, $timeout)

    So you can know what parameters you have to enter into your call:
    $result = DeathByCaptchaDecode($CmdLine[1], $CmdLine[2], $CmdLine[3], 60)

    Username: $CmdLine[1]
    Password: $CmdLine[2]
    Image File name: $CmdLine[3]

    How are you calling the function and what message you get back?