Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name AntyCaptcha MENOGRAM FREE
- // @namespace https://menogram-dwa.pl/
- // @version 3.00
- // @description Skrypt omijający captche w Margonem działa na starym oraz nowym interfejsie
- // @author kot
- // @match *://*.margonem.pl/
- // @exclude https://www.margonem.pl/
- // @grant GM_xmlhttpRequest
- // @connect menogram-dwa.pl
- // ==/UserScript==
- (async () => {
- const b = `si` == getCookie(`interface`);
- `ni` == getCookie(`interface`) && (await
- function () {
- return new Promise(a => {
- const b = () => {
- Engine && Engine.communication && Engine.communication.parseJSON ? a() : setTimeout(b, 20)
- };
- b()
- })
- }());
- const c = (a, b) => {
- const c = [];
- for (let d in b) c.push(`${encodeURIComponent(d)}=${encodeURIComponent(b[d])}`);
- return new Promise(b => {
- GM_xmlhttpRequest({
- method: `POST`,
- url: a,
- data: c.join(`&`),
- headers: {
- "Content-Type": `application/x-www-form-urlencoded`
- },
- onload: function (a) {
- b(JSON.parse(a.responseText))
- }
- })
- })
- },
- d = a => new Promise(b => setTimeout(b, a)),
- e = b ? parseInput : Engine.communication.parseJSON,
- a = async function (f) {
- if (e.apply(this, arguments), f.captcha && f.captcha.content) {
- const a = 2e3 + Math.floor(Math.random() * 2e3),
- e = Date.now(),
- g = f.captcha.content.question.text,
- h = f.captcha.content.question.options.join(`,`);
- console.log(`Rozwiązuje zagadkę...`);
- const i = f.captcha.content.image.data,
- j = await c(`https://menogram-dwa.pl/api/resolver-test5.php`, {
- captcha: i,
- key: "BjV3A2hJNZ7PAk6XS3Li",
- query: g,
- options: h
- });
- j.usesLeft && message(`Pozostało ${j.usesLeft} użyć`), await d(a - (Date.now() - e)), 1 == j.status ? (console.log(`Zagadka została rozwiązana w ${Math.floor((Date.now() - e) / 10) / 100}s\nOdpowiedź: ${j.text}`), document.querySelectorAll(b ? `.btn-wood` : `.captcha__buttons .button`).forEach(a => {
- const c = a.querySelector(b ? `.gfont` : `.label`);
- if (c && c.attributes && c.attributes.name || c && !b) {
- const d = b ? c.attributes.name.value.toString().toLowerCase() : c.innerText.toString().toLowerCase();
- d == j.text.toString().toLowerCase() && a.click(), d == "Potwierdzam".toLowerCase() && a.click()
- }
- }), !b && document.querySelector(`.captcha__confirm .button`).click()) : (console.warn(`Wystąpił błąd podczas rozwiązywania zagadki!\n${j.text}`), alert(j.text))
- }
- };
- b ? parseInput = a : Engine.communication.parseJSON = a
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement