Wednesday, May 9, 2018

By pass captcha using 2Captcha in 9Hits Viewer 2.3.2

Hi, since 9Hits Viewer 2.3.2, 2Captcha API has been integrated. To use 2Captcha, firstly you have to create an account at 2Captcha
:) Ref for daniel
:cry: None ref
:roll: Thumb up our application on 2Captcha
The by pass captcha would be available for VIP members only, but currently it's also available for PREMIUM members. The viewer has now support 3 functions to work with 2Captcha:
  • GetImageByXpath(xpath, frameUrlRegex)
  • _2CaptchaSolve(params, timeout)
  • _2CaptchaReportBad(key, captchaId)

GetImageByXpath: returned an image in base64 formart. xpath is the xpath of the target image, and frameUrlRegex is the url regular expression of target frame. leave null if the image was in main frame.

_2CaptchaSolve function has 2 arguments
- params: The 2Captcha API params
- timeout: Set timeout for the action

=> Examples of usage:
Image Captcha:
+ method must be 'base64'
+ json must be 1
+ key and body are required
CODE
//Get the image in base64 encoded
var capt = await GetImageByXpath('//*[@id="CAPTCHA"]');

//Call 2Captcha API and wait for result
var result = await _2CaptchaSolve({
    'key' : 'YOUR_OWN_2CAPTCHA_APY_KEY',
    'method' : 'base64',
    'json' : 1,
    'body': capt
});

ReCaptcha v2:
+ method must be 'userrecaptcha'
+ json must be 1
+ key and googlekey and pageurl are required
CODE
//Get recaptcha data from the target website (assuming we are in main frame)
var sitekey = await GetAttribute('//*[@class=\"g-recaptcha\"]', 'data-sitekey');
var pageUrl = await EvaluateScript('window.location.href');

var result = await _2CaptchaSolve({
    'key' : 'YOUR_OWN_2CAPTCHA_APY_KEY',
    'method' : 'userrecaptcha',
    'json' : 1,
    'googlekey': sitekey,
    'pageurl' : pageUrl
}, 300);
Other captcha type?: Hmm, I just have tested with image and recaptcha, with other type of captcha that supported by 2Captcha, just try to grab the input for API, and call _2CaptchaSolve function with appropriate parameters.

Return result: The _2CaptchaSolve will return an object like this
if failed
{status:0, request:'Some Error Message'}
or if success
{status:1, request:'Answer From 2Captcha', captchaId:123456789}

Base on the return result, you can now use other macros functions to continue your process (filling the answer, submit form, etc). If you can determined that the result from 2Captcha is incorect, you may call _2CaptchaReportBad to tell them that the captcha answer was incorrect. Please careful when use this function because if you report much correct answer as incorrect, your account may got trouble with them.

Ok, now is the show time:

Demo for Image captcha
https://www.webwiz.net/web-wiz-captcha/demo/default.asp

CODE
await Delay(15000);
var capt = await GetImageByXpath('//*[@id="CAPTCHA"]');

var result = await _2CaptchaSolve({
    'key' : 'YOUR_OWN_2CAPTCHA_APY_KEY',
    'method' : 'base64',
    'json' : 1,
    'body': capt
});

//Alert(JSON.stringify(result));

await Delay(10000);
SetById("securityCode", "value", result.request);
await Delay(1000);
ClickById("Submit Form");
await Delay(10000);
var incorect = await EvaluateScript('document.getElementsByClassName("title")[0].innerText.startsWith("Incor")');
if(incorect && result && result.captchaId)
{
 _2CaptchaReportBad('YOUR_OWN_2CAPTCHA_APY_KEY', result.captchaId);
}


Demo for Recaptcha v2
https://www.google.com/recaptcha/api2/demo

CODE
await Delay(5000);
var sitekey = await GetAttribute('//*[@class=\"g-recaptcha\"]', 'data-sitekey');
var pageUrl = await EvaluateScript('window.location.href');

var result = await _2CaptchaSolve({
    'key' : 'YOUR_OWN_2CAPTCHA_APY_KEY',
    'method' : 'userrecaptcha',
    'json' : 1,
    'googlekey': sitekey,
    'pageurl' : pageUrl
}, 300);

//Alert(JSON.stringify(result));

SetById("g-recaptcha-response", "text", result.request);
await Delay(1000);
ClickById("recaptcha-demo-submit");
await Delay(5000);
var incorect = await EvaluateScript('document.getElementsByClassName("recaptcha-error").length>0');
if(incorect && result && result.captchaId)
{
 _2CaptchaReportBad('YOUR_OWN_2CAPTCHA_APY_KEY', result.captchaId);
}

It's hard for you ? do not hesitate to ask help from me. I'm always ready to help you for free ! Join our forum to discus more

8 comments:

  1. hello,can im using imacro code on 9hits macro platform ? it will be same ?

    ReplyDelete
    Replies
    1. Hi amirul! 9Hits Macros is not imacros, 9Hits Macros just is Javascript and use combining with a list of build-in functions (Like ClickById, SendMouseScroll, etc). If you have basic knowlegth about javascript it's easy to use. More over, we are always ready to help :-)

      Delete
  2. doesnt working for me how i can do it please ,?

    ReplyDelete
  3. Hi, how did you do, did you test your script on macro editor. Please skype or email me. I may help :)

    ReplyDelete
  4. hi. my 9hits viewer ver 2.3.3 got crack... my computer always popup "close the program"

    ReplyDelete
  5. Here's Everything you would like to grasp concerning on-line performing at Home, as well as wherever to search out work Home Job Listings 2captcha

    ReplyDelete
  6. I have kept your website. It is illuminating and fulfilling for me. I regard the central information you offer on your site. A devotion of thankfulness is all together for posting it.

    Feel free to surf my site: nba 생중계 | nba 생중계

    ReplyDelete
  7. Hello, please, I need a device code to bypass a captcha for short links sites like this
    https://shrinke.me/i25Me0jM

    ReplyDelete