asaotomo/FofaMap

View on GitHub ↗

一款证据驱动的 FOFA 资产测绘智能体:支持自然语言侦察、AI 反思、CLI / MCP / Skill / REST API,以及经人工审批的 Nuclei 扫描。

700 ★93 forksPythonUpdated 19d ago

What you need to know

Cross-platform FOFA data collector written in Python3 that queries the FOFA asset-search API with configurable queries and exports results to Excel or scanner-ready ip:port text.

Install

python3 -m pip install -r requirements.txt

Usage

  • Fill in your FOFA email and 32-hex key under [userinfo] in fofa.ini, and set fields/start_page/end_page as needed.
  • Query with python3 fofamap.py -q 'title="Apache APISIX Dashboard"' (Windows users must escape inner quotes with backslashes).
  • Use -o to set the output Excel filename, or -s for deduplicated ip:port scan-format output saved to a txt file.
  • Control output fields and order by editing fields in fofa.ini.

Key features

  • Customizable FOFA queries and output fields (ip, port, title, country, header, cert, icp, and more).
  • Excel (.xlsx) export plus automatic ip:port text export for scanners with deduplication.
  • Configurable query page range via start_page/end_page.
  • Command-line table-style output (added in 1.0.1).

Best for

Security researchers self-testing assets by harvesting FOFA asset data into Excel or scanner lists.

Caveats

  • Requires a FOFA account email and API key; query quotas depend on membership tier (regular users pay 1 F-coin per up to 10,000 results).
  • Author's notice: for security self-checking only, not for commercial use, and users are responsible for compliance with local law.
  • README is Chinese-only; this is a CLI tool, not an MCP server.
  • Windows users must escape quotes in FOFA query statements.
Platforms: macOS · Linux · Windows

Reviewed 2026-08-18

Topics

ai-agentasset-discoveryasset-mappingattack-surface-managementcybersecurityfastapifofafofa-apimcpmodel-context-protocolnucleiosintpythonred-teamsecurity-tools
Stars
700★
Forks
93
Language
Python
License
Apache-2.0
Created
2021-12-29
Last push
2026-08-16