// ==UserScript== // @name ChatGPT Tools // @namespace https://linux.do/u/npc1 // @version 8.3 // @description ChatGPT 工具箱 - Token 获取、Plus 支付链接、全自动注册与账号管理 // @author npc1 // @match https://chatgpt.com/* // @match https://*.chatgpt.com/* // @match https://auth.openai.com/* // @match https://auth0.openai.com/* // @match https://pay.openai.com/* // @icon https://chatgpt.com/favicon.ico // @grant GM_setValue // @grant GM_getValue // @grant GM_deleteValue // @grant GM_xmlhttpRequest // @grant GM_setClipboard // @grant GM_addStyle // @connect dash.xphdfs.me // @run-at document-idle // @license MIT // @downloadURL none // ==/UserScript== (function(){ 'use strict'; const _0xb=s=>atob(s);const _0x8d=['tm-app-root','npcmail_api_key','registered_accounts','auto_reg_data','auto_reg_step','tm_auto_redirect_team'];const _0xg=i=>_0x8d[i]; const _0x3c=_0xb('aHR0cHM6Ly9kYXNoLnhwaGRmcy5tZQ=='); const _0x4e={API_KEY:_0xg(0x1),ACCOUNTS:_0xg(0x2),AUTO_REG:_0xg(0x3),AUTO_REG_STEP:_0xg(0x4),AUTO_REDIRECT_TEAM:_0xg(0x5)}; const _0x5f={IDLE:'idle',GOTO_SIGNUP:'goto_signup',FILL_EMAIL:'fill_email',FILL_PASSWORD:'fill_password',WAIT_CODE:'wait_code',FILL_CODE:'fill_code',FILL_PROFILE:'fill_profile',COMPLETE:'complete'}; GM_addStyle(`#tm-app-root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;position:fixed;bottom:30px;right:30px;z-index:2147483647;display:flex;flex-direction:column-reverse;align-items:flex-end;gap:16px;pointer-events:none}.tm-app-trigger{width:56px;height:56px;border-radius:20px;background:#10a37f;box-shadow:0 8px 20px rgba(16,163,127,0.4);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all 0.3s cubic-bezier(0.34,1.56,0.64,1);color:white;font-size:24px;pointer-events:auto}.tm-app-trigger:hover{transform:scale(1.05);background:#0d8a6a}.tm-app-trigger:active{transform:scale(0.95)}.tm-app-trigger.is-open{transform:rotate(45deg);background:#333}.tm-app-panel{width:300px;background:rgba(255,255,255,0.95);backdrop-filter:blur(12px);border-radius:24px;box-shadow:0 20px 40px rgba(0,0,0,0.15);overflow:hidden;opacity:0;transform:translateY(20px) scale(0.95);pointer-events:none;transform-origin:bottom right;transition:all 0.3s cubic-bezier(0.2,0.8,0.2,1)}.tm-app-panel.is-visible{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}.tm-panel-header{padding:20px 20px 10px;display:flex;justify-content:space-between;align-items:flex-end}.tm-panel-title{font-size:18px;font-weight:700;color:#1a1a1a}.tm-panel-ver{font-size:12px;font-weight:500;color:#9ca3af;background:#f3f4f6;padding:2px 8px;border-radius:10px}.tm-panel-body{padding:10px;display:flex;flex-direction:column;gap:6px}.tm-action-item{display:flex;align-items:center;gap:12px;padding:12px 16px;border-radius:16px;border:none;background:transparent;cursor:pointer;transition:all 0.2s;text-align:left;width:100%;color:#374151}.tm-action-item:hover{background:#f3f4f6;color:#000}.tm-action-item:active{transform:scale(0.98);background:#e5e7eb}.tm-icon-box{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0}.tm-icon-key{background:#d1fae5;color:#059669}.tm-icon-card{background:#dbeafe;color:#2563eb}.tm-icon-reg{background:#fef3c7;color:#d97706}.tm-icon-list{background:#e0e7ff;color:#4f46e5}.tm-icon-settings{background:#f3f4f6;color:#6b7280}.tm-icon-about{background:#ede9fe;color:#7c3aed}.tm-text-box{display:flex;flex-direction:column;gap:2px}.tm-action-title{font-size:14px;font-weight:600}.tm-action-desc{font-size:11px;color:#9ca3af}.tm-divider{height:1px;background:#f3f4f6;margin:4px 16px}.tm-modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.4);backdrop-filter:blur(4px);z-index:2147483648;display:flex;justify-content:center;align-items:center;opacity:0;visibility:hidden;transition:0.3s}.tm-modal-overlay.show{opacity:1;visibility:visible}.tm-modal{background:white;width:450px;max-width:90vw;max-height:80vh;border-radius:20px;padding:24px;box-shadow:0 25px 50px -12px rgba(0,0,0,0.25);transform:scale(0.9);transition:0.3s cubic-bezier(0.16,1,0.3,1);overflow-y:auto}.tm-modal-overlay.show .tm-modal{transform:scale(1)}.tm-modal h3{margin:0 0 16px;font-size:18px;color:#111827;display:flex;align-items:center;gap:8px}.tm-code-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:12px;font-family:monospace;font-size:12px;color:#334155;word-break:break-all;max-height:100px;overflow-y:auto}.tm-modal-tip{margin-top:12px;font-size:12px;color:#ef4444;background:#fef2f2;padding:8px;border-radius:6px}.tm-modal-actions{margin-top:20px;display:flex;justify-content:flex-end;gap:8px}.tm-btn{border:none;padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;transition:all 0.2s}.tm-btn:hover{filter:brightness(0.95)}.tm-btn-close{background:#f1f5f9;color:#475569}.tm-btn-primary{background:#10a37f;color:white}.tm-btn-danger{background:#ef4444;color:white}.tm-btn-small{padding:4px 10px;font-size:11px}.tm-input{width:100%;padding:12px 14px;border:1px solid #e2e8f0;border-radius:10px;font-size:14px;outline:none;transition:all 0.2s;box-sizing:border-box;color:#1f2937;background-color:#ffffff}.tm-input:focus{border-color:#10a37f;box-shadow:0 0 0 3px rgba(16,163,127,0.1)}.tm-input::placeholder{color:#9ca3af}.tm-label{display:block;margin-bottom:6px;font-size:13px;font-weight:600;color:#374151}.tm-account-list{max-height:300px;overflow-y:auto}.tm-account-item{padding:12px;border:1px solid #e5e7eb;border-radius:12px;margin-bottom:8px;background:#fafafa}.tm-account-item:hover{background:#f3f4f6}.tm-account-email{font-weight:600;color:#111827;font-size:13px;word-break:break-all}.tm-account-password{font-family:monospace;font-size:12px;color:#6b7280;margin-top:4px}.tm-account-actions{margin-top:8px;display:flex;gap:6px;flex-wrap:wrap}.tm-account-status{font-size:11px;color:#9ca3af;margin-top:4px}.tm-empty-state{text-align:center;padding:40px 20px;color:#9ca3af}.tm-status-bar{position:fixed;top:20px;left:50%;transform:translateX(-50%);z-index:2147483649;background:linear-gradient(135deg,#10a37f,#0d8a6a);color:white;padding:12px 24px;border-radius:12px;font-size:14px;font-weight:600;box-shadow:0 10px 30px rgba(16,163,127,0.4);display:none;align-items:center;gap:10px}.tm-status-bar.show{display:flex}.tm-status-bar .spinner{width:16px;height:16px;border:2px solid rgba(255,255,255,0.3);border-top-color:white;border-radius:50%;animation:spin 1s linear infinite}.tm-status-bar .tm-stop-btn{background:rgba(255,255,255,0.2);border:none;color:white;padding:4px 12px;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;margin-left:12px}.tm-status-bar .tm-stop-btn:hover{background:rgba(255,255,255,0.3)}@keyframes spin{to{transform:rotate(360deg)}}.tm-modal-about{text-align:center}.tm-about-header{display:flex;align-items:center;justify-content:center;gap:16px;margin-bottom:20px;padding-bottom:20px;border-bottom:1px solid #e5e7eb}.tm-about-logo{width:64px;height:64px;border-radius:16px;background:linear-gradient(135deg,#10a37f,#0d8a6a);display:flex;align-items:center;justify-content:center;font-size:32px;box-shadow:0 8px 20px rgba(16,163,127,0.3)}.tm-about-title-box{text-align:left}.tm-about-title-box h3{font-size:22px;color:#111827;margin:0 0 4px 0}.tm-about-version{display:inline-block;background:linear-gradient(135deg,#10a37f,#0d8a6a);color:white;padding:4px 12px;border-radius:20px;font-size:12px;font-weight:600}.tm-about-desc{font-size:14px;color:#6b7280;line-height:1.6;margin-bottom:20px;text-align:left}.tm-about-section{margin-bottom:16px;text-align:left}.tm-about-section-title{font-size:14px;font-weight:600;color:#374151;margin-bottom:10px}.tm-about-features{display:grid;grid-template-columns:1fr 1fr;gap:8px}.tm-about-feature{font-size:12px;color:#6b7280;padding:8px 12px;background:#f9fafb;border-radius:8px;transition:all 0.2s}.tm-about-feature:hover{background:#f3f4f6;color:#374151}.tm-about-tips{display:flex;flex-direction:column;gap:6px}.tm-about-tip{font-size:12px;color:#6b7280;padding:8px 12px;background:#fffbeb;border-radius:8px;border-left:3px solid #f59e0b}.tm-about-footer{margin-top:20px;padding-top:16px;border-top:1px solid #e5e7eb}.tm-about-developer{display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px;background:linear-gradient(135deg,#f0fdf4,#dcfce7);border:1px solid #bbf7d0;border-radius:10px;margin-bottom:12px;text-decoration:none;color:#166534;font-size:13px;font-weight:500;transition:all 0.2s;cursor:pointer}.tm-about-developer:hover{background:linear-gradient(135deg,#dcfce7,#bbf7d0);transform:translateY(-1px);box-shadow:0 4px 12px rgba(22,101,52,0.15)}.tm-developer-icon{font-size:16px}.tm-developer-text{flex:1}.tm-developer-arrow{font-size:14px;opacity:0.6;transition:transform 0.2s}.tm-about-developer:hover .tm-developer-arrow{transform:translateX(3px);opacity:1}.tm-about-copyright{font-size:11px;color:#9ca3af}.tm-modal-success{padding:28px !important}.tm-success-icon{width:80px;height:80px;margin:0 auto;background:linear-gradient(135deg,#d1fae5,#a7f3d0);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:40px;box-shadow:0 8px 24px rgba(16,185,129,0.25);animation:tm-success-bounce 0.6s ease-out}@keyframes tm-success-bounce{0%{transform:scale(0);opacity:0}50%{transform:scale(1.1)}100%{transform:scale(1);opacity:1}}.tm-success-subtitle{font-size:13px;color:#6b7280;margin-bottom:20px}.tm-success-info{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:16px;margin-bottom:16px}.tm-success-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0}.tm-success-row:first-child{border-bottom:1px solid #e2e8f0}.tm-success-label{font-size:12px;color:#9ca3af;font-weight:500}.tm-success-value{font-size:13px;color:#1f2937;font-weight:600;font-family:monospace;word-break:break-all;max-width:200px;text-align:right}.tm-success-redirect{background:linear-gradient(135deg,#ecfdf5,#d1fae5);border-radius:10px;padding:12px 16px;margin-bottom:4px}.tm-success-redirect-text{font-size:13px;color:#059669;font-weight:500;margin-bottom:10px}.tm-success-redirect-text span{display:inline-block;width:20px;height:20px;background:#059669;color:white;border-radius:50%;font-size:12px;line-height:20px;text-align:center;font-weight:700}.tm-success-progress{height:4px;background:rgba(5,150,105,0.2);border-radius:2px;overflow:hidden}.tm-success-progress-bar{height:100%;background:linear-gradient(90deg,#10b981,#059669);border-radius:2px;width:100%}`); function _0x7b(t){GM_setClipboard(t,'text');return!0;} const _0x8c=['James','John','Robert','Michael','William','David','Richard','Joseph','Thomas','Charles','Mary','Patricia','Jennifer','Linda','Barbara','Elizabeth','Susan','Jessica','Sarah','Karen','Emma','Olivia','Ava','Sophia','Isabella','Liam','Noah','Oliver','Elijah','Lucas']; const _0x9d=['Smith','Johnson','Williams','Brown','Jones','Garcia','Miller','Davis','Rodriguez','Martinez','Hernandez','Lopez','Gonzalez','Wilson','Anderson','Thomas','Taylor','Moore','Jackson','Martin','Lee','Thompson','White','Harris','Clark']; function _0xae(l=0x10){const c='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%';let p='';p+='ABCDEFGHIJKLMNOPQRSTUVWXYZ'[Math.floor(Math.random()*0x1a)];p+='abcdefghijklmnopqrstuvwxyz'[Math.floor(Math.random()*0x1a)];p+='0123456789'[Math.floor(Math.random()*0xa)];p+='!@#$%'[Math.floor(Math.random()*0x5)];for(let i=0x4;iMath.random()-0.5).join('');} function _0xbf(){return{firstName:_0x8c[Math.floor(Math.random()*_0x8c.length)],lastName:_0x9d[Math.floor(Math.random()*_0x9d.length)]};} function _0xc0(){const y=new Date().getFullYear();const yr=y-0x12-Math.floor(Math.random()*0x1e);const m=Math.floor(Math.random()*0xc)+0x1;const d=Math.floor(Math.random()*0x1c)+0x1;return{year:yr,month:m,day:d};} function _0xd1(e,o={}){const k=GM_getValue(_0x4e.API_KEY,'');if(!k){return Promise.reject(new Error('请先配置 API Key'));}return new Promise((r,j)=>{GM_xmlhttpRequest({method:o.method||'GET',url:_0x3c+e,headers:{'X-API-Key':k,'Content-Type':_0xb('YXBwbGljYXRpb24vanNvbg==')},data:o.body?JSON.stringify(o.body):undefined,onload:function(rs){try{const d=JSON.parse(rs.responseText);if(rs.status>=0xc8&&rs.status<0x12c){r(d);}else{j(new Error(d.error||d.message||'HTTP '+rs.status));}}catch(x){j(new Error('JSON 解析失败'));}},onerror:function(x){j(new Error('网络请求失败'));}});});} async function _0xe2(){return await _0xd1(_0xb('L2FwaS9wdWJsaWMvYXBpLWtleS9pbmZv'));} async function _0xf3(d=null,p=null){const b={count:0x1,expiryDays:0x7};d&&(b.domain=d);p&&(b.prefix=p);const r=await _0xd1(_0xb('L2FwaS9wdWJsaWMvYmF0Y2gtY3JlYXRlLWVtYWlscw=='),{method:'POST',body:b});if(r.emails&&r.emails.length>0x0)return r.emails[0x0];throw new Error('创建邮箱失败');} async function _0x115(a){const r=await _0xd1(_0xb('L2FwaS9wdWJsaWMvZXh0cmFjdC1jb2Rlcw=='),{method:'POST',body:{addresses:[a]}});if(r&&r.length>0x0&&r[0x0].code)return r[0x0].code;return null;} function _0x126(){return GM_getValue(_0x4e.ACCOUNTS,[]);} function _0x137(a){const ac=_0x126();const i=ac.findIndex(x=>x.email===a.email);i>=0x0?ac[i]={...ac[i],...a}:ac.unshift(a);GM_setValue(_0x4e.ACCOUNTS,ac);} function _0x148(e){GM_setValue(_0x4e.ACCOUNTS,_0x126().filter(a=>a.email!==e));} function _0x159(){return GM_getValue(_0x4e.AUTO_REG,null);} function _0x16a(d){GM_setValue(_0x4e.AUTO_REG,d);} function _0x17b(){return GM_getValue(_0x4e.AUTO_REG_STEP,_0x5f.IDLE);} function _0x18c(s){GM_setValue(_0x4e.AUTO_REG_STEP,s);console.log('[AutoReg] Step:',s);} function _0x19d(){GM_deleteValue(_0x4e.AUTO_REG);GM_deleteValue(_0x4e.AUTO_REG_STEP);} function _0x1ae(m){return new Promise(r=>setTimeout(r,m));} function _0x1bf(s,t=0x2710){return new Promise((r,j)=>{const e=document.querySelector(s);if(e){r(e);return;}const o=new MutationObserver(()=>{const el=document.querySelector(s);if(el){o.disconnect();r(el);}});o.observe(document.body,{childList:!0,subtree:!0});setTimeout(()=>{o.disconnect();j(new Error('元素未找到: '+s));},t);});} function _0x1c0(i,v){i.focus();const n=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,'value').set;n.call(i,v);i.dispatchEvent(new Event('input',{bubbles:!0,composed:!0}));i.dispatchEvent(new Event('change',{bubbles:!0,composed:!0}));for(const c of v){i.dispatchEvent(new KeyboardEvent('keydown',{key:c,bubbles:!0}));i.dispatchEvent(new KeyboardEvent('keypress',{key:c,bubbles:!0}));i.dispatchEvent(new KeyboardEvent('keyup',{key:c,bubbles:!0}));}i.dispatchEvent(new Event('blur',{bubbles:!0}));i.focus();} async function _0x1d1(e,v){console.log('[AutoReg] Setting spinbutton:',v);e.focus();e.click();await _0x1ae(0xc8);if(!e.textContent.match(/\d/)){e.dispatchEvent(new KeyboardEvent('keydown',{key:'ArrowDown',bubbles:!0}));await _0x1ae(0x64);}let m=0x64;while(m-->0x0){let t=e.textContent||e.getAttribute('aria-valuenow')||'';let c=parseInt(t.replace(/\D/g,''));if(isNaN(c)){e.dispatchEvent(new KeyboardEvent('keydown',{key:'ArrowDown',bubbles:!0}));await _0x1ae(0x64);continue;}let d=v-c;if(d===0x0)break;const k=d>0x0?'ArrowUp':'ArrowDown';e.dispatchEvent(new KeyboardEvent('keydown',{key:k,bubbles:!0}));await _0x1ae(0x50);}e.setAttribute('aria-valuenow',v);e.dispatchEvent(new Event('change',{bubbles:!0}));e.dispatchEvent(new Event('blur',{bubbles:!0}));await _0x1ae(0x64);} function _0x1e2(e){e.click();e.dispatchEvent(new MouseEvent('click',{bubbles:!0,cancelable:!0}));} function _0x1f3(s,ts){const es=document.querySelectorAll(s);for(const e of es){const t=e.textContent.toLowerCase();for(const x of ts){if(t.includes(x.toLowerCase()))return e;}}return null;} function _0x437(){if(document.getElementById('tm-status-bar'))return;const b=document.createElement('div');b.id='tm-status-bar';b.className='tm-status-bar';b.innerHTML='
自动注册中...';document.body.appendChild(b);document.getElementById('tm-stop-reg').onclick=_0x98c;} function _0x98c(){_0x19d();_0xa9d();alert('已终止自动注册');} function _0xbae(t){const b=document.getElementById('tm-status-bar');const e=document.getElementById('tm-status-text');if(b&&e){e.innerText=t;b.classList.add('show');}} function _0xa9d(){const b=document.getElementById('tm-status-bar');if(b)b.classList.remove('show');} function _0x204(){if(document.getElementById(_0xg(0x0)))return;_0x215();_0x326();_0x437();_0x548();} function _0x215(){const r=document.createElement('div');r.id=_0xg(0x0);const p=document.createElement('div');p.className='tm-app-panel';p.innerHTML='
ChatGPT Tools
v8.3
';const g=document.createElement('button');g.className='tm-app-trigger';g.innerHTML='';g.onclick=(e)=>{e.stopPropagation();p.classList.toggle('is-visible');g.classList.toggle('is-open');};document.addEventListener('click',(e)=>{if(!r.contains(e.target)&&p.classList.contains('is-visible')){p.classList.remove('is-visible');g.classList.remove('is-open');}});r.appendChild(p);r.appendChild(g);document.body.appendChild(r);p.addEventListener('click',async(e)=>{e.stopPropagation();const b=e.target.closest('.tm-action-item');if(!b)return;const i=b.id;switch(i){case'tm-act-token':_0xcbf();break;case'tm-act-pay':_0xdd0();break;case'tm-act-team-short':_0xee1();break;case'tm-act-register':_0x659();break;case'tm-act-accounts':_0xff2();break;case'tm-act-settings':_0x76a();break;case'tm-act-about':_0x103();}});} function _0x326(){if(!document.getElementById('tm-modal-pay')){const m=document.createElement('div');m.id='tm-modal-pay';m.className='tm-modal-overlay';m.innerHTML='

