FofaMap
FofaMap v2.0 是一款基于 Python3 开发的全网首个 AI 驱动红队资产测绘智能体。在延续原有 FOFA 数据采集、存活检测、统计聚合、图标 Hash 及批量查询等核心功能的基础上,2.0 版本原生支持 MCP 协议,可无缝接入 Cursor、Claude 等 AI 平台。其核心内置了 AI 自我反思机制,能根据查询结果自动调优语法,并智能联动 Nuclei 推荐精准扫描策略,实现从“被动采集”到“主动智能决策”的红队作业进化。
claude mcp add --transport stdio asaotomo-fofamap python fofamap.py \ --env =""
How to use
FofaMap is a Python-based cross-platform FOFA data collector. It reads a FOFA configuration file (fofa.ini) and uses user credentials to query FOFA, then exports the results to an Excel file (default: fofa.xlsx). The tool supports customizing the fields to output and can operate in a scan mode to generate a simple IP:port list suitable for scanners. To run, ensure Python 3 is installed and install the required dependencies listed in requirements.txt. After setup, you interact with the tool by invoking python fofamap.py with a FOFA query, optionally specifying an output filename or enabling scan mode. The configuration file fofa.ini controls query fields, pages to fetch, and user information.
How to install
Prerequisites:
- Python 3.x installed on your system
- Access to the internet to install dependencies
Step-by-step:
- Clone or download the repository to your local machine.
- Create or edit the Python environment. (Optional) Create a virtual environment: python3 -m venv venv && source venv/bin/activate
- Install dependencies from requirements.txt: python3 -m pip install -r requirements.txt
- Ensure the configuration file fofa.ini exists in the project directory and is properly configured with [userinfo] and [fields] as described in the README.
- Run the main program using Python: python3 fofamap.py -q 'title="Apache APISIX Dashboard"'
If you are using Windows, adjust escaping for quotes as shown in the README.
Additional notes
Tips and notes:
- The configuration file fofa.ini controls which fields are output and their order. Modify the [fields] line to customize output, e.g., fields = protocol,ip,port,title,icp.
- The tool enforces FOFA usage limits based on account type. Be mindful of query limits described in the README.
- The output can be redirected to a different filename with the -o option, e.g., -o 结果.xlsx.
- There is a scan mode (-s) that outputs only IP and port, deduplicates results, and saves them to a txt file for use with scanners.
- Ensure you fill in [userinfo] with your FOFA email and 32-character key to access FOFA data.
- The project is designed for safety research; use within legal boundaries and local regulations.
Related MCP Servers
langchain4j-aideepin
基于AI的工作效率提升工具(聊天、绘画、知识库、工作流、 MCP服务市场、语音输入输出、长期记忆) | Ai-based productivity tools (Chat,Draw,RAG,Workflow,MCP marketplace, ASR,TTS, Long-term memory etc)
joinly
Make your meetings accessible to AI Agents
toolsdk -registry
MCPSDK.dev(ToolSDK.ai)'s Awesome MCP Servers and Packages Registry and Database with Structured JSON configurations. Supports OAuth2.1, DCR...
mcp
🤖 Taskade MCP · Official MCP server and OpenAPI to MCP codegen. Build AI agent tools from any OpenAPI API and connect to Claude, Cursor, and more.
omega-memory
Persistent memory for AI coding agents
shodan
Shodan MCP server for Claude, Cursor & VS Code. 20 tools for passive reconnaissance, CVE/CPE intelligence, DNS analysis, and device search. 4 tools work free without an API key. OSINT and vulnerability research from your IDE.