n/deal-hunteru/ypyik0669 · 3 个月前
注册 登录
n/deal-hunter · 3 个月前 · 已编辑 · 641 次浏览
u/ypyik0669钻石

【HYGEN 破解3个月脚本】

const CONFIG = {
  // 固定不变的前缀
  prefix: 'HP3FREE-T',

  // 随机后缀长度
  suffixLen: 4,

  // 随机字符集:大写字母 + 数字
  charset: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',

  // 每次输入的间隔毫秒数
  intervalMs: 800,

  // 输入框 CSS 选择器
  selector: '#promotionCode',

  // 提交按钮选择器
  submitSelector: '[class*="applyButton"]',

  // 成功判定回调
  successCheck: () =>
    document.body.innerText.includes('输入正确') ||
    document.body.innerText.includes('验证成功') ||
    document.body.innerText.includes('正确'),
};

// ================================================================
//                         优化后的脚本逻辑
// ================================================================

const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

// 安全且不重复的生成逻辑:使用 Set 去重
class CodeGenerator {
  constructor(prefix, suffixLen, charset) {
    this.prefix = prefix;
    this.suffixLen = suffixLen;
    this.charset = charset;
    this.testedCodes = new Set();
  }

  generate() {
    const cs = this.charset;
    const len = this.suffixLen;
    const maxAttempts = 100;
    let attempts = 0;

    while (attempts < maxAttempts) {
      const arr = new Uint32Array(len);
      crypto.getRandomValues(arr);
      let suffix = '';
      for (let i = 0; i < len; i++) {
        suffix += cs[arr[i] % cs.length];
      }
      
      const code = this.prefix + suffix;
      if (!this.testedCodes.has(code)) {
        this.testedCodes.add(code);
        return code;
      }
      attempts++;
    }
    throw new Error('穷举碰撞空间已满或随机碰撞率过高');
  }
}

// 兼容现代前端框架的原生值设置
function setNativeValue(el, value) {
  const prototype =
    el.tagName === 'TEXTAREA'
      ? HTMLTextAreaElement.prototype
      : HTMLInputElement.prototype;

  const valueSetter = Object.getOwnPropertyDescriptor(prototype, 'value')?.set;
  if (valueSetter) {
    valueSetter.call(el, value);
  } else {
    el.value = value;
  }

  el.dispatchEvent(new Event('input', { bubbles: true }));
}

// 填充输入框
function fillInput(el, value) {
  el.focus();
  setNativeValue(el, value);
  el.dispatchEvent(new Event('change', { bubbles: true }));
}

// 动态查找提交按钮(应对 DOM 重新渲染)
function getSubmitButton() {
  if (CONFIG.submitSelector) {
    const btn = document.querySelector(CONFIG.submitSelector);
    if (btn) return btn;
  }
  return (
    Array.from(document.querySelectorAll('button')).find(
      (btn) => btn.textContent.trim().toLowerCase() === 'apply'
    ) || null
  );
}

// 主执行函数
async function run() {
  window.__stopGen = false;
  window.__pauseGen = false;

  const generator = new CodeGenerator(CONFIG.prefix, CONFIG.suffixLen, CONFIG.charset);

  console.log('▶ [自动碰撞脚本已启动]');
  console.log(`  固定前缀: ${CONFIG.prefix}`);
  console.log('  ⏸ 暂停/恢复: 控制台输入 window.__pauseGen = !window.__pauseGen');
  console.log('  ⏹ 完全停止: 控制台输入 window.__stopGen = true 或快捷键 [Alt + Q]');

  // 改用 Alt+Q 避免占用全局复制快捷键 Ctrl+C
  const onKeydown = (e) => {
    if (e.altKey && e.key.toLowerCase() === 'q') {
      e.preventDefault();
      window.__stopGen = true;
      console.log('⏹ 手动触发 [Alt + Q],强制终止碰撞程序。');
    }
  };

  window.addEventListener('keydown', onKeydown);

  let count = 0;

  try {
    while (!window.__stopGen) {
      if (window.__pauseGen) {
        await sleep(200);
        continue;
      }

      // 动态获取最新 DOM 元素
      const inputEl = document.querySelector(CONFIG.selector);
      if (!inputEl) {
        console.error('❌ 未匹配到输入框元素,将在 1 秒后重试...');
        await sleep(1000);
        continue;
      }

      const submitBtn = getSubmitButton();
      const code = generator.generate();

      fillInput(inputEl, code);

      if (submitBtn) {
        submitBtn.click();
      }

      count++;
      console.log(`[${count}] 尝试提交验证码: ${code}`);

      await sleep(CONFIG.intervalMs);

      // 验证成功判定
      if (CONFIG.successCheck()) {
        console.log(`🎉 碰撞成功!正确激活码为: %c${code}`, 'color: green; font-weight: bold; font-size: 14px;');
        console.log(`共计尝试次数: ${count}`);
        window.__stopGen = true;
        break;
      }
    }
  } catch (err) {
    console.error('❌ 脚本运行异常中止:', err.message);
  } finally {
    window.removeEventListener('keydown', onKeydown);
    console.log('⏹ 脚本执行已安全结束。');
  }
}

// 启动运行
run();
7
22
登录后参与讨论。

22 条回复

排序
  1. LazyChara 铂金 3 YEARS 3 个月前

    各位一定要选2000 credits套餐哦,这样可以把优惠码榨干

    1
  2. ypyik0669 钻石 楼主 3 YEARS 3 个月前

    天才

    1
  3. LazyChara 铂金 3 YEARS 3 个月前

    image
    :ac17:

    0
  4. jakefly 💬 黄金 3 个月前

    为什么我的优惠码只-99? :xhj27:

    0
  5. owwo 白银 3 个月前

    虽然是0 必须要支付才行吗?

    0
  6. ypyik0669 钻石 楼主 3 YEARS 3 个月前

    0刀卡就行

    0
  7. a315904815 黄金 3 YEARS 3 个月前

    0刀卡过不了

    0
  8. 继续这个对话 →
  9. ypyik0669 钻石 楼主 3 YEARS 3 个月前

    james改了ui,用不太惯 :ac01:

    0
  10. James 💯 传奇 MANAGER 3 个月前

    :xhj11: 我的锅

    2
  11. ypyik0669 钻石 楼主 3 YEARS 3 个月前
    0
  12. jakefly 💬 黄金 3 个月前

    搞定,真的很简单
    image
    image
    不过,这个可以干嘛。。。。

    0
  13. ypyik0669 钻石 楼主 3 YEARS 3 个月前

    AI视频的

    0
  14. jakefly 💬 黄金 3 个月前

    感谢佬的分享!万分感谢

    1
  15. Arun1 黄金 传奇 3 个月前

    Thanks man

    0
  16. JQ_T 白银 3 个月前

    绑的自己卡,没看到有取消续订的选项,也删不了卡,到期了可咋整啊?

    0
  17. Bridgeblock 白银 3 个月前

    「すべてのサブスクリプションはキャンセルされました。」

    0
  18. Arun1 黄金 传奇 3 个月前

    yup

    1
  19. moonlover 白银 3 个月前

    失效了吗

    0
  20. xhdd188 白银 3 个月前

    已经g了吧?

    0