生成成功

Plus 支付长链接已复制:
⚠️ 警告:请在【无痕模式】+【全局节点】下打开
';document.body.appendChild(m);document.getElementById('tm-modal-pay-close').onclick=()=>document.getElementById('tm-modal-pay').classList.remove('show');document.getElementById('tm-modal-pay-copy').onclick=function(){_0x7b(document.getElementById('tm-modal-pay-code').innerText);this.innerText='已复制!';setTimeout(()=>this.innerText='再次复制',0x7d0);};}if(!document.getElementById('tm-modal-settings')){const m=document.createElement('div');m.id='tm-modal-settings';m.className='tm-modal-overlay';m.innerHTML='

⚙️ 设置

API: '+_0x3c+'
开启后,注册完成将自动生成 Team 短链接并跳转
';document.body.appendChild(m);document.getElementById('tm-settings-close').onclick=()=>document.getElementById('tm-modal-settings').classList.remove('show');document.getElementById('tm-settings-test').onclick=async function(){const st=document.getElementById('tm-settings-status');const k=document.getElementById('tm-settings-apikey').value.trim();if(!k){st.style.display='block';st.style.background='#fef2f2';st.style.color='#ef4444';st.innerText='❌ 请输入 API Key';return;}GM_setValue(_0x4e.API_KEY,k);this.innerText='测试中...';try{const i=await _0xe2();st.style.display='block';st.style.background='#d1fae5';st.style.color='#059669';st.innerText='✅ 连接成功!剩余: '+i.remaining_calls;}catch(e){st.style.display='block';st.style.background='#fef2f2';st.style.color='#ef4444';st.innerText='❌ '+e.message;}this.innerText='测试连接';};document.getElementById('tm-settings-save').onclick=function(){GM_setValue(_0x4e.API_KEY,document.getElementById('tm-settings-apikey').value.trim());GM_setValue(_0x4e.AUTO_REDIRECT_TEAM,document.getElementById('tm-settings-auto-redirect').checked);GM_setValue('tm_reg_prefix',document.getElementById('tm-settings-reg-prefix').value.trim());GM_setValue('tm_reg_domain',document.getElementById('tm-settings-reg-domain').value);document.getElementById('tm-modal-settings').classList.remove('show');};}if(!document.getElementById('tm-modal-accounts')){const m=document.createElement('div');m.id='tm-modal-accounts';m.className='tm-modal-overlay';m.innerHTML='

