How adilaxmdv/n2m works
n2m is a small CLI utility that turns an Nmap XML scan into a prioritized, safety-filtered Metasploit plan, then emits a resource script or JSON for review. The documented workflow includes optional interactive approval and a local suggestion stub; it does not execute Metasploit. The runtime is concentrated in main.py, so its distinct responsibilities are shown as separate components. The README documents several CLI connections; the excerpt confirms plan-building, interactive filtering, JSON export, and the local-only suggestion behavior, but does not expose every call site.
Main entry points: main.py CLI workflow · mapping.yaml Service mapping
Components 11
Inputs
- Nmap XML
- Service mapping
mapping.yaml
Plan generation
- CLI workflow
main.py - XML parser
main.py - Mapping loader
main.py - Local suggestions
main.py - Plan builder
main.py
Review and export
- Interactive vetting
main.py - Resource script
main.py - Plan JSON
main.py
Other components
- CLI operator
Connections 10
- CLI operator → CLI workflow: runs
README.md - Nmap XML → XML parser: provides XML
README.md - Service mapping → Mapping loader: configures
README.md - CLI workflow → XML parser: parses scan
README.md - CLI workflow → Mapping loader: loads mapping
README.md - CLI workflow → Local suggestions: optionally augments
README.md - CLI workflow → Plan builder: builds plan
main.py - CLI workflow → Interactive vetting: optionally filters
main.py - CLI workflow → Resource script: writes script
README.md - CLI workflow → Plan JSON: exports plan
main.py