DD Captcha Solver

Minimal captcha solver UI with token submission or view-only mode

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         DD Captcha Solver
// @namespace    dd-captcha-solver
// @version      1.3
// @description  Minimal captcha solver UI with token submission or view-only mode
// @match        *://*/*
// @run-at       document-start
// @grant        none
// ==/UserScript==

(function () {
  try {
    const params = new URLSearchParams(location.search);
    const ddmode = params.get("ddmode");
    const siteKey = params.get("sitekey");
    const captchaId = params.get("captchaid");
    const viewOnly = params.get("viewonly") === "1";

    if (!ddmode || !siteKey || !captchaId) return;

    /* ---------------- UI ---------------- */

    document.open();
    document.write(`
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Solve The Captcha</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
  body {
    margin: 0;
    height: 100vh;
    background: radial-gradient(circle at top, #111827, #020617);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
    color: #e5e7eb;
  }

  .box {
    text-align: center;
    padding: 40px 32px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    min-width: 320px;
  }

  h1 {
    font-size: 26px;
    margin-bottom: 24px;
    letter-spacing: 0.4px;
  }

  #captcha {
    display: flex;
    justify-content: center;
    margin-top: 10px;
  }

  .done {
    font-size: 18px;
    color: #22c55e;
    margin-bottom: 8px;
  }

  .sub {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 10px;
  }

  textarea {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
    background: #020617;
    color: #e5e7eb;
    border: 1px solid rgba(148,163,184,0.2);
    resize: none;
    font-size: 12px;
  }
</style>
</head>
<body>
  <div class="box" id="root">
    <h1>Solve The Captcha</h1>
    <div id="captcha"></div>
  </div>
</body>
</html>
`);
    document.close();

    /* ---------------- Helpers ---------------- */

    function loadScript(src) {
      return new Promise((resolve, reject) => {
        const s = document.createElement("script");
        s.src = src;
        s.async = true;
        s.defer = true;
        s.onload = resolve;
        s.onerror = reject;
        document.head.appendChild(s);
      });
    }

    function postToken(token) {
      const xhr = new XMLHttpRequest();
      xhr.open("POST", "https://captcha.bypassbot.workers.dev/", true);
      xhr.setRequestHeader("Content-Type", "application/json");
      xhr.send(JSON.stringify({
        captchaid: captchaId,
        token: token
      }));
    }

    function onSolved(token) {
      const root = document.getElementById("root");

      if (viewOnly) {
        root.innerHTML = `
          <div class="done">✅ Captcha Solved (View Only)</div>
          <div class="sub">
            <textarea readonly onclick="this.select()">${token}</textarea>
            Click to copy token
          </div>
        `;
      } else {
        postToken(token);
        root.innerHTML = `
          <div class="done">✅ Captcha Is Solved</div>
          <div class="sub">You can go back safely.</div>
        `;
      }
    }

    /* ---------------- Engines ---------------- */

    const ENGINES = {
      v2: {
          src: "https://www.google.com/recaptcha/api.js?render=explicit",
          render() {
              const wait = setInterval(() => {
                  if (
                      window.grecaptcha &&
                      typeof grecaptcha.render === "function" &&
                      typeof grecaptcha.ready === "function"
                  ) {
                      clearInterval(wait);

                      grecaptcha.ready(() => {
                          grecaptcha.render("captcha", {
                              sitekey: siteKey,
                              callback: onSolved
                          });
                      });
                  }
              }, 50);
          }
      },


      hcaptcha: {
        src: "https://js.hcaptcha.com/1/api.js?render=explicit",
        render() {
          hcaptcha.render("captcha", {
            sitekey: siteKey,
            callback: onSolved
          });
        }
      }
    };

    /* ---------------- Boot ---------------- */

    const engine = ENGINES[ddmode];
    if (!engine) return;

    loadScript(engine.src).then(engine.render);

  } catch (e) {
    console.error("DD Captcha Solver error:", e);
  }
})();