Giter Site home page Giter Site logo

outcaptcha's Introduction

outCaptcha - Solving reCAPTCHA 2.0 Without Human Interaction

How to Run

foo@bar:~$ chromium-browser --disable-web-security -user-data-dir=~/ & python app.py

Note: Starting chrome with cross-origin resource sharing is necessary to interact with the reCAPTCHA iframe.

In Chrome, navigate to "chrome://extensions" and drag the ~/extensions/ directory into the browser window.

Configure the Chrome extension with a valid Google Cloud Speech-To-Text API key

Technological Overview

Javascript

After detecting a Captcha, the extension uses the following JS code to "Click" the checkbox indicating a human is present:

// This code snippet can be found in extension/background.js
chrome.tabs.executeScript({ code: `document.querySelector('[role="presentation"]').contentWindow.document.getElementById("recaptcha-anchor").click()` });

After successfully clicking the checkbox, reCAPTCHA 2.0 triggers the user to complete an image verification. Rather than completing the image verification, outCaptcha will click the Audio Accessibility button to request an Audio-based Captcha with this JS code:

// This code snippet can be found in extension/background.js
chrome.tabs.executeScript({ code: `document.querySelector('[title="recaptcha challenge"]').contentWindow.document.getElementById("recaptcha-audio-button").click()` });

After using chrome.webRequest to detect that the Audio-based captcha was successfully loaded, outCaptcha grabs the URL of the audio file and sends a POST request to localhost containing the URL and the API Key used to configure the extension. After the backend processing is completed outCaptcha will input the solution and click the verify button using Javascript:

// This code snippet can be found in extension/background.js
chrome.tabs.executeScript({code: `document.querySelector('[title="recaptcha challenge"]').contentWindow.document.getElementById('audio-response').value = "` + returnVal + '"'});
// Clicks the input box and types in the captcha solution
chrome.tabs.executeScript({code: `document.querySelector('[title="recaptcha challenge"]').contentWindow.document.getElementById("recaptcha-verify-button").click()` });
// Clicks the verify button

Python

The python-based server downloads the RAW audio file and converts it to FLAC format using FFMPEG. This FLAC file is then encoded as Base64 and sent to Google's Speech-To-Text API. The Captcha solution is returned as a string.

URL Matching

The extension uses chrome.webRequest with the following URL pattern to detect the presence of a captcha on the web page:

https://www.google.com/recaptcha/api2/bframe?*

Since loading times can differ for the Audio-based Captcha, outCaptcha monitors network activity using chrome.webRequest to detect URLs matching the following pattern:

https://www.google.com/recaptcha/api2/payload?*

Error Handling

outCaptcha will detect invalid API keys, and will trigger the user to input a valid API key if an error occurs during speech-to-text conversion

outcaptcha's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

outcaptcha's Issues

Solve ReCaptcha using proxies

Hi,
Do you solved the ReCaptcha using proxies?

It showing "Your computer or network may be sending automated queries. To protect our users, we can't process your request right now. For more details visit our help page".

Do you have any solution for this?

Please advice. Thanks

V3

do you have any solution for v3 when it setup most secure option

-bash: chromium-browser: command not found

Everytime I run the code

chromium-browser --disable-web-security -user-data-dir=~/ & python3 app.py

I get this in the terminal

-bash: chromium-browser: command not found

  • Serving Flask app "app" (lazy loading)
  • Environment: production
    WARNING: Do not use the development server in a production environment.
    Use a production WSGI server instead.
  • Debug mode: on
  • Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
  • Restarting with stat
  • Debugger is active!
  • Debugger PIN:

(Idk if I should share my debugger pin so I left it out

It doesn't work

I followed your steeps, video and Github. It doesn't work. None error just doesn't do anything.

Trying your javascript code doesn't work on ReCaptcha.

Hi, I'm trying your javascript code in my own extension different from your and I'm trying this:

document.querySelector('[role="presentation"]').contentWindow.document.getElementById("recaptcha-anchor").click()

Code doesn't work and it returns me autoclick.js:29 Uncaught TypeError: Cannot read property 'document' of undefined.
Also trying with it doesn't work:

chrome.tabs.executeScript({ code: document.querySelector('[role="presentation"]').contentWindow.document.getElementById("recaptcha-anchor").click() });

Returns: Cannot read property 'executeScript' of undefined
And of course all other javascript commands to click button will not work... Can you explain me why?

Problem with ffmpeg and chromium_executable/pyppeteer.util

I've got this message when I try to run the code. I'm stuck in this part and don't know how to pass through

Warning (from warnings module): File "C:\Users\Kyle\AppData\Local\Programs\Python\Python37\lib\site-packages\pydub-0.22.1-py3.7.egg\pydub\utils.py", line 165 warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work Traceback (most recent call last): File "C:\Users\Kyle\Desktop\nonoCAPTCHA-master\nonocaptcha\solver.py", line 18, in <module> from nonocaptcha.launcher import Launcher File "C:\Users\Kyle\AppData\Local\Programs\Python\Python37\lib\site-packages\nonocaptcha-1.9.0-py3.7.egg\nonocaptcha\launcher.py", line 25, in <module> from pyppeteer.util import check_chromium, chromium_executable ImportError: cannot import name 'chromium_executable' from 'pyppeteer.util' (C:\Users\Kyle\AppData\Local\Programs\Python\Python37\lib\site-packages\pyppeteer\util.py)

Too many requests

https://www.google.com/recaptcha/api2/demo
when I try the audio option it tells me I tried too many requests so I need to retry it later. But it keeps giving me the same reason.
I got api key im runnig app.py I added extension and set api key I got no errors. So wat to do?

from selenium import webdriver

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--disable-web-security -user-data-dir=~/ & python app.py' )

chrome = webdriver.Chrome(options=chrome_options)
chrome.get("http://ident.me/")

Script how I start chromium

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.