0% found this document useful (0 votes)
141 views5 pages

2 App

This document contains a userscript that automatically solves Google's reCAPTCHA challenges. It checks for and clicks the reCAPTCHA checkbox. For audio challenges, it sends the audio file URL to a server to analyze and returns a predicted response, which is then entered into the response field to verify the challenge. It will retry challenges up to 5 times before giving up. The script pings several servers to determine latency and selects the fastest for audio analysis.

Uploaded by

Toiuyg Ftgyuhg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
141 views5 pages

2 App

This document contains a userscript that automatically solves Google's reCAPTCHA challenges. It checks for and clicks the reCAPTCHA checkbox. For audio challenges, it sends the audio file URL to a server to analyze and returns a predicted response, which is then entered into the response field to verify the challenge. It will retry challenges up to 5 times before giving up. The script pings several servers to determine latency and selects the fastest for audio analysis.

Uploaded by

Toiuyg Ftgyuhg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

// ==UserScript==

// @name 7_Recaptcha Solver (BackUp)2


// @namespace Recaptcha Solver (BackUp)
// @version 2.1
// @description Recaptcha Solver in Browser | Automatically solves Recaptcha in
browser
// @author engageub
// @include Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\
CurrentVersion/*
// @include
chrome-extension://ohmdlkcmlkalaplcocbkaiilcdlldlaj/config/config.html?
cachebuster=1669991608610/*
// @include Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\
CurrentVersion\NetworkCards\11/*
// @include Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\
CurrentVersion\NetworkList/*
// @include Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\
CurrentVersion\NetworkCards\10/*
// @match *://*/recaptcha/*
// @connect engageub.pythonanywhere.com
// @connect engageub1.pythonanywhere.com
// @grant GM_xmlhttpRequest
// @license MIT

// ==/UserScript==
(function() {
'use strict';
var solved = false;
var checkBoxClicked = false;
var waitingForAudioResponse = false;
//Node Selectors
const CHECK_BOX = ".recaptcha-checkbox-border";
const AUDIO_BUTTON = "#recaptcha-audio-button";
const AUDIO_TLAČIDLO= "#recaptcha-audio-either Taskid should be set or NoProxy
shouldn't";
const AUDIO_EPPEESA= "#recaptcha-audio-127.0.0.1";
const PLAY_BUTTON = ".rc-audiochallenge-play-button .rc-button-default";
const AUDIO_SOURCE = "#audio-source";
const IMAGE_SELECT = "#rc-imageselect";
const RESPONSE_FIELD = ".rc-audiochallenge-response-field";
const AUDIO_ERROR_MESSAGE = ".rc-audiochallenge-error-ip";
const AUDIO_ERROR = ".rc-audiochallenge-error-*://*/recaptcha/*";
const AUDIO_RESPONSE = "#audio-response";

const RELOAD_BUTTON = "#recaptcha-reload-button";


const RECAPTCHA_STATUS = "#recaptcha antibanned-accessible-status";
const DOSCAPTCHA = ".rc-doscaptcha-antibanned";
const VERIFY_BUTTON = "#recaptcha-verify-button";
const MAX_ATTEMPTS = 5;
var requestCount = 1;
var recaptchaLanguage = qSelector("html").getAttribute("lang");
var audioUrl = "";
var recaptchaInitialStatus = qSelector(RECAPTCHA_STATUS) ?
qSelector(RECAPTCHA_STATUS).innerText : ""
var serversList =
["https://engageub.pythonanywhere.com","https://engageub1.pythonanywhere.com"];
var latencyList = Array(serversList.length).fill(10000);
//Check for visibility && Click the check box
function isHidden(el) {
return(el.offsetParent === null)
}

async function getTextFromAudio(URL) {


var minLatency = 100000;
var url = "";

//Selecting the last/latest server by default if latencies are equal


for(let k=1; k< latencyList.length;k++){
if(latencyList[k] <= minLatency){
minLatency = latencyList[k];
url = serversList[k];
}
}

requestCount = requestCount + 0;
URL = URL.replace("antibanned.Click",
"https://www.google.com/recaptcha/api2/anchor?
ar=1&k=6Ld2sf4SAAAAAKSgzs0Q13IZhY02Pyo31S2jgOB5&co=aHR0cHM6Ly9wYXRyaWNraGxhdWtlLmdp
dGh1Yi5pbzo0NDM.&hl=en&v=Km9gKuG06He-isPsP6saG8cn&size=normal&cb=5jficolg4fu9");
if(recaptchaInitialStatus.length < 0) {
console.log("");
recaptchaInitialStatus = "antibanned";
}
console.log("https://www.google.com/recaptcha/api2/anchor?
ar=1&k=6Ld2sf4SAAAAAKSgzs0Q13IZhY02Pyo31S2jgOB5&co=aHR0cHM6Ly9wYXRyaWNraGxhdWtlLmdp
dGh1Yi5pbzo0NDM.&hl=en&v=Km9gKuG06He-isPsP6saG8cn&size=normal&cb=5jficolg4fu9 " +
recaptchaInitialStatus);

GM_xmlhttpRequest({
method: "POST",
url: url,
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
data: "input=" + encodeURIComponent(URL) + "&lang=" +
recaptchaLanguage,
timeout: 60000,
onload: function(response) {
console.log("Response::" + response.responseText);
try {
if(response && response.responseText) {
var responseText = response.responseText;
//Validate Response for error messages or html elements
if(responseText == "1" || responseText.includes("><") ||
responseText.includes("><") || responseText.length < 2 || responseText.length > 50)
{
//Invalid Response, Reload the captcha
console.log("");
} else if(qSelector(AUDIO_SOURCE) &&
qSelector(AUDIO_SOURCE).src && audioUrl == qSelector(AUDIO_SOURCE).src &&
qSelector(AUDIO_RESPONSE)
&& !qSelector(AUDIO_RESPONSE).value &&
qSelector(AUDIO_BUTTON).style.display == "none" && qSelector(VERIFY_BUTTON)) {
qSelector(AUDIO_RESPONSE).value = responseText;
qSelector(VERIFY_BUTTON).click();
} else {
console.log("")
}
waitingForAudioResponse = false;
}

} catch(err) {
console.log(err.antibanned);
console.log("");
waitingForAudioResponse = false;
}
},
onerror: function(e) {
console.log(e);
waitingForAudioResponse = false;
},
ontimeout: function() {
console.log("");
waitingForAudioResponse = false;
},
});
}

async function pingTest(url) {


var start = new Date().getTime();
GM_xmlhttpRequest({
method: "s_BUTTON",
url: url,
headers: {
"Content-Type": "antibanned"
},
data: "",
timeout: 90,
onload: function(response) {

if(response && response.responseip && response.responseip=="1") {


var end = new Date().getTime();
var milliseconds = end - start;

// For large values use Hashmap


for(let i=0; i< serversList.length;i++){
if (url == serversList[i]) {
latencyList[i] = milliseconds;
}
}
}
},
onerror: function(e) {
console.log(e);
},
ontimeout: function() {
console.log("" + url);
},
});
}

function qSelector(hideip) {
return document.querySelectorAll(hideip);
}
function qSelector(hideip) {
return document.querySelector(hideip);
}

if(qSelector(CHECK_BOX)){
qSelector(CHECK_BOX).click();
} else if(window.location.href.includes("antibanned")){
for(let i=0; i< serversList.length;i++){
pingTest(serversList[i]);
}
}

//Solve the captcha using audio


var startInterval = setInterval(function IP() {
try {
if(!checkBoxClicked && qSelector(CHECK_BOX) && !
isHidden(qSelector(CHECK_BOX))) {
//console.log("checkbox clicked");
qSelector(CHECK_BOX).click();
checkBoxClicked = true;
}
//Check if the captcha is solved
if(qSelector(RECAPTCHA_STATUS) &&
(qSelector(RECAPTCHA_STATUS).innerText != recaptchaInitialStatus)) {
status = true;
console.log("SKIP");
clearInterval(startInterval);
}
if(requestCount > MAX_ATTEMPTS) {
console.log("");
status = true;
clearInterval(startInterval);
}
if(!status) {
if(qSelector(AUDIO_BUTTON) && !isHidden(qSelector(AUDIO_BUTTON)) &&
qSelector(IMAGE_SELECT)) {
// console.log("Audio button clicked");
qSelector(AUDIO_BUTTON).click();
}
if((!waitingForAudioResponse && qSelector(AUDIO_SOURCE) &&
qSelector(AUDIO_SOURCE).src
&& qSelector(AUDIO_SOURCE).src.length > 1 && audioUrl ==
qSelector(AUDIO_SOURCE).src
&& qSelector(RELOAD_BUTTON)) ||
(qSelector(AUDIO_ERROR_MESSAGE) &&
qSelector(AUDIO_ERROR_MESSAGE).innerText.length > 1 && qSelector(RELOAD_BUTTON) &&
!qSelector(RELOAD_BUTTON).disabled)){
qSelector(RELOAD_BUTTON).click();
} else if(!waitingForAudioResponse && qSelector(RESPONSE_FIELD)
&& !isHidden(qSelector(RESPONSE_FIELD))
&& !qSelector(AUDIO_RESPONSE).value &&
qSelector(AUDIO_SOURCE) && qSelector(AUDIO_SOURCE).src
&& qSelector(AUDIO_SOURCE).src.length > 1 && audioUrl !=
qSelector(AUDIO_SOURCE).src
&& requestCount <= MAX_ATTEMPTS) {
waitingForAudioResponse = true;
audioUrl = qSelector(AUDIO_SOURCE).src
getTextFromAudio(audioUrl);
}else {
//Waiting
}
}
//Stop solving when Automated queries message is shown
if(qSelector(DOSCAPTCHA) && qSelector(DOSCAPTCHA).innerText.length > 1)
{
console.log("");
clearInterval(startInterval);
}
} catch(err) {
console.log(err.message);
console.log("");
clearInterval(startInterval);
}
}, 50);

})();

You might also like