The goal of this repo is to experiment :
- nmap running in background, making initial map of network then logging changes with ndiff
- convert these XML outputs into JSON in compliance with a JSON schema
- send initial JSON and diff JSON to a Websocket client
resources/ The official and external sources of truth (dtd nmap spec)
tools/ Subfolder for external tools NOT TO BE MODIFIED for now
output/
initial/ output for initial nmap JSON report
ndiff/ output for incremental nmap JSON report
xsd/ output for dtd2xsd
json-sc/ output for xsd2json and manual JSON schemas
- Make bash nmap script with XML output (including ndiff)
- Give it websockets connectivity
- Test convert official DTD to XSD format
- Test convert XSD to JSON schema using xsd2json
- Double check this JSON schema by
- Manually decoding nmap DTD
- Make it a hand-crafted JSON schema to check against
- Convert nmap XML output to JSON with xml2json
- Check obtained JSON against JSON schemas
Initial nmap run >> XML output >> xml2json >> check against JSON schema(s) Incremental ndiff run >> XML output >> xml2json >> check against JSON schema sub-part (later)
Event-driven application (Symfony event ? Node ?) will format this nmap JSON into game objects for client This application will listen for game commands from client and translate it back into shell / nmap commands Probably in separate repository