Giter Site home page Giter Site logo

tocha688 / recaptcha-solver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jacoblincool/recaptcha-solver

0.0 0.0 0.0 1.18 MB

Solve reCAPTCHA challenges by using offline speech recognition.

License: MIT License

JavaScript 30.24% TypeScript 69.76%

recaptcha-solver's Introduction

reCAPTCHA Solver

Solve reCAPTCHA challenges by using offline speech recognition.

It can be very useful when you want to do E2E tests with your application protected by reCAPTCHA.

Requirements:

  • ffmpeg installed

Features:

  • Offline: A pretrained small model is included.
  • Fast: Solve each challenge in less than 3 seconds.
  • Accurate: Over 95% accuracy.
  • Auto-retry: If the challenge is not solved, it will retry it.
  • Supports reCAPTCHA v2 and v3 (invisible).

Install

npm i recaptcha-solver

It will automatically download a 40 MB acoustic model which will be used to solve the challenges.

The model is from https://alphacephei.com/vosk/models (Apache 2.0).

Example

Checkout example/index.mjs!

import { chromium } from "playwright-core";
import { solve } from "recaptcha-solver";

const EXAMPLE_PAGE = "https://www.google.com/recaptcha/api2/demo";

main();

async function main() {
    const browser = await chromium.launch({ headless: false });
    const page = await browser.newPage();
    await page.goto(EXAMPLE_PAGE);

    console.time("solve reCAPTCHA");
    await solve(page);
    console.log("solved!");
    console.timeEnd("solve reCAPTCHA");

    await page.click("#recaptcha-demo-submit");

    page.on("close", async () => {
        await browser.close();
        process.exit(0);
    });
}
❯ node example/index.mjs
solved!
solve reCAPTCHA: 4.285s

With VERBOSE environment variable:

❯ VERBOSE=1 node example/index.mjs
[reCAPTCHA solver] bframe loaded: false
[reCAPTCHA solver] invisible: false
[reCAPTCHA solver] action required: true
[reCAPTCHA solver] [Mutex] init locked
[reCAPTCHA solver] [Mutex] ready waiting
[reCAPTCHA solver] [Mutex] get sound unlocked
[reCAPTCHA solver] [Mutex] ready locked
[reCAPTCHA solver] reconized: for their start urine
[reCAPTCHA solver] [Mutex] done waiting
[reCAPTCHA solver] [Mutex] verified unlocked
[reCAPTCHA solver] [Mutex] done locked
[reCAPTCHA solver] passed: true
solved!
solve reCAPTCHA: 4.072s

Demo

demo.mp4 (23s)

demo.mp4

recaptcha-solver's People

Contributors

jacoblincool avatar tocha688 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.