Advertisement
Guest User

Untitled

a guest
Jan 12th, 2019
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.49 KB | None | 0 0
  1. USE OUR HOST MODIFIER APP TO SET UP THE SERVICE IN A FEW SECONDS!
  2.  
  3. How to change your hosts file automatically, so you can use Cheap Captcha service with your software or script:
  4. Download this file
  5. Run the host changer software as an administrator. Consider that if you don't do it, the software will not work.
  6. Click "Apply!". The software will add the required entries to your host file, backing up your previous configuration.
  7. Start using your software, selecting the Death By Captcha / De-Captcher API.
  8.  
  9. Notes:
  10. If you want to roll-back the changes and leave your host file as it was before, click the "Undo!" button.
  11. For De-Captcher HTTP Post API, you may be asked for additional info. Here's the info you'll need: URL: api.cheapcaptcha.com/decaptcher. Port: 80.
  12. You should run the Host Changer software BEFORE opening up your software/application. Otherwise the configuration may not be applied properly.
  13.  
  14.  
  15. CHEAP CAPTCHA API CLIENTS
  16. .NET (C#, Visual Basic)
  17. Java
  18. PHP
  19. Python
  20. Supported API:
  21. DeCaptcher (Both Socket and HTTP)
  22. AntiGate (Anti-Captcha)
  23. DeathbyCaptcha (Both Socket and HTTP)
  24. CaptchaBot
  25.  
  26. How to configure API clients?
  27. Download the latest client, integrate in to your application and write something along the lines, see example below:
  28.  
  29.  
  30. PHP:
  31. require_once '<website_api.php>';
  32.  
  33. // Type your CHEAP CAPTCHA credentials here.
  34. // Use HttpClient class if you want to use HTTP API.
  35. $client = new CaptchaSolver('your_username', 'your_password');
  36.  
  37. // Type CAPTCHA file name or handler, desired timeout (in seconds) here:
  38. if ($captcha = $client->solve(CAPTCHA_FILE)) {
  39. echo $captcha['text'] . "\n";
  40.  
  41. // To Report incorrect solved CAPTCHA
  42. // Make sure the CAPTCHA was in fact incorrectly solved!
  43. if ( ... ) {
  44. $client->report_incorrect($captcha['captcha']);
  45. }
  46. }
  47.  
  48. // Repeat for other CAPTCHAs
  49.  
  50. C#:
  51. // reference DLL file is required to use in your project!
  52. using <dll filename.dll>;
  53.  
  54. // Enter your credentials here.
  55. // Use HttpClient class if you want to use HTTP API.
  56. Client client = (Client) new SocketClient(USERNAME, PASSWORD);
  57.  
  58. // Put your CAPTCHA file name, stream, or vector of bytes,
  59. // and desired timeout (in seconds) here:
  60. Captcha captcha = client.Decode(CAPTCHA_FILE_NAME, TIMEOUT);
  61. if (captcha.Solved && captcha.Correct) {
  62. Console.WriteLine("CAPTCHA {0}: {1}", captcha.Id, captcha.Text);
  63.  
  64. // To Report incorrect solved CAPTCHA
  65. // Make sure the CAPTCHA was in fact incorrectly solved!
  66. if ( ... ) {
  67. client.Report(captcha);
  68. }
  69. }
  70.  
  71. // Repeat for other CAPTCHAs
  72.  
  73.  
  74. NOTE:
  75. When using socket API client, make sure you don't have outgoing TCP connections to ports 8123-8130 firewalled.
  76. Use HTTP API client if socket API client do not work for you.
  77. The 8123-8130 ports range is for socket API only, do not try to use it with HTTP API!
  78. For more details see examples included in each API client package and check the clients' source code.
  79.  
  80.  
  81. HTTP API technical details
  82. Before implementing your own HTTP API client, please consider using socket API with one of our official clients listed above.
  83.  
  84. Solving a CAPTCHA using Cheap CAPTCHA HTTP API requires performing at least the first two of the steps described below.
  85.  
  86.  
  87. 1.How to Upload a CAPTCHA to Cheap CAPTCHA System?
  88. Before implementing your own HTTP API client, please consider using socket API with one of our official clients listed above.
  89.  
  90. Solving a CAPTCHA using Cheap CAPTCHA HTTP API requires performing at least the first two of the steps described below.
  91.  
  92. To upload a CAPTCHA, issue a multipart/form-data POST request to
  93. http://api.cheapcaptcha.com/api/captcha. The request must contain the following fields:
  94.  
  95. username - your Cheap Captcha username;
  96. password - your Cheap Captcha password;
  97. captchafile - the CAPTCHA image.
  98. Captcha_file should be raw CAPTCHA image file or base64-encoded CAPTCHA image prepended with base64: prefix.
  99.  
  100.  
  101. Here is the HTML form that does the trick:
  102. <form action="http://api.cheapcaptcha.com/api/captcha"
  103. method="post"
  104. enctype="multipart/form-data">
  105. <input type="text" name="username" value="">
  106. <input type="password" name="password" value="">
  107. <input type="file" name="captchafile">
  108. </form>
  109.  
  110. Here is cURL command equivalent:
  111. curl --header 'Expect: ' -F username=YOUR_USERNAME \
  112. -F password=YOUR_PASSWORD \
  113. -F captchafile=@YOUR_CAPTCHA_FILENAME \
  114. http://api.cheapcaptcha.com/api/captcha
  115.  
  116.  
  117. base64-encoded captchafile field should look like this:
  118. base64:R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAAAICTAEAOw==
  119.  
  120.  
  121. HTTP RESPONSE CODE
  122. 303 See Other if your CAPTCHA was successfully uploaded: Location HTTP header will point you to the uploaded CAPTCHA status page, you may follow the Location to get the uploaded CAPTCHA status or parse the CAPTCHA unique ID out of Location URL — the scheme is http://api.cheapcaptcha.com/api/captcha/%CAPTCHA_ID%;
  123. 403 Forbidden if your Cheap CAPTCHA credentials were rejected, or if you don't have enough credits;
  124. 400 Bad Request if your request was not following the specification above, or the CAPTCHA was rejected for not being a valid image;
  125. 500 Internal Server Error if something happened on our side preventing you from uploading the CAPTCHA; if you are sure you're sending properly prepared requests, and your CAPTCHA images are valid, yet the problem persists, please contact our live support and tell them in details how to reproduce the issue;
  126. 503 Service Temporarily Unavailable when our service is overloaded (usually around 3:00–6:00 PM EST), try again later.
  127.  
  128. At this point the CAPTCHA you've just uploaded is not solved yet! Proceed to the 2nd step.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement