您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Loop through multiple accounts: login → my-links → export
当前为
// ==UserScript== // @name SecureMyPass Multi-Login Export Bot (with waits) // @namespace https://securemypass.com/ // @version 1.1 // @description Loop through multiple accounts: login → my-links → export // @match https://securemypass.com/* // @run-at document-end // @grant none // ==/UserScript== (function() { 'use strict'; if (window.__SMP_LOADED__) return; window.__SMP_LOADED__ = true; // --- UI --- const box = document.createElement('div'); box.id = 'smpUI'; box.style = ` position:fixed;bottom:20px;right:20px;z-index:999999; background:#111;color:#eee;padding:12px;border:1px solid #333;border-radius:8px; font:13px/1.4 system-ui;width:300px `; box.innerHTML = ` <h3 style="margin:0 0 8px;font-size:14px">SecureMyPass Bot</h3> <label>Number of Accounts</label> <input id="smpCount" type="number" value="1" min="1" style="width:100%;margin:4px 0"/> <div id="smpCreds"></div> <button id="smpStart" style="margin-top:8px;width:100%">Start</button> <div id="smpLog" style="margin-top:6px;font-size:12px;color:#aaa">Idle.</div> `; document.body.appendChild(box); const el = (id) => box.querySelector(id); const log = (m) => el('#smpLog').textContent = m; const renderCreds = () => { const n = parseInt(el('#smpCount').value || '1', 10); const wrap = el('#smpCreds'); wrap.innerHTML = ''; for (let i=0;i<n;i++) { wrap.innerHTML += ` <div style="border:1px solid #333;padding:6px;margin:6px 0;border-radius:6px"> <div style="font-weight:600">Account ${i+1}</div> <label>Username</label><input class="smpUser" type="text" style="width:100%"/> <label>Password</label><input class="smpPass" type="password" style="width:100%"/> </div> `; } }; renderCreds(); el('#smpCount').addEventListener('input', renderCreds); // --- Helpers --- const sleep = (ms) => new Promise(r=>setTimeout(r,ms)); const waitForXPath = async (xp, {timeout=20000}={}) => { const t0=performance.now(); while(true){ const res=document.evaluate(xp,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null); if(res.singleNodeValue) return res.singleNodeValue; if(performance.now()-t0>timeout) throw new Error("Timeout for "+xp); await sleep(100); } }; const typeIntoEl = async (el, text) => { el.focus(); el.value = ''; el.dispatchEvent(new Event('input',{bubbles:true})); for(const ch of text){ el.value += ch; el.dispatchEvent(new Event('input',{bubbles:true})); await sleep(30); // delay between keystrokes } }; const pressEnter = (el) => { ['keydown','keypress','keyup'].forEach(type=>{ el.dispatchEvent(new KeyboardEvent(type,{bubbles:true,cancelable:true,key:'Enter',code:'Enter'})); }); }; const clickNode = (el) => el.click(); // --- Main flow --- async function runForAccount({username,password}) { log("Waiting for login page…"); await sleep(800); log("Filling username…"); const u = await waitForXPath('//*[@id="loginUsername"]'); await typeIntoEl(u, username); await sleep(500); pressEnter(u); await sleep(1500); log("Filling password…"); const p = await waitForXPath('//*[@id="loginPassword"]'); await typeIntoEl(p, password); await sleep(500); pressEnter(p); // wait for login to process log("Waiting for login to complete…"); await sleep(3000); log("Navigating to My Links…"); location.href = "https://securemypass.com/my-links"; await new Promise(r=>{ const done=()=>{window.removeEventListener('load',done);r();}; if(document.readyState==="complete") r(); else window.addEventListener('load',done); }); await sleep(2000); log("Clicking Export…"); const exp = await waitForXPath('//*[@id=":r3s:"]',{timeout:30000}); await sleep(1000); clickNode(exp); log("Export clicked (check downloads)."); await sleep(3000); } // --- Start button --- el('#smpStart').onclick = async () => { const users = [...box.querySelectorAll('.smpUser')].map(i=>i.value.trim()); const passes = [...box.querySelectorAll('.smpPass')].map(i=>i.value); for (let i=0;i<users.length;i++) { if (!users[i] || !passes[i]) { log("Missing credentials"); return; } log(`Running account ${i+1}/${users.length}`); try { await runForAccount({username:users[i],password:passes[i]}); } catch(e) { console.error(e); log("Error: "+e.message); } // wait before next account await sleep(5000); } log("All done."); }; })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址