dkran / nmap2json

Convert nmap xml output to a clean JSON object for database collection or whatever.
MIT License
27 stars 2 forks source link

Added get services output for each port from -sV param #6

Open DavidAngelos opened 4 years ago

DavidAngelos commented 4 years ago

Just added a simple line to get also service running output for each port

Json output before change:

"ports": [
      {
        "port": {
          "protocol": "tcp",
          "portid": "22"
        },
        "state": {
          "state": "open",
          "reason": "syn-ack",
          "reason_ttl": "0"
        }
      } 
]

Json output after change:

"ports": [
      {
        "port": {
          "protocol": "tcp",
          "portid": "22"
        },
        "state": {
          "state": "open",
          "reason": "syn-ack",
          "reason_ttl": "0"
        },
        "service": {
          "name": "ssh",
          "product": "OpenSSH",
          "version": "7.4p1 Debian 10+deb9u6",
          "extrainfo": "protocol 2.0",
          "ostype": "Linux",
          "method": "probed",
          "conf": "10"
        }
      }
]