Facebook
From Walloping Bongo, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 89
  1. // ==UserScript==
  2. // @name         AntyCaptcha MENOGRAM
  3. // @namespace    https://menogram-dwa.pl/
  4. // @version      1.05
  5. // @description  Skrypt omijający captche w Margonem działa na starym oraz nowym interfejsie
  6. // @author       kot
  7. // @match        http://*.margonem.pl
  8. // @grant        GM_xmlhttpRequest
  9. // @connect      menogram-dwa.pl
  10. // ==/UserScript==
  11.  
  12. // 1.05 +inne pytania
  13. // 1.04 +randomowy czas
  14. // 1.03 +wyświetlanie komunikatu o ilości użyć klucza
  15. // 1.02 +obsługa ni
  16. (e => {
  17.     const timeout = 2000; //Czas po ktĂłrym zostanie rozwiązana zagadka
  18.     const additional_timeout = 2000; // Dodatkowy losowy czas z zakresu od 0 do X po ktĂłrym zostanie rozwiązana zagadka
  19.     /* OBYDWA CZASY PODAJEMY W MILISEKUNDACH - 1 sekunda = 1000 milisekund*/
  20.     const key = "menogram-dwa.pl"; //Klucz API
  21.     const si = getCookie(`interface`) == `si`;
  22.     const post = (url, data) => {
  23.             const postData = [];
  24.             for (let i in data) postData.push(`${encodeURIComponent(i)}=${encodeURIComponent(data[i])}`);
  25.             return new Promise(r => {
  26.                 GM_xmlhttpRequest({
  27.                     method: `POST`,
  28.                     url,
  29.                     data: postData.join(`&`),
  30.                     headers: {
  31.                         "Content-Type": `application/x-www-form-urlencoded`
  32.                     },
  33.                     onload: function(d) {
  34.                         r(JSON.parse(d.responseText));
  35.                     }
  36.                 });
  37.             });
  38.         },
  39.         sleep = (time) => { return new Promise(r => setTimeout(r, time)) },
  40.         pi = si ? parseInput : Engine.communication.parseJSON;
  41.     const main = async function(a) {
  42.         pi.apply(this, arguments);
  43.         if (a.captcha && a.captcha.content) {
  44.             const time = timeout + Math.floor(Math.random() * additional_timeout);
  45.             console.log(`Czekam ${Math.floor(time/10)/100}s`)
  46.             await sleep(time);
  47.             const start = Date.now();
  48.             const query = a.captcha.content.question.text;
  49.             console.log(`Rozwiązuje zagadkę...`);
  50.             const captcha = a.captcha.content.image.data;
  51.             const response = await post(`https://menogram-dwa.pl/api/resolver.php`, { captcha, key, query });
  52.             if (response.usesLeft) message(`Pozostało ${response.usesLeft} uĹźyć`);
  53.             if (response.status == 1) {
  54.                 console.log(`Zagadka została rozwiązana w ${Math.floor((Date.now()-start)/10)/100}s\nOdpowiedĹş: ${response.text}`);
  55.  
  56.                 document.querySelectorAll(si ? `.btn-wood` : `.captcha__buttons .button`).forEach(e => {
  57.                     const text = e.querySelector(si ? `.gfont` : `.label`);
  58.                     if ((text && text.attributes && text.attributes.name) || (text && !si)) {
  59.                         const name = si ? text.attributes.name.value.toLowerCase() : text.innerText.toLowerCase();
  60.                         if (name == response.text.toLowerCase()) e.click();
  61.                         if (name == ("Potwierdzam").toLowerCase()) e.click();
  62.                     }
  63.                 });
  64.                 if (!si) document.querySelector(`.captcha__confirm .button`).click();
  65.             } else {
  66.                 console.warn(`Wystąpił błąd podczas rozwiązywania zagadki!\n${response.text}`);
  67.                 alert(response.text);
  68.             }
  69.         }
  70.     }
  71.     si ? parseInput = main : Engine.communication.parseJSON = main;
  72. })();// ==UserScript==
  73. // @name         New Userscript
  74. // @namespace    http://tampermonkey.net/
  75. // @version      0.1
  76. // @description  try to take over the world!
  77. // @author       You
  78. // @match        http://jaruna.margonem.pl/
  79. // @grant        none
  80. // ==/UserScript==
  81.  
  82. (function() {
  83.     'use strict';
  84.  
  85.     // Your code here...
  86. })();// ==UserScript==
  87. // @name         AntyCaptcha MENOGRAM
  88. // @namespace    https://menogram-dwa.pl/
  89. // @version      1.05
  90. // @description  Skrypt omijający captche w Margonem działa na starym oraz nowym interfejsie
  91. // @author       kot
  92. // @match        http://*.margonem.pl
  93. // @grant        GM_xmlhttpRequest
  94. // @connect      menogram-dwa.pl
  95. // ==/UserScript==
  96.  
  97. // 1.05 +inne pytania
  98. // 1.04 +randomowy czas
  99. // 1.03 +wyświetlanie komunikatu o ilości użyć klucza
  100. // 1.02 +obsługa ni
  101. (e => {
  102.     const timeout = 2000; //Czas po ktĂłrym zostanie rozwiązana zagadka
  103.     const additional_timeout = 2000; // Dodatkowy losowy czas z zakresu od 0 do X po ktĂłrym zostanie rozwiązana zagadka
  104.     /* OBYDWA CZASY PODAJEMY W MILISEKUNDACH - 1 sekunda = 1000 milisekund*/
  105.     const key = "menogram-dwa.pl"; //Klucz API
  106.     const si = getCookie(`interface`) == `si`;
  107.     const post = (url, data) => {
  108.             const postData = [];
  109.             for (let i in data) postData.push(`${encodeURIComponent(i)}=${encodeURIComponent(data[i])}`);
  110.             return new Promise(r => {
  111.                 GM_xmlhttpRequest({
  112.                     method: `POST`,
  113.                     url,
  114.                     data: postData.join(`&`),
  115.                     headers: {
  116.                         "Content-Type": `application/x-www-form-urlencoded`
  117.                     },
  118.                     onload: function(d) {
  119.                         r(JSON.parse(d.responseText));
  120.                     }
  121.                 });
  122.             });
  123.         },
  124.         sleep = (time) => { return new Promise(r => setTimeout(r, time)) },
  125.         pi = si ? parseInput : Engine.communication.parseJSON;
  126.     const main = async function(a) {
  127.         pi.apply(this, arguments);
  128.         if (a.captcha && a.captcha.content) {
  129.             const time = timeout + Math.floor(Math.random() * additional_timeout);
  130.             console.log(`Czekam ${Math.floor(time/10)/100}s`)
  131.             await sleep(time);
  132.             const start = Date.now();
  133.             const query = a.captcha.content.question.text;
  134.             console.log(`Rozwiązuje zagadkę...`);
  135.             const captcha = a.captcha.content.image.data;
  136.             const response = await post(`https://menogram-dwa.pl/api/resolver.php`, { captcha, key, query });
  137.             if (response.usesLeft) message(`Pozostało ${response.usesLeft} uĹźyć`);
  138.             if (response.status == 1) {
  139.                 console.log(`Zagadka została rozwiązana w ${Math.floor((Date.now()-start)/10)/100}s\nOdpowiedĹş: ${response.text}`);
  140.  
  141.                 document.querySelectorAll(si ? `.btn-wood` : `.captcha__buttons .button`).forEach(e => {
  142.                     const text = e.querySelector(si ? `.gfont` : `.label`);
  143.                     if ((text && text.attributes && text.attributes.name) || (text && !si)) {
  144.                         const name = si ? text.attributes.name.value.toLowerCase() : text.innerText.toLowerCase();
  145.                         if (name == response.text.toLowerCase()) e.click();
  146.                         if (name == ("Potwierdzam").toLowerCase()) e.click();
  147.                     }
  148.                 });
  149.                 if (!si) document.querySelector(`.captcha__confirm .button`).click();
  150.             } else {
  151.                 console.warn(`Wystąpił błąd podczas rozwiązywania zagadki!\n${response.text}`);
  152.                 alert(response.text);
  153.             }
  154.         }
  155.     }
  156.     si ? parseInput = main : Engine.communication.parseJSON = main;
  157. })();