Skip to content

Ralex91/pptr-hcaptcha-bypass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Hcaptcha Bypass Puppeteer 🤖

⚠ WARNING: this script does not currently work with new versions of Hcaptcha. The script is open source so you can use it to improve it, for example by putting another AI model :^)


⚙ How it works

The script uses Tensorflow and the Cocossd model to recognize the elements in the captcha images and then select them in the captcha

⚠ CocoSSD AI model does not currently work with new versions of Hcaptcha, make your own one finds another


🛠 Installation

To make your browser less detectable use puppeteer-extra and puppeteer-extra-plugin-stealth in addition to the classic puppeteer

Commands :

npm install puppeteer puppeteer-extra
npm i puppeteer-extra-plugin-stealth

📦 Dependencies

🔗 NPM link :

Commands :

npm i @tensorflow/tfjs-node
npm i @tensorflow-models/coco-ssd
npm i unidecode
npm i phin

📚 Exemple

const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth')();
const hcaptcha = require('./hcap_module.js');

puppeteer.use(StealthPlugin);

puppeteer.launch({ 
    headless: false,
    //executablePath: '/usr/bin/chromium-browser', // Custom path of Chromium
    defaultViewport: null,
    ignoreHTTPSErrors: true,
    args: [
        '--disable-setuid-sandbox',
        '--no-sandbox',
        '--new-window',
        '--window-position=0,0',
        '--window-size=1600,900',
        '--disable-features=IsolateOrigins,site-per-process', // Important argument to get the contents of the captcha iframe
        '--ignore-certificate-errors',
    ],
    devtools: false,
}).then(async browser => {
        const pages = await browser.pages();
        const page = pages[0];

        await page.goto('https://accounts.hcaptcha.com/demo', {
            "waitUntil" : "networkidle0",
            timeout: 70000
        });

        await hcaptcha.resolve(page);
});

🎈 Have fun !

Releases

No releases published

Packages

No packages published