DD Captcha Solver

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

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==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);
  }
})();