2chVladChekunovAntiCaptcha

2ch AntiCaptcha by Vlad Chekunov

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name 2chVladChekunovAntiCaptcha
// @description 2ch AntiCaptcha by Vlad Chekunov
// @include https://2ch.hk/*
// @include http://2ch.hk/*
// @version 1.2.0
// @grant none
// @namespace 2VCAC
// ==/UserScript==
var key = "ff84d54467048dea15d6cd93af4a6b87";
var answer = "951549";
if (unsafeWindow.myVar == undefined) {
unsafeWindow.configureACVC = function(){
	var vcacSetup = document.createElement("div");
	vcacSetup.id="acvcSetup";
	vcacSetup.innerHTML='<h1>Сетап антикапчи</h1><p>Если после настройки, капча всё равно выдаёт ошибку, попробуйте обновить страницу и переконфигурять капчу.</p><p>Введи код с картинки:</p><img src="'+$("#captcha-widget-main img")[0].src+'"><br><input value="'+$("#captcha-widget-main img")[0].src.split("/image/")[1].slice(0,32)+'" type="hidden" id="userHashAnswer"><input id="userAnswer"><br><a onclick="configureit()" href="javascript://">Сконфигурять</a>';
	vcacSetup.style="text-align:center;top: 0px;left: 0px;z-index: 982;display:block;position:fixed;width:100%;height:100%;background:#eeeeee";
	document.body.appendChild(vcacSetup);
}
unsafeWindow.configureit = function(){
	localStorage.vcac=document.getElementById("userHashAnswer").value+"passkodoblyadysosnuly"+document.getElementById("userAnswer").value;
	key=document.getElementById("userHashAnswer").value;
	answer=document.getElementById("userAnswer").value;
	document.getElementById("acvcSetup").remove();
}
}
if(localStorage.vcac){
	key=localStorage.vcac.split("passkodoblyadysosnuly")[0];
	answer=localStorage.vcac.split("passkodoblyadysosnuly")[1];
}else{
	alert("Пожалуйста, откройте форму ответа и сконфигуряйте антикапчу.");
}
$(".captcha-box")[0].style.display="none";
$(".captcha-box")[1].style.display="none";
$('label[for="recaptcha-response-field"]')[0].innerHTML="<a onclick='configureACVC()' href='javascript://'>Сконфигурять<br>антикапчу</a>";
function setAnswer() {
  $(".captcha-key").val(key+$(".captcha-key").val().slice(32,64));//Запускаем нейронную сеть по методу Сосницкого
  document.getElementById("captcha-value").value = answer;
  document.getElementById("qr-captcha-value").value = answer;
}
function initChaptcha() {
  var container = document.getElementById("captcha-widget-main");
  if (!container) return;
  var observer = new MutationObserver(function(mutations) {
    mutations.forEach(function(mutation) {
      Array.prototype.filter.call(mutation.addedNodes, function(node) {
        return node.tagName === "IMG";
      }).forEach(function(img) {
        setAnswer();
      });
    });
  });
  observer.observe(container, {childList: true});
}
initChaptcha();