Get the FREE Ultimate OpenClaw Setup Guide →

FofaMap

FofaMap v2.0 是一款基于 Python3 开发的全网首个 AI 驱动红队资产测绘智能体。在延续原有 FOFA 数据采集、存活检测、统计聚合、图标 Hash 及批量查询等核心功能的基础上,2.0 版本原生支持 MCP 协议,可无缝接入 Cursor、Claude 等 AI 平台。其核心内置了 AI 自我反思机制,能根据查询结果自动调优语法,并智能联动 Nuclei 推荐精准扫描策略,实现从“被动采集”到“主动智能决策”的红队作业进化。

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Clone or download the repository to your local machine.
  2. Create or edit the Python environment. (Optional) Create a virtual environment: python3 -m venv venv && source venv/bin/activate
  3. Install dependencies from requirements.txt: python3 -m pip install -r requirements.txt
  4. Ensure the configuration file fofa.ini exists in the project directory and is properly configured with [userinfo] and [fields] as described in the README.
  5. 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

Sponsor this space

Reach thousands of developers