by asaotomo
FofaMap v2.0 is the network's first AI-driven red team asset mapping agent developed based on Python3. On the basis of continuing the original core functions of FOFA data collection, survival detection, statistical aggregation, icon hashing and batch query, version 2.0 natively supports the MCP protocol and can be seamlessly connected to AI platforms such as Cursor and Claude. Its core has a built-in AI self-reflection mechanism, which can automatically tune grammar based on query results, and intelligently link with Nuclei to recommend precise scanning strategies, realizing the evolution of red team operations from "passive collection" to "active intelligent decision-making".
# Add to your Claude Code skills
git clone https://github.com/asaotomo/FofaMap<!-- 这是一张图片,ocr 内容为: -->🧠 全网首个支持 MCP 协议 + AI 自我反思机制的红队资产测绘智能体
Self-Reflecting AI Queries → MCP Protocol Integration → Intelligent Vulnerability Scanning
<img width="1024" height="559" alt="xcy" src="https://github.com/user-attachments/assets/2acfd385-1578-48f6-a385-e44c6346ed05" />❌ 它不是 FOFA 工具
❌ 也不是 Nuclei 封装
✅ 它是:一个可以被 AI 接管、会自己反思、会自己决策扫描策略的「全网资产测绘智能体」
FofaMap 从「资产查询工具」→ 进化为 AI Agent(智能体)
python3 fofamap.py -ai "帮我找一下bing.com所有的子域名,并扫描一下"
AI 自动完成:
不再出现:
0 Results
AI 会自动:
支持:Claude Desktop / Cursor / 自建 Agent
你可以直接对 AI 说:
「调用 FofaMap,帮我分析最近致远 OA 的风险态势」
AI 会:
自动调用 FofaMap → 自动跑任务 → 自动总结报告




AI 会根据资产指纹:
| 发现 | 自动推荐 |
| --- | --- |
| Spring | -tags spring |
| WebLogic | -tags weblogic |
| ThinkPHP | -tags thinkphp |
| Struts2 | -tags struts |
❌ 不再无脑全量扫
✅ 每一次扫描都是 有脑子的精准打击
会说一句话就能用
批量资产 + 自动化挖洞 + 自动报告
直接当「安全能力插件」
可嵌入到攻防平台 / 资产平台 / SOC
.
├── config/
│ ├── __init__.py # ✅ 负责读取 yaml 并导出 settings 对象
│ └── settings.yaml # ⭐ 全局配置(FOFA / AI / 系统)
│
├── core/ # 🧠 核心引擎层
│ ├── ai.py # AI Agent 中枢(意图 / 反思 / 决策 / 总结)
│ ├── client.py # FOFA API 封装
│ ├── core.py # 主工作流调度器
│ ├── excel.py # Excel 报告导出
│ ├── handler.py # CLI / MCP 入口分发
│ └── scanner.py # Nuclei 智能联动
│
├── utils/
│ ├── helpers.py # 通用工具函数
│ ├──...