// ==UserScript== // @name AntyCaptcha MENOGRAM // @namespace https://menogram-dwa.pl/ // @version 1.05 // @description Skrypt omijający captche w Margonem działa na starym oraz nowym interfejsie // @author kot // @match http://*.margonem.pl // @grant GM_xmlhttpRequest // @connect menogram-dwa.pl // ==/UserScript== // 1.05 +inne pytania // 1.04 +randomowy czas // 1.03 +wyświetlanie komunikatu o ilości użyć klucza // 1.02 +obsługa ni (e => { const timeout = 2000; //Czas po którym zostanie rozwiązana zagadka const additional_timeout = 2000; // Dodatkowy losowy czas z zakresu od 0 do X po którym zostanie rozwiązana zagadka /* OBYDWA CZASY PODAJEMY W MILISEKUNDACH - 1 sekunda = 1000 milisekund*/ const key = "menogram-dwa.pl"; //Klucz API const si = getCookie(`interface`) == `si`; const post = (url, data) => { const postData = []; for (let i in data) postData.push(`${encodeURIComponent(i)}=${encodeURIComponent(data[i])}`); return new Promise(r => { GM_xmlhttpRequest({ method: `POST`, url, data: postData.join(`&`), headers: { "Content-Type": `application/x-www-form-urlencoded` }, onload: function(d) { r(JSON.parse(d.responseText)); } }); }); }, sleep = (time) => { return new Promise(r => setTimeout(r, time)) }, pi = si ? parseInput : Engine.communication.parseJSON; const main = async function(a) { pi.apply(this, arguments); if (a.captcha && a.captcha.content) { const time = timeout + Math.floor(Math.random() * additional_timeout); console.log(`Czekam ${Math.floor(time/10)/100}s`) await sleep(time); const start = Date.now(); const query = a.captcha.content.question.text; console.log(`Rozwiązuje zagadkę...`); const captcha = a.captcha.content.image.data; const response = await post(`https://menogram-dwa.pl/api/resolver.php`, { captcha, key, query }); if (response.usesLeft) message(`Pozostało ${response.usesLeft} użyć`); if (response.status == 1) { console.log(`Zagadka została rozwiązana w ${Math.floor((Date.now()-start)/10)/100}s\nOdpowiedź: ${response.text}`); document.querySelectorAll(si ? `.btn-wood` : `.captcha__buttons .button`).forEach(e => { const text = e.querySelector(si ? `.gfont` : `.label`); if ((text && text.attributes && text.attributes.name) || (text && !si)) { const name = si ? text.attributes.name.value.toLowerCase() : text.innerText.toLowerCase(); if (name == response.text.toLowerCase()) e.click(); if (name == ("Potwierdzam").toLowerCase()) e.click(); } }); if (!si) document.querySelector(`.captcha__confirm .button`).click(); } else { console.warn(`Wystąpił błąd podczas rozwiązywania zagadki!\n${response.text}`); alert(response.text); } } } si ? parseInput = main : Engine.communication.parseJSON = main; })();// ==UserScript== // @name New Userscript // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match http://jaruna.margonem.pl/ // @grant none // ==/UserScript== (function() { 'use strict'; // Your code here... })();// ==UserScript== // @name AntyCaptcha MENOGRAM // @namespace https://menogram-dwa.pl/ // @version 1.05 // @description Skrypt omijający captche w Margonem działa na starym oraz nowym interfejsie // @author kot // @match http://*.margonem.pl // @grant GM_xmlhttpRequest // @connect menogram-dwa.pl // ==/UserScript== // 1.05 +inne pytania // 1.04 +randomowy czas // 1.03 +wyświetlanie komunikatu o ilości użyć klucza // 1.02 +obsługa ni (e => { const timeout = 2000; //Czas po którym zostanie rozwiązana zagadka const additional_timeout = 2000; // Dodatkowy losowy czas z zakresu od 0 do X po którym zostanie rozwiązana zagadka /* OBYDWA CZASY PODAJEMY W MILISEKUNDACH - 1 sekunda = 1000 milisekund*/ const key = "menogram-dwa.pl"; //Klucz API const si = getCookie(`interface`) == `si`; const post = (url, data) => { const postData = []; for (let i in data) postData.push(`${encodeURIComponent(i)}=${encodeURIComponent(data[i])}`); return new Promise(r => { GM_xmlhttpRequest({ method: `POST`, url, data: postData.join(`&`), headers: { "Content-Type": `application/x-www-form-urlencoded` }, onload: function(d) { r(JSON.parse(d.responseText)); } }); }); }, sleep = (time) => { return new Promise(r => setTimeout(r, time)) }, pi = si ? parseInput : Engine.communication.parseJSON; const main = async function(a) { pi.apply(this, arguments); if (a.captcha && a.captcha.content) { const time = timeout + Math.floor(Math.random() * additional_timeout); console.log(`Czekam ${Math.floor(time/10)/100}s`) await sleep(time); const start = Date.now(); const query = a.captcha.content.question.text; console.log(`Rozwiązuje zagadkę...`); const captcha = a.captcha.content.image.data; const response = await post(`https://menogram-dwa.pl/api/resolver.php`, { captcha, key, query }); if (response.usesLeft) message(`Pozostało ${response.usesLeft} użyć`); if (response.status == 1) { console.log(`Zagadka została rozwiązana w ${Math.floor((Date.now()-start)/10)/100}s\nOdpowiedź: ${response.text}`); document.querySelectorAll(si ? `.btn-wood` : `.captcha__buttons .button`).forEach(e => { const text = e.querySelector(si ? `.gfont` : `.label`); if ((text && text.attributes && text.attributes.name) || (text && !si)) { const name = si ? text.attributes.name.value.toLowerCase() : text.innerText.toLowerCase(); if (name == response.text.toLowerCase()) e.click(); if (name == ("Potwierdzam").toLowerCase()) e.click(); } }); if (!si) document.querySelector(`.captcha__confirm .button`).click(); } else { console.warn(`Wystąpił błąd podczas rozwiązywania zagadki!\n${response.text}`); alert(response.text); } } } si ? parseInput = main : Engine.communication.parseJSON = main; })();