首页 全部提示词 Coding

Aaa

Aaa

文本 @swift282831 1,886 字符 在 prompts.chat 查看 译文有问题?

翻译时结构校验未通过(结构化行数减少:原文 62,译文 57),译文可能有格式偏差,建议对照英文原文使用。

中文译文

角色:资深 Node.js 自动化工程师

目标: 使用 Node.js 构建一个真实的、生产就绪的账户注册与报告自动化系统。 该系统必须执行真实的浏览器自动化和真实的网络操作。 禁止模拟,禁止模拟数据,禁止占位符,禁止伪代码。

模拟政策: 绝不模拟任何内容。 绝不生成虚假输出。 绝不使用虚拟服务。 所有逻辑必须可执行且功能可用。

技术栈:

  • Node.js(ES2022+)
  • Playwright(首选)或 puppeteer-extra + stealth 插件
  • 原生 fs 模块
  • readline 或 inquirer
  • axios(用于 API 和 Telegram)
  • Express(用于仪表盘 API)

系统需求:

1)输入系统

  • 从 "gmailer.txt" 异步读取邮箱
  • 每行 = 一个邮箱
  • 提示用户输入: • 用户名前缀 • 密码 • 无头模式(true/false)
  • 不得阻塞事件循环

2)浏览器自动化 对每个邮箱:

  • 以可选的无头模式启动浏览器
  • 从内部列表中使用随机 User-Agent
  • 在操作之间应用随机延迟
  • 每次尝试都打开新的 browserContext
  • 自动清除 cookies
  • 优雅地处理导航错误

3)免费代理支持(无付费服务)

  • 仅使用免费的公共 HTTP/HTTPS 代理
  • 从 proxies.txt 加载代理
  • 每个账户轮换代理
  • 如果代理失败 → 用下一个代理重试
  • 系统必须在不使用代理的情况下仍能工作

4)机器人规避 / 绕过

  • 随机视口尺寸
  • 随机输入速度
  • 随机鼠标移动(如果支持)
  • navigator.webdriver 掩蔽
  • 仅使用可接受的隐身技术
  • 禁止非法绕过方法

5)账户创建流程 系统必须模块化,以便日后配置目标网站。

预期步骤:

  • 导航到注册页面
  • 填写邮箱、用户名、密码
  • 提交表单
  • 检测成功或失败
  • 提取任何可用的确认数据
  1. 文件输出系统

成功时:

追加到: outputs/basarili_hesaplar.txt 格式: email:username:password

仅追加用户名: outputs/kullanici_adlari.txt

仅追加密码: outputs/sifreler.txt

失败时:

追加到: logs/error_log.txt

格式: ${timestamp} Email: X | Error: MESSAGE

  1. TELEGRAM 通知

可选但已实现:

如果设置了 TELEGRAM_TOKEN 和 CHAT_ID:

发送消息:

"New Account Created: Email: X User: Y Time: Z"

  1. 实时仪表盘 API

在端口 3000 上创建 Express 服务器。

端点:

GET /stats 返回 JSON:

{ total, success, failed, running, elapsedSeconds }

GET /logs 返回最后 100 行日志

仪表盘必须实时更新。

  1. 最终控制台报告

处理完所有电子邮件后:

显示 console.table:

  • Total Attempts
  • Successful
  • Failed
  • Success Rate %
  • Total Duration (seconds & minutes)
  1. 错误处理
  • 每次账户尝试都包裹在 try/catch 中
  • 失败绝不能导致系统崩溃
  • 继续处理剩余的电子邮件
  1. 代码质量
  • 完全使用 async/await
  • 模块化架构
  • 无全局阻塞
  • 清晰的关注点分离

项目结构:

/project-root main.js gmailer.txt proxies.txt /outputs /logs /dashboard

输出要求:

生成:

  1. 完整可运行的 Node.js 代码
  2. package.json
  3. 清晰的运行说明
  4. 不使用 Docker
  5. 不使用付费工具
  6. 不进行模拟
  7. 不包含不完整的部分

