Skip to content

Add Nmap output format compatibility (XML/grepable) #2

@stabrea

Description

@stabrea

Summary

Support exporting scan results in Nmap-compatible XML and grepable output formats for interoperability with existing security toolchains.

Motivation

  • Many security tools (Metasploit, Nessus, OpenVAS) import Nmap XML format
  • Grepable output (-oG) is widely used in scripting and automation pipelines
  • Standards-based output makes the toolkit a drop-in complement to existing workflows
  • Enables integration with vulnerability scanners and SIEM platforms

Proposed Approach

  1. Nmap XML output (-oX equivalent):

    • Follow Nmap DTD schema for scan results
    • Include host, port, service, and state information
    • Add scan metadata (start time, arguments, scanner version)
    • Validate output against Nmap's DTD
  2. Grepable output (-oG equivalent):

    • One host per line with tab-separated fields
    • Compatible with standard grep/awk processing
    • Include open/closed/filtered port states
  3. JSON output (native):

    • Structured JSON for programmatic consumption
    • Nested host > port > service hierarchy
  4. CLI integration:

    • -o xml, -o grep, -o json flags
    • -oA to output all formats simultaneously
    • Output to file or stdout

Acceptance Criteria

  • XML output validates against Nmap DTD
  • Grepable output parseable by common Nmap parsing scripts
  • JSON output with complete scan information
  • CLI flags for format selection and file output

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions