diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2ccbe46
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/node_modules/
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..35410ca
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/auto-register-verdent.iml b/.idea/auto-register-verdent.iml
new file mode 100644
index 0000000..24643cc
--- /dev/null
+++ b/.idea/auto-register-verdent.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..947b3b3
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a0e3cd8
--- /dev/null
+++ b/README.md
@@ -0,0 +1,131 @@
+# Verdent.ai 自动注册程序
+
+自动化注册 Verdent.ai 账号的 Node.js 程序,使用 Playwright 进行浏览器自动化。
+
+## 功能特点
+
+- ✅ 自动创建临时邮箱(使用 tempmail.plus)
+- ✅ 自动处理 Cloudflare Turnstile 验证
+- ✅ 自动获取邮箱验证码
+- ✅ 自动完成注册流程
+- ✅ 模拟真实用户行为,避免被检测
+
+## 项目结构
+
+```
+auto-register-verdent/
+├── index.js # 主入口文件
+├── emailModule.js # 邮箱处理模块
+├── registerModule.js # 注册流程模块
+├── config.js # 配置文件
+├── package.json # 项目依赖
+└── README.md # 说明文档
+```
+
+## 安装
+
+1. 确保已安装 Node.js (v16 或更高版本)
+
+2. 安装依赖:
+```bash
+npm install
+```
+
+3. 安装 Playwright 浏览器:
+```bash
+npx playwright install chromium
+```
+
+## 配置
+
+编辑 `config.js` 文件以修改配置:
+
+```javascript
+export const config = {
+ // 临时邮箱配置
+ tempmail: {
+ url: 'https://tempmail.plus/',
+ username: 'qichen111', // 邮箱用户名
+ pinCode: '147258' // PIN 码保护
+ },
+
+ // Verdent 注册配置
+ verdent: {
+ signupUrl: 'https://www.verdent.ai/signup?source=verdent-deck',
+ password: 'Qichen5210523...' // 注册密码
+ },
+
+ // 浏览器配置
+ browser: {
+ headless: false, // false=显示浏览器窗口,true=后台运行
+ slowMo: 100 // 操作延迟(毫秒)
+ }
+};
+```
+
+## 使用方法
+
+运行程序:
+
+```bash
+npm start
+```
+
+或者:
+
+```bash
+node index.js
+```
+
+## 工作流程
+
+1. **设置临时邮箱**
+ - 访问 tempmail.plus
+ - 创建邮箱账号
+ - 设置 PIN 码保护
+
+2. **开始注册**
+ - 访问 Verdent.ai 注册页面
+ - 填写邮箱地址
+ - 处理 Cloudflare Turnstile 验证
+ - 点击发送验证码
+
+3. **获取验证码**
+ - 等待邮件到达
+ - 自动提取 6 位验证码
+
+4. **完成注册**
+ - 填写验证码
+ - 填写密码
+ - 提交注册表单
+
+## 注意事项
+
+- ⚠️ 程序运行时会打开两个浏览器窗口(邮箱和注册)
+- ⚠️ 如果遇到 Cloudflare 验证失败,程序会自动重试
+- ⚠️ 注册成功后,浏览器会保持打开 30 秒以便查看结果
+- ⚠️ 建议首次运行时将 `headless` 设置为 `false` 以观察流程
+
+## 故障排除
+
+### 问题:找不到元素
+- 检查网站是否更新了页面结构
+- 增加 `slowMo` 值以延长等待时间
+
+### 问题:Turnstile 验证失败
+- Cloudflare 可能检测到自动化行为
+- 尝试手动完成验证
+
+### 问题:未收到验证码
+- 检查邮箱是否正确创建
+- 增加 `timeouts.emailWait` 值
+
+## 技术栈
+
+- Node.js
+- Playwright (浏览器自动化)
+- ES6 Modules
+
+## 许可证
+
+MIT
diff --git a/browser.js b/browser.js
new file mode 100644
index 0000000..c94a7c3
--- /dev/null
+++ b/browser.js
@@ -0,0 +1,62 @@
+import { chromium } from 'playwright';
+import fetch from 'node-fetch';
+
+// 连接指纹浏览器优先级:
+// 1) AdsPower 本地 API(设置 ADSPOWER_USER_ID)
+// 2) 自定义 WS 端点(设置 BROWSER_WS_ENDPOINT)
+// 3) 本地 Playwright 启动(默认)
+
+export async function getBrowserAndContexts({ headless, slowMo }) {
+ // 尝试 AdsPower
+ const adspowerUserId = process.env.ADSPOWER_USER_ID;
+ if (adspowerUserId) {
+ console.log('[FP] 使用 AdsPower 指纹浏览器');
+ const apiBase = process.env.ADSPOWER_API || 'http://local.adspower.net:50325';
+ const startUrl = `${apiBase}/api/v1/browser/start?user_id=${encodeURIComponent(adspowerUserId)}`;
+ const resp = await fetch(startUrl);
+ const data = await resp.json();
+ if (data.code !== 0) {
+ throw new Error(`[AdsPower] 启动失败: ${data.msg || JSON.stringify(data)}`);
+ }
+ const wsEndpoint = data.data.ws && (data.data.ws.puppeteer || data.data.ws.selenium || data.data.ws.ws || data.data.ws);
+ console.log('[FP] AdsPower ws:', wsEndpoint);
+ const browser = await chromium.connectOverCDP(wsEndpoint);
+ const contexts = browser.contexts();
+ const baseContext = contexts[0] || await browser.newContext();
+ // 关闭所有已有页签,保持干净
+ for (const p of baseContext.pages()) { try { await p.close(); } catch {} }
+ // 在同一个指纹环境下创建两个页签(同上下文不同页)
+ return {
+ browser,
+ emailContext: baseContext,
+ registerContext: baseContext,
+ };
+ }
+
+ // 尝试自定义 WS 端点
+ const ws = process.env.BROWSER_WS_ENDPOINT;
+ if (ws) {
+ console.log('[FP] 连接到自定义指纹浏览器 WS');
+ const browser = await chromium.connectOverCDP(ws);
+ const contexts = browser.contexts();
+ const baseContext = contexts[0] || await browser.newContext();
+ for (const p of baseContext.pages()) { try { await p.close(); } catch {} }
+ return {
+ browser,
+ emailContext: baseContext,
+ registerContext: baseContext,
+ };
+ }
+
+ // 回退:Playwright 本地启动
+ console.log('[FP] 未检测到指纹浏览器,使用内置 Chromium');
+ const browser = await chromium.launch({ headless, slowMo, args: ['--disable-blink-features=AutomationControlled', '--no-sandbox'] });
+ const emailContext = await browser.newContext({ viewport: { width: 1280, height: 720 } });
+ const registerContext = await browser.newContext({ viewport: { width: 1280, height: 720 } });
+ // 清理所有初始页面,保持上下文干净
+ for (const ctx of [emailContext, registerContext]) {
+ const pages = ctx.pages();
+ for (const p of pages) { try { await p.close(); } catch {} }
+ }
+ return { browser, emailContext, registerContext };
+}
diff --git a/config.js b/config.js
new file mode 100644
index 0000000..839586a
--- /dev/null
+++ b/config.js
@@ -0,0 +1,38 @@
+export const config = {
+ // 临时邮箱配置
+ tempmail: {
+ url: 'https://tempmail.plus/',
+ username: 'qichen111', // 固定的临时邮箱名称
+ pinCode: '147258',
+ domain: 'qichen.cloud' // 我们注册时使用的域名(随机前缀会投递到此)
+ },
+
+ // Verdent 注册配置
+ verdent: {
+ signupUrl: 'https://www.verdent.ai/signup?source=verdent-deck',
+ password: 'Qichen5210523...'
+ },
+
+ // 数据库(从环境变量读取)
+ db: {
+ host: process.env.DB_HOST,
+ port: Number(process.env.DB_PORT || 3306),
+ user: process.env.DB_USER,
+ password: process.env.DB_PASS,
+ database: process.env.DB_NAME || 'auto_register_verdent'
+ },
+
+ // 浏览器配置
+ browser: {
+ headless: false, // 设置为 false 可以看到浏览器操作过程
+ slowMo: 100, // 放慢操作速度,更像真人
+ keepEmailOpen: true // 结束后保留临时邮箱窗口
+ },
+
+ // 超时配置(毫秒)
+ timeouts: {
+ navigation: 60000, // 页面导航超时 60秒
+ element: 15000, // 元素查找超时 15秒
+ emailWait: 120000 // 等待邮件的最长时间 120秒
+ }
+};
diff --git a/db.js b/db.js
new file mode 100644
index 0000000..c56aa39
--- /dev/null
+++ b/db.js
@@ -0,0 +1,80 @@
+import mysql from 'mysql2/promise';
+import { config } from './config.js';
+
+let pool;
+
+function getPool() {
+ if (!pool) {
+ if (!config.db.host || !config.db.user || !config.db.password) {
+ console.log('[DB] 未配置数据库环境变量,跳过持久化');
+ return null;
+ }
+ pool = mysql.createPool({
+ host: config.db.host,
+ port: config.db.port,
+ user: config.db.user,
+ password: config.db.password,
+ database: config.db.database,
+ waitForConnections: true,
+ connectionLimit: 5,
+ });
+ }
+ return pool;
+}
+
+export async function ensureSchema() {
+ const p = getPool();
+ if (!p) return;
+ await p.query(`CREATE TABLE IF NOT EXISTS accounts (
+ id BIGINT PRIMARY KEY AUTO_INCREMENT,
+ email VARCHAR(255) NOT NULL,
+ password VARCHAR(255) NOT NULL,
+ status VARCHAR(32) NOT NULL,
+ created_at DATETIME NOT NULL,
+ expires_at DATETIME NOT NULL,
+ UNIQUE KEY uniq_email (email)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;`);
+}
+
+export async function saveAccount({ email, password, createdAt, expiresAt, status }) {
+ const p = getPool();
+ if (!p) return;
+ await ensureSchema();
+ const sql = `INSERT INTO accounts (email, password, status, created_at, expires_at)
+ VALUES (?, ?, ?, ?, ?)
+ ON DUPLICATE KEY UPDATE password=VALUES(password), status=VALUES(status), created_at=VALUES(created_at), expires_at=VALUES(expires_at)`;
+ await p.execute(sql, [
+ email,
+ password,
+ status,
+ formatDateTime(createdAt),
+ formatDateTime(expiresAt)
+ ]);
+}
+
+export async function listAccounts({ status } = {}) {
+ const p = getPool();
+ if (!p) return [];
+ await ensureSchema();
+ let sql = 'SELECT * FROM accounts';
+ const params = [];
+ if (status) {
+ sql += ' WHERE status=?';
+ params.push(status);
+ }
+ sql += ' ORDER BY created_at DESC LIMIT 200';
+ const [rows] = await p.execute(sql, params);
+ return rows;
+}
+
+function pad2(n) { return String(n).padStart(2, '0'); }
+function formatDateTime(d) {
+ const dt = new Date(d);
+ const Y = dt.getFullYear();
+ const M = pad2(dt.getMonth()+1);
+ const D = pad2(dt.getDate());
+ const h = pad2(dt.getHours());
+ const m = pad2(dt.getMinutes());
+ const s = pad2(dt.getSeconds());
+ return `${Y}-${M}-${D} ${h}:${m}:${s}`;
+}
diff --git a/emailModule.js b/emailModule.js
new file mode 100644
index 0000000..23331da
--- /dev/null
+++ b/emailModule.js
@@ -0,0 +1,241 @@
+import { config } from './config.js';
+
+/**
+ * 设置临时邮箱并获取验证码
+ * @param {Page} page - Playwright 页面对象
+ * @returns {Promise<{email: string, code: string}>}
+ */
+export async function setupTempMail(page) {
+ console.log('📧 开始设置临时邮箱...');
+
+ // 访问 tempmail.plus(增加超时时间,因为网络较慢)
+ await page.goto(config.tempmail.url, {
+ waitUntil: 'domcontentloaded', // 改为 domcontentloaded,不等待所有网络请求
+ timeout: 60000 // 60秒超时
+ });
+ await page.waitForTimeout(3000); // 等待页面稳定
+
+ // 输入邮箱用户名(固定为配置的 qichen111)
+ console.log('输入邮箱用户名:', config.tempmail.username);
+ await page.fill('#pre_button', config.tempmail.username);
+
+ // 点击页面其他位置或按回车来确认输入,触发邮箱地址更新
+ console.log('确认邮箱用户名...');
+ await page.click('body'); // 点击页面空白处
+ await page.waitForTimeout(2000);
+
+ // 检查 PIN 码弹窗是否已经显示
+ console.log('[LOG] 检查 PIN 码弹窗状态...');
+ const pinModal = page.locator('#modal-verify');
+ await page.waitForTimeout(2000); // 等待页面稳定
+
+ const initialModalClass = await pinModal.getAttribute('class');
+ console.log('[LOG] 弹窗 class:', initialModalClass);
+
+ // 判断弹窗是否已经显示(包含 "show" class)
+ const isModalShown = initialModalClass && initialModalClass.includes('show');
+ console.log('[LOG] 弹窗是否已显示:', isModalShown);
+
+ if (!isModalShown) {
+ // 如果弹窗未显示,才需要点击 PIN 保护元素
+ console.log('[LOG] 弹窗未显示,点击 PIN 码保护元素...');
+ const pinProtectSpan = page.locator('span.pin-text[data-tr="box_protected"]');
+ await pinProtectSpan.waitFor({ state: 'visible', timeout: 15000 });
+ await pinProtectSpan.click({ force: true });
+ console.log('[LOG] ✅ 已点击 PIN 保护元素');
+ await page.waitForTimeout(2000);
+ } else {
+ console.log('[LOG] ✅ 弹窗已自动显示,无需点击');
+ }
+
+ // 查找 PIN 码输入框
+ console.log('[LOG] 查找 PIN 码输入框...');
+ const pinInput = page.locator('#pin');
+ const pinInputCount = await pinInput.count();
+ console.log('[LOG] 找到 PIN 输入框数量:', pinInputCount);
+
+ if (pinInputCount > 0) {
+ // 检查输入框是否可见
+ const isVisible = await pinInput.isVisible();
+ console.log('[LOG] PIN 输入框是否可见:', isVisible);
+
+ // 输入 PIN 码
+ console.log('[LOG] 输入 PIN 码:', config.tempmail.pinCode);
+ await pinInput.fill(config.tempmail.pinCode);
+ console.log('[LOG] ✅ PIN 码已输入');
+ await page.waitForTimeout(500);
+
+ // 查找提交按钮
+ console.log('[LOG] 查找提交按钮 #verify...');
+ const verifyButton = page.locator('#verify');
+ const verifyButtonCount = await verifyButton.count();
+ console.log('[LOG] 找到提交按钮数量:', verifyButtonCount);
+
+ if (verifyButtonCount > 0) {
+ const buttonText = await verifyButton.textContent();
+ console.log('[LOG] 按钮文本:', buttonText);
+ console.log('[LOG] 点击提交按钮...');
+ await verifyButton.click();
+ console.log('[LOG] ✅ 已点击提交按钮');
+ } else {
+ console.log('[LOG] ⚠️ 未找到提交按钮,尝试按回车');
+ await pinInput.press('Enter');
+ }
+
+ // 等待验证完成
+ await page.waitForTimeout(2000);
+ console.log('[LOG] ✅ PIN 码验证流程完成');
+ } else {
+ console.log('[LOG] ❌ 未找到 PIN 输入框!');
+ throw new Error('未找到 PIN 码输入框');
+ }
+
+ // 等待弹窗关闭后获取邮箱地址
+ await page.waitForTimeout(2000);
+ console.log('[LOG] 获取生成的邮箱地址...');
+
+ // 尝试多个可能的邮箱地址元素
+ let emailAddress = '';
+
+ // 方法 1: 查找特定的邮箱显示元素
+ const emailDisplay = page.locator('#email-address, #mail, .email-address, [id*="email"]').first();
+ if (await emailDisplay.count() > 0 && await emailDisplay.isVisible()) {
+ const text = await emailDisplay.textContent();
+ const match = text.match(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/);
+ if (match) {
+ emailAddress = match[0];
+ }
+ }
+
+ // 方法 2: 如果没找到,尝试从页面中提取所有包含 @ 的文本
+ if (!emailAddress) {
+ const pageContent = await page.content();
+ const emailMatches = pageContent.match(/qichen111@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/);
+ if (emailMatches && emailMatches.length > 0) {
+ emailAddress = emailMatches[0];
+ }
+ }
+
+ // 方法 3: 查找复制按钮附近的文本
+ if (!emailAddress) {
+ const copyButton = page.locator('button:has-text("复制")').first();
+ if (await copyButton.count() > 0) {
+ const parent = copyButton.locator('..');
+ const text = await parent.textContent();
+ const match = text.match(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/);
+ if (match) {
+ emailAddress = match[0];
+ }
+ }
+ }
+
+ console.log('[LOG] 提取到的邮箱地址:', emailAddress);
+
+ if (!emailAddress || !emailAddress.includes('@')) {
+ console.log('[LOG] ⚠️ 未能正确获取邮箱地址,尝试使用默认格式');
+ emailAddress = `${config.tempmail.username}@mailto.plus`;
+ }
+
+ console.log('✅ 邮箱地址:', emailAddress);
+
+ return { inboxReady: true, page };
+}
+
+/**
+ * 等待并获取验证码
+ * @param {Page} page - Playwright 页面对象
+ * @returns {Promise} 验证码
+ */
+export async function waitForVerificationCode(page, sentAfterMs) {
+ console.log('⏳ 等待接收验证码邮件...');
+ console.log('[LOG] 不会刷新页面,只等待新邮件出现...');
+
+ const maxWaitTime = 120000; // 最多等待 120 秒
+ const checkInterval = 1000; // 每 1 秒检查一次
+ let elapsed = 0;
+
+ async function extractCodeFromOpenedMail() {
+ // 1) 优先从特定内容区域读取
+ const contentLoc = page.locator('.mail-content, .email-body, #mail-body, [class*="mail-content"], .pm-text, .view, .message-body').first();
+ if (await contentLoc.count() > 0) {
+ const text = await contentLoc.textContent();
+ const code = /\b(\d{6})\b/.exec(text || '');
+ if (code) return code[1];
+ }
+ // 2) 遍历所有 iframe 提取文本
+ const frames = page.frames();
+ console.log(`[LOG] 当前 frame 数量: ${frames.length}`);
+ for (const f of frames) {
+ try {
+ const body = await f.$('body');
+ if (!body) continue;
+ const text = await f.evaluate(() => document.body.innerText || '');
+ const m = /\b(\d{6})\b/.exec(text);
+ if (m) return m[1];
+ } catch {}
+ }
+ // 3) 退化为整页文本
+ const all = await page.textContent('body');
+ const m = /\b(\d{6})\b/.exec(all || '');
+ return m ? m[1] : null;
+ }
+
+ while (elapsed < maxWaitTime) {
+ await page.waitForTimeout(checkInterval);
+ elapsed += checkInterval;
+
+ console.log(`[LOG] 检查邮件... (已等待 ${elapsed / 1000} 秒)`);
+
+ // 邮件列表行(兼容多种结构)
+ const emailRows = page.locator('.inbox-dataList .mail-item, .inbox-dataList > div, div.row.no-gutters');
+ const emailCount = await emailRows.count();
+ console.log(`[LOG] 当前邮件数量: ${emailCount}`);
+
+ if (emailCount > 0) {
+ console.log('📬 发现邮件,尝试读取...');
+
+ // 遍历所有邮件,优先读取发送之后的邮件(按顺序尝试)
+ for (let i = 0; i < emailCount; i++) {
+ const emailRow = emailRows.nth(i);
+
+ // 过滤发送时间之前的旧邮件(根据 data-date)
+ try {
+ const timeSpan = emailRow.locator('span[data-date]').first();
+ if (await timeSpan.count() > 0) {
+ const dateStr = await timeSpan.getAttribute('data-date');
+ if (dateStr) {
+ const parsed = Date.parse(dateStr.replace(' ', 'T')) || new Date(dateStr).getTime();
+ if (sentAfterMs && parsed && parsed < sentAfterMs) {
+ console.log(`[LOG] 跳过旧邮件 ${dateStr}`);
+ continue;
+ }
+ }
+ }
+ } catch {}
+
+ try {
+ // 点击打开邮件(有些需要双击/再次点击切换到详情)
+ await emailRow.click({ timeout: 5000 });
+ await page.waitForTimeout(500);
+ try { await emailRow.dblclick({ timeout: 1000 }); } catch {}
+
+ // 等待内容区域或 iframe 加载
+ await page.waitForTimeout(1500);
+
+ const code = await extractCodeFromOpenedMail();
+ if (code) {
+ console.log('✅ 获取到验证码:', code);
+ return code;
+ }
+ console.log(`[LOG] 邮件 ${i + 1} 中未找到验证码`);
+ } catch (error) {
+ console.log(`[LOG] 读取邮件 ${i + 1} 失败:`, error.message);
+ }
+ }
+
+ console.log('⚠️ 所有邮件中未找到验证码,继续等待...');
+ }
+ }
+
+ throw new Error('超时:未能在规定时间内收到验证码');
+}
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..2188821
--- /dev/null
+++ b/index.js
@@ -0,0 +1,121 @@
+import { chromium } from 'playwright';
+import { config } from './config.js';
+import { setupTempMail, waitForVerificationCode } from './emailModule.js';
+import { registerOnVerdent, completeRegistration } from './registerModule.js';
+import { getBrowserAndContexts } from './browser.js';
+import { generateUsername } from './util.js';
+import { saveAccount } from './db.js';
+
+/**
+ * 主自动注册流程
+ */
+async function main() {
+ console.log('🚀 开始自动注册流程...\n');
+
+ let browser;
+ let emailContext;
+ let registerContext;
+
+ try {
+ // 启动或连接到浏览器(支持指纹浏览器/AdsPower/自定义 WS)
+ console.log('🌐 启动浏览器...');
+ ({ browser, emailContext, registerContext } = await getBrowserAndContexts({
+ headless: config.browser.headless,
+ slowMo: config.browser.slowMo,
+ }));
+
+ // 创建页面
+ const emailPage = await emailContext.newPage();
+ let registerPage = await registerContext.newPage();
+
+ // 生成唯一用户名(随机 + 时间)
+ const localPart = generateUsername('qichen');
+
+ // ========== 第一步:设置临时邮箱 ==========
+ console.log('\n📧 === 步骤 1: 设置临时邮箱 ===');
+ const { inboxReady } = await setupTempMail(emailPage);
+ if (!inboxReady) {
+ throw new Error('未能成功创建临时邮箱');
+ }
+ const email = `${localPart}@${config.tempmail.domain}`;
+ console.log('📧 将用于注册的邮箱:', email);
+
+ // ========== 第二步:在 Verdent 上开始注册 ==========
+ console.log('\n🌐 === 步骤 2: 开始 Verdent.ai 注册 ===');
+ const { sentAtMs } = await registerOnVerdent(registerPage, email);
+
+ // ========== 第三步:等待验证码邮件(只取发送后的邮件) ==========
+ console.log('\n📬 === 步骤 3: 等待验证码邮件 ===');
+ const verificationCode = await waitForVerificationCode(emailPage, sentAtMs);
+
+ if (!verificationCode) {
+ throw new Error('未能获取验证码');
+ }
+
+ // ========== 第四步:完成注册 ==========
+ console.log('\n✅ === 步骤 4: 完成注册 ===');
+ const success = await completeRegistration(registerPage, verificationCode);
+
+ // 注册页本次任务结束后关闭,并为下次准备新页签
+ try { await registerPage.close(); } catch {}
+ registerPage = await registerContext.newPage();
+
+ if (success) {
+ console.log('\n🎉 ============================================');
+ console.log(' 注册流程成功完成!');
+ console.log('============================================');
+ console.log('📧 邮箱:', email);
+ console.log('🔑 密码:', config.verdent.password);
+ console.log('============================================\n');
+
+ // 持久化保存(注册时间与过期时间=7天)
+ const createdAt = new Date();
+ const expiresAt = new Date(createdAt.getTime() + 7 * 24 * 60 * 60 * 1000);
+ try {
+ await saveAccount({ email, password: config.verdent.password, createdAt, expiresAt, status: 'active' });
+ console.log('[DB] 账号已写入数据库');
+ } catch (e) {
+ console.log('[DB] 写入失败:', e.message);
+ }
+ } else if (success === false) {
+ console.log('\n❌ 注册失败,请检查错误信息');
+ } else {
+ console.log('\n⚠️ 注册状态未知,请手动检查浏览器窗口');
+ }
+
+ // 保持浏览器打开 30 秒以便查看结果
+ console.log('⏰ 浏览器将在 30 秒后关闭...');
+ await new Promise(resolve => setTimeout(resolve, 30000));
+
+ } catch (error) {
+ console.error('\n❌ 发生错误:', error.message);
+ console.error(error.stack);
+
+ // 错误时保持浏览器打开以便调试
+ console.log('⏰ 浏览器将在 60 秒后关闭,请检查问题...');
+ await new Promise(resolve => setTimeout(resolve, 60000));
+
+ } finally {
+ // 清理资源
+ try {
+ if (!config.browser.keepEmailOpen) {
+ if (emailContext && emailContext.close) await emailContext.close();
+ } else {
+ console.log('[INFO] 已根据配置保留临时邮箱窗口,未关闭 emailContext');
+ }
+ } catch {}
+ try {
+ if (registerContext && registerContext.close) await registerContext.close();
+ } catch {}
+ try {
+ if (!config.browser.keepEmailOpen) {
+ if (browser && browser.close) await browser.close();
+ }
+ } catch {}
+
+ console.log('👋 程序结束');
+ }
+}
+
+// 运行主程序
+main().catch(console.error);
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..5dc3531
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,1096 @@
+{
+ "name": "auto-register-verdent",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "auto-register-verdent",
+ "version": "1.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "express": "^4.19.2",
+ "mysql2": "^3.11.0",
+ "node-fetch": "^3.3.2",
+ "playwright": "^1.40.0"
+ }
+ },
+ "node_modules/accepts": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmmirror.com/accepts/-/accepts-1.3.8.tgz",
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-types": "~2.1.34",
+ "negotiator": "0.6.3"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/array-flatten": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
+ "license": "MIT"
+ },
+ "node_modules/aws-ssl-profiles": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmmirror.com/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz",
+ "integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6.0.0"
+ }
+ },
+ "node_modules/body-parser": {
+ "version": "1.20.3",
+ "resolved": "https://registry.npmmirror.com/body-parser/-/body-parser-1.20.3.tgz",
+ "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "3.1.2",
+ "content-type": "~1.0.5",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "on-finished": "2.4.1",
+ "qs": "6.13.0",
+ "raw-body": "2.5.2",
+ "type-is": "~1.6.18",
+ "unpipe": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/call-bind-apply-helpers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/call-bound": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmmirror.com/call-bound/-/call-bound-1.0.4.tgz",
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "get-intrinsic": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/content-disposition": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmmirror.com/content-disposition/-/content-disposition-0.5.4.tgz",
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "5.2.1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmmirror.com/content-type/-/content-type-1.0.5.tgz",
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.7.1.tgz",
+ "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie-signature": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.0.6.tgz",
+ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
+ "license": "MIT"
+ },
+ "node_modules/data-uri-to-buffer": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmmirror.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
+ "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 12"
+ }
+ },
+ "node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/denque": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmmirror.com/denque/-/denque-2.1.0.tgz",
+ "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/destroy": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmmirror.com/destroy/-/destroy-1.2.0.tgz",
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/dunder-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz",
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+ "license": "MIT"
+ },
+ "node_modules/encodeurl": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-2.0.0.tgz",
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/es-define-property": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz",
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz",
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-object-atoms": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
+ "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+ "license": "MIT"
+ },
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmmirror.com/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/express": {
+ "version": "4.21.2",
+ "resolved": "https://registry.npmmirror.com/express/-/express-4.21.2.tgz",
+ "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
+ "license": "MIT",
+ "dependencies": {
+ "accepts": "~1.3.8",
+ "array-flatten": "1.1.1",
+ "body-parser": "1.20.3",
+ "content-disposition": "0.5.4",
+ "content-type": "~1.0.4",
+ "cookie": "0.7.1",
+ "cookie-signature": "1.0.6",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "finalhandler": "1.3.1",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "merge-descriptors": "1.0.3",
+ "methods": "~1.1.2",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "path-to-regexp": "0.1.12",
+ "proxy-addr": "~2.0.7",
+ "qs": "6.13.0",
+ "range-parser": "~1.2.1",
+ "safe-buffer": "5.2.1",
+ "send": "0.19.0",
+ "serve-static": "1.16.2",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "type-is": "~1.6.18",
+ "utils-merge": "1.0.1",
+ "vary": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.10.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/fetch-blob": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmmirror.com/fetch-blob/-/fetch-blob-3.2.0.tgz",
+ "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "paypal",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "node-domexception": "^1.0.0",
+ "web-streams-polyfill": "^3.0.3"
+ },
+ "engines": {
+ "node": "^12.20 || >= 14.13"
+ }
+ },
+ "node_modules/finalhandler": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmmirror.com/finalhandler/-/finalhandler-1.3.1.tgz",
+ "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "2.6.9",
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "statuses": "2.0.1",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/formdata-polyfill": {
+ "version": "4.0.10",
+ "resolved": "https://registry.npmmirror.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
+ "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
+ "license": "MIT",
+ "dependencies": {
+ "fetch-blob": "^3.1.2"
+ },
+ "engines": {
+ "node": ">=12.20.0"
+ }
+ },
+ "node_modules/forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fresh": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmmirror.com/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz",
+ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/generate-function": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmmirror.com/generate-function/-/generate-function-2.3.1.tgz",
+ "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
+ "license": "MIT",
+ "dependencies": {
+ "is-property": "^1.0.2"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "function-bind": "^1.1.2",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz",
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/gopd": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz",
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz",
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz",
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/http-errors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/http-errors/-/http-errors-2.0.0.tgz",
+ "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+ "license": "MIT",
+ "dependencies": {
+ "depd": "2.0.0",
+ "inherits": "2.0.4",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "toidentifier": "1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "license": "ISC"
+ },
+ "node_modules/ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/is-property": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmmirror.com/is-property/-/is-property-1.0.2.tgz",
+ "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==",
+ "license": "MIT"
+ },
+ "node_modules/long": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmmirror.com/long/-/long-5.3.2.tgz",
+ "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/lru-cache": {
+ "version": "7.18.3",
+ "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-7.18.3.tgz",
+ "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/lru.min": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmmirror.com/lru.min/-/lru.min-1.1.2.tgz",
+ "integrity": "sha512-Nv9KddBcQSlQopmBHXSsZVY5xsdlZkdH/Iey0BlcBYggMd4two7cZnKOK9vmy3nY0O5RGH99z1PCeTpPqszUYg==",
+ "license": "MIT",
+ "engines": {
+ "bun": ">=1.0.0",
+ "deno": ">=1.30.0",
+ "node": ">=8.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wellwelwel"
+ }
+ },
+ "node_modules/math-intrinsics": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/media-typer": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/merge-descriptors": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
+ "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/methods": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmmirror.com/methods/-/methods-1.1.2.tgz",
+ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz",
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "license": "MIT",
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "license": "MIT"
+ },
+ "node_modules/mysql2": {
+ "version": "3.15.3",
+ "resolved": "https://registry.npmmirror.com/mysql2/-/mysql2-3.15.3.tgz",
+ "integrity": "sha512-FBrGau0IXmuqg4haEZRBfHNWB5mUARw6hNwPDXXGg0XzVJ50mr/9hb267lvpVMnhZ1FON3qNd4Xfcez1rbFwSg==",
+ "license": "MIT",
+ "dependencies": {
+ "aws-ssl-profiles": "^1.1.1",
+ "denque": "^2.1.0",
+ "generate-function": "^2.3.1",
+ "iconv-lite": "^0.7.0",
+ "long": "^5.2.1",
+ "lru.min": "^1.0.0",
+ "named-placeholders": "^1.1.3",
+ "seq-queue": "^0.0.5",
+ "sqlstring": "^2.3.2"
+ },
+ "engines": {
+ "node": ">= 8.0"
+ }
+ },
+ "node_modules/mysql2/node_modules/iconv-lite": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.7.0.tgz",
+ "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==",
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/named-placeholders": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmmirror.com/named-placeholders/-/named-placeholders-1.1.3.tgz",
+ "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==",
+ "license": "MIT",
+ "dependencies": {
+ "lru-cache": "^7.14.1"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/negotiator": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz",
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/node-domexception": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/node-domexception/-/node-domexception-1.0.0.tgz",
+ "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
+ "deprecated": "Use your platform's native DOMException instead",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "github",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.5.0"
+ }
+ },
+ "node_modules/node-fetch": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-3.3.2.tgz",
+ "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
+ "license": "MIT",
+ "dependencies": {
+ "data-uri-to-buffer": "^4.0.0",
+ "fetch-blob": "^3.1.4",
+ "formdata-polyfill": "^4.0.10"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/node-fetch"
+ }
+ },
+ "node_modules/object-inspect": {
+ "version": "1.13.4",
+ "resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.4.tgz",
+ "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmmirror.com/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "license": "MIT",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmmirror.com/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/path-to-regexp": {
+ "version": "0.1.12",
+ "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
+ "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
+ "license": "MIT"
+ },
+ "node_modules/playwright": {
+ "version": "1.56.1",
+ "resolved": "https://registry.npmmirror.com/playwright/-/playwright-1.56.1.tgz",
+ "integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "playwright-core": "1.56.1"
+ },
+ "bin": {
+ "playwright": "cli.js"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "fsevents": "2.3.2"
+ }
+ },
+ "node_modules/playwright-core": {
+ "version": "1.56.1",
+ "resolved": "https://registry.npmmirror.com/playwright-core/-/playwright-core-1.56.1.tgz",
+ "integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==",
+ "license": "Apache-2.0",
+ "bin": {
+ "playwright-core": "cli.js"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmmirror.com/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "license": "MIT",
+ "dependencies": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/qs": {
+ "version": "6.13.0",
+ "resolved": "https://registry.npmmirror.com/qs/-/qs-6.13.0.tgz",
+ "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "side-channel": "^1.0.6"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmmirror.com/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/raw-body": {
+ "version": "2.5.2",
+ "resolved": "https://registry.npmmirror.com/raw-body/-/raw-body-2.5.2.tgz",
+ "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "3.1.2",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "unpipe": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "license": "MIT"
+ },
+ "node_modules/send": {
+ "version": "0.19.0",
+ "resolved": "https://registry.npmmirror.com/send/-/send-0.19.0.tgz",
+ "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "mime": "1.6.0",
+ "ms": "2.1.3",
+ "on-finished": "2.4.1",
+ "range-parser": "~1.2.1",
+ "statuses": "2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/send/node_modules/encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/send/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/seq-queue": {
+ "version": "0.0.5",
+ "resolved": "https://registry.npmmirror.com/seq-queue/-/seq-queue-0.0.5.tgz",
+ "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q=="
+ },
+ "node_modules/serve-static": {
+ "version": "1.16.2",
+ "resolved": "https://registry.npmmirror.com/serve-static/-/serve-static-1.16.2.tgz",
+ "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==",
+ "license": "MIT",
+ "dependencies": {
+ "encodeurl": "~2.0.0",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.3",
+ "send": "0.19.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "license": "ISC"
+ },
+ "node_modules/side-channel": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.1.0.tgz",
+ "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3",
+ "side-channel-list": "^1.0.0",
+ "side-channel-map": "^1.0.1",
+ "side-channel-weakmap": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-list": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/side-channel-list/-/side-channel-list-1.0.0.tgz",
+ "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-map": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/side-channel-map/-/side-channel-map-1.0.1.tgz",
+ "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-weakmap": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmmirror.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
+ "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3",
+ "side-channel-map": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/sqlstring": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmmirror.com/sqlstring/-/sqlstring-2.3.3.tgz",
+ "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/statuses": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmmirror.com/statuses/-/statuses-2.0.1.tgz",
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/type-is": {
+ "version": "1.6.18",
+ "resolved": "https://registry.npmmirror.com/type-is/-/type-is-1.6.18.tgz",
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "license": "MIT",
+ "dependencies": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.24"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/utils-merge": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/web-streams-polyfill": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmmirror.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
+ "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..1722db0
--- /dev/null
+++ b/package.json
@@ -0,0 +1,21 @@
+{
+ "name": "auto-register-verdent",
+ "version": "1.0.0",
+ "description": "Auto registration for Verdent.ai",
+ "main": "index.js",
+ "type": "module",
+ "scripts": {
+ "start": "node index.js",
+ "serve": "node server.js",
+ "test": "node index.js"
+ },
+ "keywords": ["automation", "registration"],
+ "author": "",
+ "license": "MIT",
+ "dependencies": {
+ "express": "^4.19.2",
+ "mysql2": "^3.11.0",
+ "node-fetch": "^3.3.2",
+ "playwright": "^1.40.0"
+ }
+}
diff --git a/registerModule.js b/registerModule.js
new file mode 100644
index 0000000..d8139d8
--- /dev/null
+++ b/registerModule.js
@@ -0,0 +1,234 @@
+import { config } from './config.js';
+
+/**
+ * 处理 Cloudflare Turnstile 验证
+ * @param {Page} page - Playwright 页面对象
+ */
+async function handleTurnstile(page) {
+ console.log('🔐 检查 Cloudflare Turnstile 验证...');
+
+ try {
+ // 使用 frame 或 frameLocator 两种方式尝试定位 Cloudflare 挑战 iframe
+ const cfFrames = page.frames().filter(f => /cloudflare|turnstile|challenges/i.test(f.url()));
+ const cfFrameLocator = page.frameLocator('iframe[title*="Cloudflare" i], iframe[src*="challenges.cloudflare.com" i], iframe[src*="turnstile" i]').first();
+
+ const hasLocator = await cfFrameLocator.locator('body').count().catch(() => 0);
+ const hasFrame = cfFrames.length > 0;
+
+ if (hasLocator || hasFrame) {
+ console.log('[LOG] 发现 Cloudflare 验证 iframe');
+
+ async function tryClickIn(locatorBase) {
+ const possibleTargets = [
+ 'input[type="checkbox"]',
+ 'div[role="checkbox"]',
+ 'label:has-text("确认您是真人")',
+ 'label:has-text("I am human")',
+ 'span:has-text("确认您是真人")',
+ 'span:has-text("I am human")',
+ '#cf-stage label',
+ 'button'
+ ];
+ for (const sel of possibleTargets) {
+ const loc = locatorBase.locator(sel).first();
+ if (await loc.count() > 0 && await loc.isVisible()) {
+ console.log('[LOG] 尝试点击选择器:', sel);
+ try { await loc.click({ force: true }); return true; } catch {}
+ }
+ }
+ return false;
+ }
+
+ let clicked = false;
+ // 方案 A:用 frameLocator 点击
+ try { clicked = await tryClickIn(cfFrameLocator); } catch {}
+
+ // 方案 B:直接用 frame 对象点击
+ if (!clicked) {
+ for (const f of cfFrames) {
+ const base = f.locator('html');
+ try { if (await tryClickIn(base)) { clicked = true; break; } } catch {}
+ }
+ }
+
+ // 如果没有匹配元素,尝试点击 iframe 中心
+ if (!clicked) {
+ console.log('[LOG] 未找到明确的控件,点击 iframe 中心尝试通过');
+ const handle = await cfFrameLocator.elementHandle().catch(() => null);
+ if (handle) {
+ const box = await handle.boundingBox();
+ if (box) await page.mouse.click(box.x + box.width / 2, box.y + box.height / 2);
+ }
+ }
+
+ // 等待验证成功,观察注册按钮是否可点击
+ const signUpCandidate = page.locator('.sign-button [role="button"], .sign-button button, button:has-text("Sign Up"), [role="button"]:has-text("Sign Up")').first();
+ try {
+ await page.waitForFunction(
+ (el) => {
+ if (!el) return false;
+ const cls = el.getAttribute('class') || '';
+ const aria = el.getAttribute('aria-disabled');
+ return !cls.includes('disabled') && aria !== 'true';
+ },
+ signUpCandidate,
+ { timeout: 10000 }
+ );
+ console.log('✅ Turnstile 验证完成(按钮已可点击)');
+ } catch {
+ console.log('ℹ️ 未检测到按钮状态变化,继续流程');
+ }
+ } else {
+ console.log('ℹ️ 未找到 Cloudflare 验证 iframe,可能已自动通过');
+ }
+ } catch (error) {
+ console.log('ℹ️ Turnstile 处理异常:', error.message);
+ }
+}
+
+/**
+ * 在 Verdent.ai 上执行注册流程
+ * @param {Page} page - Playwright 页面对象
+ * @param {string} email - 邮箱地址
+ * @returns {Promise}
+ */
+export async function registerOnVerdent(page, email) {
+ console.log('🌐 开始 Verdent.ai 注册流程...');
+
+ // 访问注册页面
+ await page.goto(config.verdent.signupUrl, {
+ waitUntil: 'domcontentloaded',
+ timeout: 60000
+ });
+ await page.waitForTimeout(3000);
+
+ // 输入邮箱地址
+ console.log('📝 输入邮箱:', email);
+ const emailInput = page.locator('input[type="email"], input[placeholder*="email" i], input[placeholder*="邮箱"]').first();
+ await emailInput.fill(email);
+ await page.waitForTimeout(1000);
+
+ // 处理 Turnstile 验证(如果存在)
+ await handleTurnstile(page);
+
+ // 点击发送验证码按钮
+ console.log('📤 点击发送验证码...');
+ const sendCodeButton = page.locator('button.send-code-button').first();
+
+ // 等待按钮变为可点击状态
+ await page.waitForTimeout(2000);
+
+ // 检查按钮是否被禁用
+ const isDisabled = await sendCodeButton.getAttribute('disabled');
+ if (isDisabled !== null) {
+ console.log('⚠️ 发送验证码按钮被禁用,可能需要先完成其他验证');
+ // 再次尝试处理 Turnstile
+ await handleTurnstile(page);
+ await page.waitForTimeout(2000);
+ }
+
+ await sendCodeButton.click();
+ const sentAtMs = Date.now();
+ console.log('✅ 验证码已发送 at', new Date(sentAtMs).toISOString());
+
+ return { page, sentAtMs };
+}
+
+/**
+ * 填写验证码和密码,完成注册
+ * @param {Page} page - Playwright 页面对象
+ * @param {string} verificationCode - 验证码
+ */
+export async function completeRegistration(page, verificationCode) {
+ console.log('✍️ 填写验证码和密码...');
+
+ // 输入验证码
+ console.log('输入验证码:', verificationCode);
+ const codeInput = page.locator('input[placeholder*="Verification code" i], input[autocomplete="one-time-code"]').first();
+ await codeInput.fill(verificationCode);
+ await page.waitForTimeout(1000);
+
+ // 输入密码
+ console.log('输入密码...');
+ const passwordInput = page.locator('input[type="password"][placeholder*="Password" i], input[autocomplete="new-password"]').first();
+ await passwordInput.fill(config.verdent.password);
+ await page.waitForTimeout(1000);
+
+ // 点击注册按钮
+ console.log('🚀 点击注册按钮...');
+ console.log('[LOG] 查找注册按钮...');
+
+ // 等待一下,让表单验证完成
+ await page.waitForTimeout(2000);
+
+ // 尝试多种方式定位按钮(包含 div[role=button])
+ let signUpButton = page.locator('.sign-button [role="button"], .sign-button button').first();
+ let buttonCount = await signUpButton.count();
+ console.log('[LOG] 找到 .sign-button [role=button]/button:', buttonCount);
+
+ if (buttonCount === 0) {
+ signUpButton = page.locator('button:has-text("Sign Up"), [role="button"]:has-text("Sign Up"), [role="button"]:has-text("注册")').first();
+ buttonCount = await signUpButton.count();
+ console.log('[LOG] 找到包含 Sign Up/注册 文本的按钮:', buttonCount);
+ }
+
+ if (buttonCount === 0) {
+ console.log('[LOG] 未找到按钮,输出页面内容调试...');
+ const roles = page.locator('[role="button"]');
+ const allRoleBtnCount = await roles.count();
+ console.log('[LOG] 页面上 role=button 数量', allRoleBtnCount);
+ for (let i = 0; i < Math.min(allRoleBtnCount, 5); i++) {
+ const btn = roles.nth(i);
+ const text = (await btn.textContent() || '').trim();
+ console.log(`[LOG] role 按钮 ${i+1}:`, text);
+ }
+ throw new Error('未找到注册按钮');
+ }
+
+ // 检查按钮状态并等待启用
+ try {
+ await page.waitForFunction(
+ (el) => {
+ if (!el) return false;
+ const cls = el.getAttribute('class') || '';
+ const aria = el.getAttribute('aria-disabled');
+ return !cls.includes('disabled') && aria !== 'true';
+ },
+ signUpButton,
+ { timeout: 15000 }
+ );
+ } catch (error) {
+ console.log('[LOG] 等待按钮启用超时:', error.message);
+ }
+
+ try {
+ await signUpButton.click({ timeout: 5000, force: true });
+ console.log('✅ 注册请求已提交');
+
+ // 等待跳转或成功提示
+ await page.waitForTimeout(5000);
+
+ // 检查是否注册成功
+ const currentUrl = page.url();
+ console.log('当前页面:', currentUrl);
+
+ if (!currentUrl.includes('/signup')) {
+ console.log('🎉 注册成功!');
+ return true;
+ } else {
+ // 检查是否有错误提示
+ const errorElement = page.locator('[class*="error"], [class*="alert"]').first();
+ if (await errorElement.count() > 0) {
+ const errorText = await errorElement.textContent();
+ console.log('❌ 注册失败:', errorText);
+ return false;
+ }
+
+ console.log('⚠️ 注册状态未知,请手动检查');
+ return null;
+ }
+ } catch (error) {
+ console.log('❌ 点击注册按钮失败:', error.message);
+ return false;
+ }
+}
diff --git a/server.js b/server.js
new file mode 100644
index 0000000..58b8bd3
--- /dev/null
+++ b/server.js
@@ -0,0 +1,31 @@
+import express from 'express';
+import { listAccounts } from './db.js';
+
+const app = express();
+const port = process.env.PORT || 3210;
+
+app.get('/', async (req, res) => {
+ const rows = await listAccounts();
+ res.setHeader('Content-Type', 'text/html; charset=utf-8');
+ res.end(`
+
+ Verdent Accounts
+
+
+ Registered Accounts
+
+ | Email | Password | Status | Created | Expires |
+
+ ${rows.map(r => `| ${r.email} | ${r.password} | ${r.status} | ${fmt(r.created_at)} | ${fmt(r.expires_at)} |
`).join('')}
+
+
+ `);
+});
+
+function fmt(d){
+ const dt=new Date(d);return dt.toISOString().replace('T',' ').slice(0,19);
+}
+
+app.listen(port, () => {
+ console.log(`[WEB] Query page running at http://localhost:${port}`);
+});
diff --git a/util.js b/util.js
new file mode 100644
index 0000000..96b9332
--- /dev/null
+++ b/util.js
@@ -0,0 +1,11 @@
+export function generateUsername(prefix = 'user') {
+ const now = new Date();
+ const YYYY = now.getFullYear();
+ const MM = String(now.getMonth() + 1).padStart(2, '0');
+ const DD = String(now.getDate()).padStart(2, '0');
+ const hh = String(now.getHours()).padStart(2, '0');
+ const mm = String(now.getMinutes()).padStart(2, '0');
+ const ss = String(now.getSeconds()).padStart(2, '0');
+ const rand = Math.random().toString(36).slice(2, 6);
+ return `${prefix}${YYYY}${MM}${DD}${hh}${mm}${ss}${rand}`;
+}
diff --git a/我现在需要让你帮我开发一个自动注册小本地程序.ini b/我现在需要让你帮我开发一个自动注册小本地程序.ini
new file mode 100644
index 0000000..996eae1
--- /dev/null
+++ b/我现在需要让你帮我开发一个自动注册小本地程序.ini
@@ -0,0 +1,29 @@
+我现在需要让你帮我开发一个自动注册小本地程序
+
+1、使用nodejs、py都可以
+
+2、使用指纹浏览器
+
+3、可以绕过人类识别
+
+4、注册地址是这个网址:https://www.verdent.ai/signup?source=verdent-deck
+点击这个元素发送验证码
+你还需要绕过或者点击
+
+
+5、使用临时邮箱来接受注册当中的验证码:
+访问这个地址https://tempmail.plus/
+找到表单:
+对这个表单输入qichen111
+在找到这个元素收件箱受PIN碼保護点击它,输入保护码 147258
+然后获取
SRS0=kMQI=v5=126.com=qichen111@qichen.cloud06:54
(无主题)
+里面的验证码
+
+
+6、将获取到的6位码回填到https://www.verdent.ai/signup?source=verdent-deck,这个元素里:
+7、输入密码到这个元素里
+密码统一都是Qichen5210523...
+8、点击注册按钮
+完成注册流程。
+
+整个流程如果你认为有问题我们在过程当中调整,你先说一下你的计划吧