📋 账号列表

';document.body.appendChild(m);document.getElementById('tm-accounts-close').onclick=()=>document.getElementById('tm-modal-accounts').classList.remove('show');}if(!document.getElementById('tm-modal-about')){const m=document.createElement('div');m.id='tm-modal-about';m.className='tm-modal-overlay';m.innerHTML='

ChatGPT Tools

v8.3
一个功能强大的 ChatGPT 工具脚本,提供 Token 获取、Plus 支付链接生成、全自动注册与账号管理等功能。
✨ 功能特性
🔑 复制 Access Token
💳 生成 Plus 支付链接
🔗 Team 短链接生成
🚀 全自动注册
📋 账号列表管理
⚙️ 自定义邮箱配置
📝 使用说明
1. 首次使用请在设置中配置 NPCmail API Key
2. 支付链接请在无痕模式 + 全局节点下使用
3. 本脚本仅在 ChatGPT 相关域名下运行
';document.body.appendChild(m);document.getElementById('tm-about-close').onclick=()=>document.getElementById('tm-modal-about').classList.remove('show');}if(!document.getElementById('tm-modal-success')){const m=document.createElement('div');m.id='tm-modal-success';m.className='tm-modal-overlay';m.innerHTML='
🎉

注册成功!

账号信息已保存到列表
邮箱
密码
3 秒后自动跳转 Team 支付页面...
';document.body.appendChild(m);}} function _0x214(e,pw,oc,cn){document.getElementById('tm-success-email').innerText=e;document.getElementById('tm-success-password').innerText=pw;const rs=document.querySelector('.tm-success-redirect');const cb=document.getElementById('tm-success-cancel');const ce=document.getElementById('tm-success-countdown');const pb=document.getElementById('tm-success-progress-bar');const wr=typeof oc==='function';if(wr){rs.style.display='block';cb.style.display='inline-block';cb.innerText='取消跳转';}else{rs.style.display='none';cb.style.display='inline-block';cb.innerText='关闭';}document.getElementById('tm-modal-success').classList.add('show');let cd=0x3;let cl=!1;let tm=null;if(wr){ce.innerText=cd;pb.style.width='100%';pb.style.transition='none';setTimeout(()=>{pb.style.transition='width 3s linear';pb.style.width='0%';},0x32);tm=setInterval(()=>{if(cl){clearInterval(tm);return;}cd--;ce.innerText=cd;if(cd<=0x0){clearInterval(tm);document.getElementById('tm-modal-success').classList.remove('show');oc();}},0x3e8);}cb.onclick=function(){cl=!0;if(tm)clearInterval(tm);document.getElementById('tm-modal-success').classList.remove('show');if(cn)cn();};document.getElementById('tm-success-copy').onclick=function(){_0x7b('邮箱: '+e+'\n密码: '+pw);this.innerText='✅ 已复制';setTimeout(()=>this.innerText='📋 复制账号',0x5dc);};} async function _0x325(){const r=await fetch(_0xb('L2FwaS9hdXRoL3Nlc3Npb24='));if(r.status===0x193)throw new Error('403 Forbidden');const d=await r.json();if(!d.accessToken)throw new Error('未登录');return d.accessToken;} async function _0xcbf(){const b=document.getElementById('tm-act-token');const t=b.querySelector('.tm-action-title');const o=t.innerText;try{t.innerText='获取中...';_0x7b(await _0x325());t.innerText='✅ 已复制';}catch(e){t.innerText='❌ '+e.message;}setTimeout(()=>t.innerText=o,0x7d0);} async function _0xdd0(){const b=document.getElementById('tm-act-pay');const t=b.querySelector('.tm-action-title');const o=t.innerText;try{t.innerText='请求中...';const tk=await _0x325();const r=await fetch(_0xb('aHR0cHM6Ly9jaGF0Z3B0LmNvbS9iYWNrZW5kLWFwaS9wYXltZW50cy9jaGVja291dA=='),{method:'POST',headers:{'Authorization':'Bearer '+tk,'Content-Type':_0xb('YXBwbGljYXRpb24vanNvbg==')},body:JSON.stringify({plan_type:'plus',checkout_ui_mode:'hosted',cancel_url:_0xb('aHR0cHM6Ly9jaGF0Z3B0LmNvbS8='),success_url:_0xb('aHR0cHM6Ly9jaGF0Z3B0LmNvbS8=')})});const d=await r.json();if(d.url){_0x7b(d.url);document.getElementById('tm-modal-pay-code').innerText=d.url;document.getElementById('tm-modal-pay').classList.add('show');t.innerText='✅ 成功';}else throw new Error(d.detail||'API 错误');}catch(e){alert('错误: '+e);t.innerText='❌ 出错';}setTimeout(()=>t.innerText=o,0x7d0);} async function _0xee1(){const b=document.getElementById('tm-act-team-short');const t=b.querySelector('.tm-action-title');const o=t.innerText;try{t.innerText='请求中...';const sr=await fetch(_0xb('L2FwaS9hdXRoL3Nlc3Npb24='));const ct=sr.headers.get('content-type');if(!ct||!ct.includes(_0xb('YXBwbGljYXRpb24vanNvbg=='))){alert('请先登录 ChatGPT!');t.innerText=o;return;}const tk=await sr.json();if(!tk.accessToken){alert('请先登录 ChatGPT!');t.innerText=o;return;}const p={plan_name:'chatgptteamplan',team_plan_data:{workspace_name:'MyTeam',price_interval:'month',seat_quantity:0x5},promo_campaign:{promo_campaign_id:'team-1-month-free',is_coupon_from_query_param:!0},checkout_ui_mode:'custom'};const r=await fetch(_0xb('aHR0cHM6Ly9jaGF0Z3B0LmNvbS9iYWNrZW5kLWFwaS9wYXltZW50cy9jaGVja291dA=='),{method:'POST',headers:{Authorization:'Bearer '+tk.accessToken,'Content-Type':_0xb('YXBwbGljYXRpb24vanNvbg==')},body:JSON.stringify(p)});const d=await r.json();if(d.checkout_session_id){const su=_0xb('aHR0cHM6Ly9jaGF0Z3B0LmNvbS9jaGVja291dC9vcGVuYWlfbGxjLw==')+d.checkout_session_id;_0x7b(su);document.getElementById('tm-modal-pay-code').innerText=su;document.getElementById('tm-modal-pay').classList.add('show');t.innerText='✅ 成功';}else{alert('提取失败:'+(d.detail||JSON.stringify(d)));t.innerText='❌ 出错';}}catch(e){alert('发生错误:'+e);t.innerText='❌ 出错';}setTimeout(()=>t.innerText=o,0x7d0);} async function _0x436(e,pw){try{const sr=await fetch(_0xb('L2FwaS9hdXRoL3Nlc3Npb24='));const ct=sr.headers.get('content-type');if(!ct||!ct.includes(_0xb('YXBwbGljYXRpb24vanNvbg=='))){_0xa9d();alert('获取会话失败,请手动操作');return;}const tk=await sr.json();if(!tk.accessToken){_0xa9d();alert('获取 Token 失败,请手动操作');return;}_0xbae('正在生成 Team 短链接...');const p={plan_name:'chatgptteamplan',team_plan_data:{workspace_name:'MyTeam',price_interval:'month',seat_quantity:0x5},promo_campaign:{promo_campaign_id:'team-1-month-free',is_coupon_from_query_param:!0},checkout_ui_mode:'custom'};const r=await fetch(_0xb('aHR0cHM6Ly9jaGF0Z3B0LmNvbS9iYWNrZW5kLWFwaS9wYXltZW50cy9jaGVja291dA=='),{method:'POST',headers:{Authorization:'Bearer '+tk.accessToken,'Content-Type':_0xb('YXBwbGljYXRpb24vanNvbg==')},body:JSON.stringify(p)});const d=await r.json();if(d.checkout_session_id){const su=_0xb('aHR0cHM6Ly9jaGF0Z3B0LmNvbS9jaGVja291dC9vcGVuYWlfbGxjLw==')+d.checkout_session_id;_0xa9d();_0x214(e,pw,()=>{window.location.href=su;},()=>{console.log('[AutoReg] 用户取消跳转');});}else{_0xa9d();alert('生成 Team 短链接失败:'+(d.detail||JSON.stringify(d)));}}catch(ex){_0xa9d();alert('生成 Team 短链接出错:'+ex);}} async function _0x547(){const dd=['git-hub.email','hccc.edu.kg','xphdfs.me','kiroxubei.tech','xpzsd.codes','zhurunqi.love','geminikey.app','geminikey.email','880070.xyz','880333.xyz','ghukr.cn','292998.xyz'];let ad=[];try{const d=await _0xd1(_0xb('L2FwaS9wdWJsaWMvZG9tYWlucw=='));if(Array.isArray(d))ad=d;else if(d&&d.domains)ad=d.domains;}catch(e){console.warn('获取域名失败:',e);}return[...new Set([...ad,...dd])];} async function _0x76a(){document.getElementById('tm-settings-apikey').value=GM_getValue(_0x4e.API_KEY,'');document.getElementById('tm-settings-auto-redirect').checked=GM_getValue(_0x4e.AUTO_REDIRECT_TEAM,!1);document.getElementById('tm-settings-reg-prefix').value=GM_getValue('tm_reg_prefix','');const sd=GM_getValue('tm_reg_domain','');const ds=document.getElementById('tm-settings-reg-domain');if(ds.options.length<=0x2){const dm=await _0x547();const lo=ds.querySelector('option[value="LOADING"]');if(lo)lo.remove();dm.forEach(d=>{const dn=typeof d==='string'?d:d.domain;if(!ds.querySelector('option[value="'+dn+'"]')){const o=document.createElement('option');o.value=dn;o.innerText=dn;ds.appendChild(o);}});}ds.value=sd||'';document.getElementById('tm-settings-status').style.display='none';document.getElementById('tm-modal-settings').classList.add('show');} function _0x103(){document.getElementById('tm-modal-about').classList.add('show');} function _0xff2(){const ac=_0x126();const ls=document.getElementById('tm-accounts-list');if(ac.length===0x0){ls.innerHTML='
📭 暂无账号
';}else{ls.innerHTML=ac.map((a,i)=>'
').join('');}document.getElementById('tm-modal-accounts').classList.add('show');} document.addEventListener('click',async function(e){const b=e.target.closest('[data-action]');if(!b)return;const a=b.dataset.action;if(a==='copy'){const i=parseInt(b.dataset.index);const ac=_0x126()[i];if(ac){_0x7b('邮箱: '+ac.email+'\n密码: '+ac.password);alert('已复制!');}}else if(a==='code'){const em=b.dataset.email;try{b.innerText='加载中...';const c=await _0x115(em);if(c){_0x7b(c);alert('验证码: '+c+'\n已复制');}else alert('未找到验证码');}catch(ex){alert('错误: '+ex.message);}b.innerText='📨 验证码';}else if(a==='del'){const em=b.dataset.email;if(confirm('确定删除?')){_0x148(em);_0xff2();}}}); async function _0x659(){const k=GM_getValue(_0x4e.API_KEY,'');if(!k){alert('请先在设置中配置 NPCmail API Key');_0x76a();return;}const p=GM_getValue('tm_reg_prefix','');const d=GM_getValue('tm_reg_domain','');await _0x87b({prefix:p,domain:d});} async function _0x87b(c={}){try{_0xbae('正在创建邮箱...');const ed=await _0xf3(c.domain||null,c.prefix||null);const rd={email:ed.address,password:_0xae(),..._0xbf(),birthday:_0xc0(),createdAt:new Date().toISOString(),status:'注册中'};_0x16a(rd);_0x18c(_0x5f.GOTO_SIGNUP);_0x137(rd);_0xbae('正在跳转注册页面...');await _0x1ae(0x1f4);window.location.href=_0xb('aHR0cHM6Ly9jaGF0Z3B0LmNvbS9hdXRoL2xvZ2lu');}catch(e){_0xa9d();alert('创建邮箱失败: '+e.message);_0x19d();}} async function _0x98d(d){_0xbae('正在填写密码...');const pi=await _0x1bf('input[type="password"], input[name="password"]',0x3a98);_0x1c0(pi,d.password);await _0x1ae(0x3e8);let cb=document.querySelector('button[type="submit"]')||_0x1f3('button',['Continue','继续','Next']);if(cb){_0x1e2(cb);_0x18c(_0x5f.WAIT_CODE);_0xbae('等待验证码...');await _0x1ae(0x7d0);await _0xa9e(d);}} async function _0xa9e(d){_0xbae('等待验证码邮件...');let c=null;for(let i=0x0;i<0x3c;i++){_0xbae('等待验证码... ('+(i+0x1)+'/60)');c=await _0x115(d.email);if(c)break;await _0x1ae(0xbb8);}if(c){_0x16a({...d,verificationCode:c});_0x18c(_0x5f.FILL_CODE);await _0xbaf(c,d);}else{throw new Error('验证码获取超时');}} async function _0xbaf(c,d){_0xbae('正在填写验证码...');await _0x1ae(0x3e8);const ci=document.querySelectorAll('input[type="text"][maxlength="1"], input[autocomplete="one-time-code"]');if(ci.length>=0x6){for(let i=0x0;i0x0){_0x1c0(ai[0x0],d.firstName+' '+d.lastName);}}await _0x1ae(0x1f4);const bd=d.birthday;const sb=document.querySelectorAll('[role="spinbutton"]');if(sb.length>=0x3){await _0x1d1(sb[0x0],bd.year);await _0x1d1(sb[0x1],bd.month);await _0x1d1(sb[0x2],bd.day);}else{const vi=Array.from(document.querySelectorAll('input')).filter(el=>{const r=el.getBoundingClientRect();return r.width>0x0&&r.height>0x0&&el.type!=='hidden';});if(vi.length>0x1){const bs=bd.year+'/'+String(bd.month).padStart(0x2,'0')+'/'+String(bd.day).padStart(0x2,'0');_0x1c0(vi[0x1],bs);}}await _0x1ae(0x3e8);let cb=document.querySelector('button[type="submit"]')||_0x1f3('button',['Continue','继续','Agree','同意']);if(cb){_0x1e2(cb);const cu=window.location.href;let s=0x0;while(window.location.href===cu){s++;_0xbae('正在等待页面加载... ('+s+'s)');await _0x1ae(0x3e8);if(!document.querySelector('[role="spinbutton"]'))break;}_0x18c(_0x5f.COMPLETE);_0xa9d();_0x137({...d,status:'注册完成'});_0x19d();const ar=GM_getValue(_0x4e.AUTO_REDIRECT_TEAM,!1);if(ar){_0xbae('注册完成,正在生成 Team 短链接...');await _0x1ae(0x5dc);await _0x436(d.email,d.password);}else{_0x214(d.email,d.password,null,null);}}} async function _0x548(){let st=_0x17b();const d=_0x159();if(st===_0x5f.IDLE||!d)return;const u=window.location.href;const ia=u.includes('auth.openai.com')||u.includes('/auth/');if(!ia&&st!==_0x5f.IDLE&&st!==_0x5f.COMPLETE){_0x18c(_0x5f.COMPLETE);_0xa9d();_0x137({...d,status:'注册完成'});_0x19d();const ar=GM_getValue(_0x4e.AUTO_REDIRECT_TEAM,!1);if(ar){_0xbae('注册完成,正在生成 Team 短链接...');await _0x1ae(0x5dc);await _0x436(d.email,d.password);}else{_0x214(d.email,d.password,null,null);}return;}await _0x1ae(0x7d0);try{const hp=document.querySelector('input[type="password"]');const he=document.querySelector('input[type="email"], input[name="email"]')&&!hp;const hc=document.querySelector('input[maxlength="1"], input[autocomplete="one-time-code"], input[name="code"]');const hpi=document.querySelector('input[name="firstName"], input[name="first_name"], input[id*="firstName"]');if(hc&&st!==_0x5f.FILL_CODE&&st!==_0x5f.WAIT_CODE){st=_0x5f.FILL_CODE;_0x18c(st);}else if(hpi&&st!==_0x5f.FILL_PROFILE){st=_0x5f.FILL_PROFILE;_0x18c(st);}else if(hp&&(st===_0x5f.FILL_EMAIL||st===_0x5f.GOTO_SIGNUP)){st=_0x5f.FILL_PASSWORD;_0x18c(st);}if(st===_0x5f.GOTO_SIGNUP){_0xbae('正在准备注册...');await _0x1ae(0x3e8);let sl=document.querySelector('a[href*="signup"], [data-testid="signup-link"]')||_0x1f3('a, button',['Sign up','注册','Create account']);if(sl){_0x18c(_0x5f.FILL_EMAIL);_0x1e2(sl);}else{_0x18c(_0x5f.FILL_EMAIL);await _0x548();}}else if(st===_0x5f.FILL_EMAIL){_0xbae('正在填写邮箱...');await _0x1ae(0x3e8);const ei=await _0x1bf('input[type="email"], input[name="email"], input[id*="email"], input[autocomplete="email"], input[inputmode="email"], input[name="username"], #username',0x3a98);_0x1c0(ei,d.email);await _0x1ae(0x3e8);let cb=document.querySelector('button[type="submit"]')||_0x1f3('button',['Continue','继续','Next']);if(cb){_0x1e2(cb);_0x18c(_0x5f.FILL_PASSWORD);let s=0x0;let pi=null;while(!pi){s++;_0xbae('等待页面加载... ('+s+'s)');await _0x1ae(0x3e8);pi=document.querySelector('input[type="password"], input[name="password"]');if(s>=0x3c){_0xbae('等待超时,请手动检查...');return;}}await _0x98d(d);}}else if(st===_0x5f.FILL_PASSWORD){await _0x98d(d);}else if(st===_0x5f.WAIT_CODE){await _0xa9e(d);}else if(st===_0x5f.FILL_CODE){const ud=_0x159();await _0xbaf(ud.verificationCode,d);}else if(st===_0x5f.FILL_PROFILE){await _0xcc0(d);}else if(st===_0x5f.COMPLETE){_0xa9d();_0x137({...d,status:'注册完成'});_0x19d();const ar=GM_getValue(_0x4e.AUTO_REDIRECT_TEAM,!1);if(ar){_0xbae('注册完成,正在生成 Team 短链接...');await _0x1ae(0x5dc);await _0x436(d.email,d.password);}else{_0x214(d.email,d.password,null,null);}}}catch(e){console.error('[AutoReg] Error:',e);_0xbae('错误: '+e.message);setTimeout(()=>{_0xa9d();if(confirm('自动注册出错: '+e.message+'\n\n是否重试?')){_0x548();}else{_0x19d();}},0x7d0);}} setInterval(_0x204,0x5dc);setTimeout(_0x204,0x3e8); })();