重要:

如果任何要求无法实现, 请提供最接近的真实可用替代方案。

不要提问。 不要只生成解释。 生成完整可运行的代码。

English original

ROLE: Senior Node.js Automation Engineer

GOAL: Build a REAL, production-ready Account Registration & Reporting Automation System using Node.js. This system MUST perform real browser automation and real network operations. NO simulation, NO mock data, NO placeholders, NO pseudo-code.

SIMULATION POLICY: NEVER simulate anything. NEVER generate fake outputs. NEVER use dummy services. All logic must be executable and functional.

TECH STACK:

  • Node.js (ES2022+)
  • Playwright (preferred) OR puppeteer-extra + stealth plugin
  • Native fs module
  • readline OR inquirer
  • axios (for API & Telegram)
  • Express (for dashboard API)

SYSTEM REQUIREMENTS:

  1. INPUT SYSTEM
  • Asynchronously read emails from "gmailer.txt"
  • Each line = one email
  • Prompt user for: • username prefix • password • headless mode (true/false)
  • Must not block event loop
  1. BROWSER AUTOMATION For EACH email:
  • Launch browser with optional headless mode
  • Use random User-Agent from internal list
  • Apply random delays between actions
  • Open NEW browserContext per attempt
  • Clear cookies automatically
  • Handle navigation errors gracefully
  1. FREE PROXY SUPPORT (NO PAID SERVICES)
  • Use ONLY free public HTTP/HTTPS proxies
  • Load proxies from proxies.txt
  • Rotate proxy per account
  • If proxy fails → retry with next proxy
  • System must still work without proxy
  1. BOT AVOIDANCE / BYPASS
  • Random viewport size
  • Random typing speed
  • Random mouse movements (if supported)
  • navigator.webdriver masking
  • Acceptable stealth techniques only
  • NO illegal bypass methods
  1. ACCOUNT CREATION FLOW System must be modular so target site can be configured later.

Expected steps:

  • Navigate to registration page
  • Fill email, username, password
  • Submit form
  • Detect success or failure
  • Extract any confirmation data if available
  1. FILE OUTPUT SYSTEM

On SUCCESS:

Append to: outputs/basarili_hesaplar.txt FORMAT: email:username:password

Append username only: outputs/kullanici_adlari.txt

Append password only: outputs/sifreler.txt

On FAILURE:

Append to: logs/error_log.txt

FORMAT: ${timestamp} Email: X | Error: MESSAGE

  1. TELEGRAM NOTIFICATION

Optional but implemented:

If TELEGRAM_TOKEN and CHAT_ID are set:

Send message:

"New Account Created: Email: X User: Y Time: Z"

  1. REAL-TIME DASHBOARD API

Create Express server on port 3000.

Endpoints:

GET /stats Return JSON:

{ total, success, failed, running, elapsedSeconds }

GET /logs Return last 100 log lines

Dashboard must update in real time.

  1. FINAL CONSOLE REPORT

After all emails processed:

Display console.table:

  • Total Attempts
  • Successful
  • Failed
  • Success Rate %
  • Total Duration (seconds & minutes)
  1. ERROR HANDLING
  • Every account attempt wrapped in try/catch
  • Failure must NOT crash system
  • Continue processing remaining emails
  1. CODE QUALITY
  • Fully async/await
  • Modular architecture
  • No global blocking
  • Clean separation of concerns

PROJECT STRUCTURE:

/project-root main.js gmailer.txt proxies.txt /outputs /logs /dashboard

OUTPUT REQUIREMENTS:

Produce:

  1. Complete runnable Node.js code
  2. package.json
  3. Clear instructions to run
  4. No Docker
  5. No paid tools
  6. No simulation
  7. No incomplete sections

IMPORTANT:

If any requirement cannot be implemented, provide the closest REAL functional alternative.

Do NOT ask questions. Do NOT generate explanations only. Generate FULL WORKING CODE.