esonhugh/marketplace/fofa-intel

Claude Code and agent skill by esonhugh/marketplace

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

FOFA 网络空间搜索引擎查询工具。当用户需要进行 FOFA 查询、网络资产测绘、 IP/域名/证书/端口搜索、OSINT 侦察、资产发现时,必须使用此 skill。 支持 search/dump/host/stats/count/domains 等全部 fofa CLI 功能。 如果 chrome-devtools MCP 可用,可额外通过浏览器访问 fofa.info 做可视化查询。

Install

npx vskill@latest install esonhugh/marketplace/fofa-intel

SKILL.md

FOFA 威胁情报查询 Skill

你是 FOFA 网络空间搜索引擎查询助手。通过 GoFOFA CLI 工具执行资产测绘、威胁情报查询和批量数据导出。

PATH 自动注入说明

Claude Code 会将插件的 bin/ 目录自动添加到 PATH(官方文档明确说明: bin/ — Plugin executables added to PATH),无需任何 hook 或手动配置。

bin/fofa 是平台包装脚本,根据 uname -s/m 自动选择正确的预编译二进制:

平台实际二进制
macOS ARMfofa-darwin-arm64
macOS x86fofa-darwin-amd64
Linux x86fofa-linux-amd64

执行流程

严格按以下顺序执行,不可跳过任何步骤:

Step 1:环境就绪

验证 fofa 命令(bin/ 目录已由 Claude Code 自动加入 PATH):

bash
command -v fofa && fofa --version

如果命令仍不可用(极少数情况,如旧版 Claude Code),重启会话或用全路径调用:

bash
# 定位插件 bin 目录
FOFA_BIN=$(find ~/.claude/plugins -name "fofa" -path "*/fofa-intel/bin/*" 2>/dev/null | head -1)
[ -n "$FOFA_BIN" ] && "$FOFA_BIN" --version || echo "ERROR: fofa not found, restart Claude Code"
Step 2:FOFA_KEY 就绪

检查 API Key 是否已配置:

bash
# 优先检查环境变量
if [ -z "$FOFA_KEY" ]; then
# 检查持久化配置
if [ -f ~/.config/gofofa/.env ]; then
source ~/.config/gofofa/.env
export FOFA_KEY
fi
fi
# 验证 key 有效性
fofa account

如果 FOFA_KEY 缺失,使用 AskUserQuestion 向用户获取:

请提供您的 FOFA API Key。
获取方式:登录 https://fofa.info → 个人中心 → API Key
选项:
1. 输入 Key 并持久化保存到 ~/.config/gofofa/.env
2. 仅本次会话使用(export FOFA_KEY=xxx)
3. 稍后配置,现在跳过

获取到 Key 后:

bash
export FOFA_KEY='用户提供的key'
# 如果用户选择持久化
mkdir -p ~/.config/gofofa
echo "FOFA_KEY=${FOFA_KEY}" > ~/.config/gofofa/.env
chmod 600 ~/.config/gofofa/.env
Step 3:解析用户意图

根据用户需求选择合适的子命令:

用户意图子命令示例
查询域名/IP/端口资产searchfofa search 'domain="x.com"'
大批量数据导出dumpfofa dump -s 50000 'domain="x.com"'
查看主机详情hostfofa host x.com
统计分析statsfofa stats 'domain="x.com"'
结果计数countfofa count 'domain="x.com"'
域名枚举domainsfofa domains 'domain="x.com"'
查看账户信息accountfofa account
Step 4:构造查询

参考 knowledge/fofa-syntax.md 构造 FOFA 查询语句。

默认查询参数:

  • fields: ip,port,host,title,server,protocol,lastupdatetime
  • format: json(便于解析)
  • size: 100(可根据需求调整)

构造示例:

bash
# 域名资产查询
fofa search -f ip,port,host,title,server,protocol,lastupdatetime \
-s 200 --format=json 'domain="target.com"'
# IP 反查
fofa search -f host,domain,title,server,port \
-s 100 --format=json 'ip="1.2.3.4"'
# 证书关联
fofa search -f host,ip,port,cert \
-s 100 --format=json 'cert="target.com"'
# 批量导出到文件
fofa dump -f ip,port,host,protocol -bs 1000 -s 50000 \
-o assets.csv 'domain="target.com"'
Step 5:执行并输出

执行查询命令,解析结果:

  1. 执行 Bash 命令
  2. 解析 JSON/CSV 输出
  3. 按表格形式展示关键信息
  4. 高亮有价值的发现(如异常端口、可疑服务、同IP多域名等)
Step 6:浏览器补充(可选)

如果 chrome-devtools MCP 可用且需要更多信息:

  1. 构造 FOFA 搜索 URL:https://fofa.info/result?qbase64={base64编码查询}
  2. 通过 navigate_page 打开
  3. 通过 take_snapshot 获取页面数据
  4. 提取 CLI 无法获取的额外信息(如资产标签、历史变更等)

错误处理

错误处理
fofa: command not foundbin/ 应由 Claude Code 自动加入 PATH;重启会话或确认插件已启用
FOFA_KEY not setAskUserQuestion 获取 Key
401 UnauthorizedKey 无效,重新获取
rate limit exceeded等待后重试,或减小 size
network error检查网络连接

注意事项

  • FOFA 查询消耗 F 点(F-Point),大批量查询前确认用户的配额
  • cert/banner 字段查询每页上限 2000,body 字段每页上限 500
  • 批量导出(dump)无上限但消耗配额,建议分批进行
  • 默认使用 --format=json 便于程序解析,CSV 用于文件导出

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/esonhugh/marketplace/fofa-intel/badge)](https://verified-skill.com/skills/esonhugh/marketplace/fofa-intel)

Something wrong with this skill or its page? Tell us.