Install
openclaw skills install fofamapUse this skill when the user wants FOFA-based asset discovery, host profiling, distribution statistics, icon_hash generation, query refinement after zero-result searches, or cautious follow-up vulnerability triage. It is for security recon tasks that need deterministic FOFA API calls instead of an interactive CLI.
openclaw skills install fofamapThis skill turns natural-language recon requests into a stable FOFA workflow:
scripts/fofa_recon.py,This skill is distilled from the FofaMap project, but packaged for skill use instead of an interactive application. The host agent should do the reasoning, and the helper script should do the FOFA API work. The workflow keeps the project's key tactics: action routing, permission-aware field selection, zero-result reflection, live reachability verification, export-oriented delivery, and targeted follow-up suggestions. It now also keeps a bounded local memory so the skill can reflect on failed runs, recurring friction, and strong report patterns without turning into an uncontrolled self-modifying black box.
For setup, the user only needs to provide FOFA credentials:
FOFA_EMAILFOFA_API_KEYUse this skill when the user asks for any of the following:
icon_hash query from a target websitenucleiDo not use this skill for:
If credentials are not configured yet, read references/setup.md.
Required credentials for this skill:
Core helper:
scripts/fofa_recon.py loginscripts/fofa_recon.py search --query 'app="nginx" && country="US"'scripts/fofa_recon.py search --query 'app="nginx" && country="US"' --alive-check --output nginx_us.xlsxscripts/fofa_recon.py search-next --query 'title="login"' --fields host,ip,port,title --max-pages 3scripts/fofa_recon.py search-next --query 'app="nginx"' --size 100 --max-pages 2 --output nginx_deep.xlsxscripts/fofa_recon.py search --query 'cert.subject.org="Google"' --fields ip,port,product,product.version,cert.is_validscripts/fofa_recon.py host --target 8.8.8.8scripts/fofa_recon.py host --target 8.8.8.8 --report-output host_report.mdscripts/fofa_recon.py stats --query 'app="Redis"' --fields country,port,orgscripts/fofa_recon.py stats --query 'app="Redis"' --fields country,port,org --report-output stats_report.mdscripts/fofa_recon.py alive-check --target example.com --target 1.1.1.1:8443 --output alive.csvscripts/fofa_recon.py monitor-run --query 'org="Example Corp"' --state-dir results/monitor_example --report-output results/monitor_example/latest_report.mdscripts/fofa_recon.py monitor-run --query-file queries.txt --use-search-next --max-pages 3 --state-dir results/monitor_monthly --fail-on-changescripts/fofa_recon.py project-run --query 'app="nginx" && country="US"' --query 'app="grafana" && country="US"' --alive-check --split-exportsscripts/fofa_recon.py learn-reviewscripts/fofa_recon.py icon-hash --url https://example.comsearch when the user wants concrete assets.search-next when the user wants deeper harvesting through FOFA's official continuous paging cursor API.host when the user gives one IP or one domain and wants details.stats when the user wants rankings, trends, or distribution.icon-hash when the user wants similar assets by favicon.monitor-run when the same queries will be rerun on a schedule and the user cares about newly added, removed, or changed assets.host returns a normalized host_profile when FOFA exposes richer host data such as domains, protocols, ISP, rules, or per-port rule hints.
stats returns a normalized stats_summary with consumed_fpoint, required_fpoints, and lastupdatetime when FOFA includes them.
Run scripts/fofa_recon.py login before planning when the user needs:
host or stats and you are not sure the account supports those APIsproduct, body, product.version, cert.is_valid, or iconThe helper returns a permission_profile object with:
vip_level and human-readable tier namecan_use_host_api and can_use_stats_apiallowed_search_fieldsdocumented_search_export_field_countdata_limitdefault_search_fields_csvsearch_field_presetsUse that profile to choose fields before issuing the search.
Default to safe, broadly available fields unless the user explicitly needs premium FOFA fields. The helper script already falls back to a safe field set if a higher-tier field request is rejected.
Before using advanced fields or highly specific filters, check references/query-playbook.md, references/permission-playbook.md, and references/syntax-arsenal.md.
When the user intent is fuzzy, exploratory, or hunt-style, search references/syntax-corpus.tsv by product, tag, rule name, or artifact string and use it to generate one precise query plus one or two controlled fallback queries. Treat the corpus as a seed library, not a hard limit on what FOFA combinations are allowed.
If the task is attack-infrastructure hunting, takeover review, honeypot suspicion, or cloud/API leak discovery, also load references/redteam-hunt-playbook.md.
If the user wants a polished report, persuasive delivery, or a specific analyst angle, also load references/report-templates.md and choose a suitable --report-profile such as attack-infrastructure, abnormal-exposure, or takeover-risk.
If the task is recurring, long-running, or the user explicitly wants the skill to improve from experience, also load references/evolution-playbook.md. The helper writes local episodic and semantic memory under results/fofamap_memory/ by default and exposes learning_artifacts plus learn-review.
When the user wants more than one ordinary page of results, prefer search-next over repeatedly emulating page numbers. It follows FOFA's official /api/v1/search/next cursor flow and returns next_cursor_to_resume, has_more, requested_size, effective_size, and cursor_trace so later runs can resume cleanly and explain any FOFA size cap that was applied.
Do up to three progressively broader retries:
host= with broader title=, body=, or product-style matching when appropriateState clearly that the later attempts are broader fallback queries, not equivalent matches.
When reporting results, include:
When the report needs to feel complete and operator-ready, choose a report profile instead of writing in a generic voice. Use:
standard for baseline deliveryattack-infrastructure for clustering, campaign-style, or suspicious infra reviewabnormal-exposure for admin panels, storage leakage, API exposure, and unusual servicestakeover-risk for dangling domains, placeholder pages, and ownership gapsUse --alive-check or alive-check when the user wants:
If the user asks for a deliverable, prefer exporting the checked result set so the handoff includes the current HTTP status.
Use:
xlsx when handing off to analysts, red teams, or non-technical stakeholderscsv when another tool or script will consume the resultIf live checks were run, include the HTTP status in the export. This preserves one of the most practical parts of the original project: not just finding assets, but packaging them for the next operator.
If the user wants active validation, ask or confirm before running tools such as nuclei, curl-based checks, or login probes. FOFA is passive indexed intelligence; active testing is a separate consent boundary.
When the user has multiple queries, wants delivery files, or needs a mini operation bundle, prefer project-run. It preserves one of the original project's best ideas: a single task should leave behind a project directory with exports, targets.txt, a suggested Nuclei command, and a Markdown report.
If the user explicitly wants active scanning and has authorization, project-run --run-nuclei can extend that workflow into a local Nuclei scan and fold the log summary into the report.
Use monitor-run when the user asks for daily, weekly, or monthly asset tracking.
latest_snapshot.json and report added, removed, and changed assets.--state-dir so scheduled runs always compare against the same monitoring profile.--use-search-next for larger inventories and --fail-on-change when an automation should raise an alert on drift.latest_snapshot.json, latest_diff.json, latest_report.md, timestamped archives, and optional per-query exports.permission_profile first. The helper script will also drop known over-tier fields before the request and report that downgrade explicitly.