Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计异常

authenticated-web-scraper经过身份验证的网络抓取工具

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

2,070

周安装

88

GitHub Stars

55

下载量

725
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:authenticated-web-scraper(经过身份验证的网络抓取工具)
来源仓库:https://github.com/rysweet/amplihack
仓库路径:skills/authenticated-web-scraper
安装命令:
npx skills add https://github.com/rysweet/amplihack --skill authenticated-web-scraper
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/rysweet/amplihack --skill authenticated-web-scraper

简介

用于从需身份验证的网站抓取内容,支持 2FA、SSO 和企业登录场景。

  • 适合审计内部文档站点、提取受保护页面内容或构建认证流程分析。
  • 通过 Chrome DevTools Protocol 调用 Windows Edge 浏览器,专为 WSL2 环境设计。
  • 安装需使用 npx skills add 命令,依赖 GitHub 仓库和特定技能路径。
  • 涉及敏感数据时应确认权限最小化、脱敏策略及操作边界,结果不可直接作为结论。

SKILL.md

Authenticated Web Scraper

Purpose

Scrapes content from websites that require authentication (2FA, SSO, corporate login) by leveraging the user's Windows Edge browser via Chrome DevTools Protocol (CDP). Designed for WSL2 environments where Playwright/Puppeteer can't directly reach Windows browser ports.

When to Use

  • Mirroring internal documentation sites behind corporate auth
  • Scraping content from sites requiring 2FA/SSO that can't be automated
  • Extracting structured content (text, HTML, links) from authenticated web pages
  • Crawling site navigation trees and following links to a configurable depth

Architecture

WSL2                          Windows
┌─────────────────┐           ┌──────────────────────┐
│ Claude Code     │           │ Edge Browser          │
│                 │  kill     │ (user's profile)      │
│ 1. Kill Edge ───┼──────────>│                       │
│                 │  launch   │                       │
│ 2. Launch Edge ─┼──────────>│ --remote-debug:9222   │
│                 │           │ --debug-addr:0.0.0.0  │
│ [User auths     │           │                       │
│  in browser]    │           │ CDP WebSocket on :9222│
│                 │  cmd.exe  │                       │
│ 3. Run scraper ─┼──────────>│ node scraper.mjs      │
│                 │           │ connects localhost:9222│
│ 4. Read output <┼───────────│ writes to C:\Temp\... │
└─────────────────┘           └──────────────────────┘

Key insight: WSL2 cannot reach Windows localhost:9222 directly. The scraper script must run on the Windows side via cmd.exe /c "node script.mjs".

Quick Start

When a user asks to scrape an authenticated website:

  1. Kill existing Edge processes and relaunch with debug flags
  2. User authenticates in the headed browser
  3. Copy scraper script to Windows temp and run via cmd.exe
  4. Script connects to CDP, navigates pages, extracts content
  5. Read results from shared filesystem (/mnt/c/Temp/...)

Core Workflow

Phase 0: Prerequisites

  • Node.js must be installed on Windows (cmd.exe /c "where node")
  • The ws npm package on Windows side (cmd.exe /c "cd C:\Temp && npm install ws")
  • Edge browser installed (check /mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe)

Phase 1: Launch Edge with Remote Debugging

import { execSync, spawn } from "child_process";

// CRITICAL: Kill ALL Edge processes first, otherwise debug flags are ignored
execSync('cmd.exe /c "taskkill /F /IM msedge.exe /T"');
await sleep(3000);

const EDGE = "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe";
spawn(
  EDGE,
  [
    "--remote-debugging-port=9222",
    "--remote-debugging-address=0.0.0.0",
    "--remote-allow-origins=*",
    targetUrl,
  ],
  { detached: true, stdio: "ignore" }
).unref();

Phase 2: Verify CDP and User Auth

# Verify CDP is running (must query from Windows side)
powershell.exe -Command "Invoke-RestMethod -Uri http://localhost:9222/json/version"

Tell user to authenticate, then confirm they can see content.

Phase 3: Scrape via CDP

Write a Node.js script that:

  1. Queries http://localhost:9222/json/list for open pages
  2. Connects to the target page via WebSocket (ws package)
  3. Uses Runtime.evaluate to extract DOM content
  4. Uses Page.navigate + Page.enable for crawling
  5. Saves .txt (clean text), .html (full), _links.json per page

Run on Windows side:

cp script.mjs /mnt/c/Temp/scraper.mjs
cmd.exe /c "cd C:\Temp && node scraper.mjs C:\Temp\output" 2>&1

Phase 4: Crawl Navigation

  1. Extract sidebar/nav links from the initial page
  2. Filter to same-domain pages (skip anchor links)
  3. Visit each nav page, extract content + links
  4. Follow discovered links one level deep (deduplicating)
  5. Write summary JSON with page inventory

CDP Command Reference

// Navigate to a page
await cdpSend(ws, "Page.navigate", { url });

// Extract text content
await cdpSend(ws, "Runtime.evaluate", {
  expression: 'document.querySelector("main").innerText',
  returnByValue: true,
});

// Extract links as JSON
await cdpSend(ws, "Runtime.evaluate", {
  expression:
    'JSON.stringify([...document.querySelectorAll("a[href]")].map(a => ({href: a.href, text: a.textContent.trim()})))',
  returnByValue: true,
});

// Get full HTML
await cdpSend(ws, "Runtime.evaluate", {
  expression: "document.documentElement.outerHTML",
  returnByValue: true,
});

Critical Details

  • Must kill Edge first: If Edge is already running, new instances join the existing process and ignore --remote-debugging-port
  • WSL2 networking: WSL2 has its own network stack; 127.0.0.1 in WSL does NOT reach Windows. Scripts must run on Windows via cmd.exe
  • Respectful crawling: Add 2-second delays between page loads
  • Auth persistence: Edge uses the user's default profile with saved sessions
  • Output path: Use Windows paths (C:\Temp\...) in scripts, read via /mnt/c/Temp/... from WSL

Integration Points

  • Works with any documentation site behind corporate auth (SSO, SAML, FIDO2, etc.)
  • Output can be fed to other skills for analysis, summarization, or knowledge base building
  • Pairs well with investigation-workflow and knowledge-builder skills

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.04%
按下载量换算254

Claude

27.69%
按下载量换算201

Cursor

19.31%
按下载量换算140

Gemini CLI

9.32%
按下载量换算68

安全审计

Gen Agent Trust Hub

未通过

Socket

可疑

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills