/java-nmap-xml-parser

A Java parser that converts nmap xml output to a POJO without any additional dependencies

Primary LanguageJavaApache License 2.0Apache-2.0

java-nmap-xml-parser

A Java parser that converts nmap xml output to a POJO without any additional dependencies.

For whatever reason you might want to work with Java on your nmap results o.0

license maven central Security Rating

Getting Started

Prerequisites

This library requires Java 17 as a minimum version.

The easiest way to install nmapxmlparser is importing it via Maven. It is available from Maven Central:

<dependency>
  <groupId>de.martinspielmann.nmapxmlparser</groupId>
  <artifactId>nmapxmlparser</artifactId>
  <version>1.0.0</version>
</dependency>

Usage

// run 'nmap -oX' to get the result in XML format.
var parser = new NmapXmlParser();
var nmapRunFromString = parser.parse(yourNmapXmlResultAsString);

var nmapRunFromPath = parser.parse(Paths.get("pathToXmlResultFile"));

Contributing

Any contributions you make will benefit everybody else and are greatly appreciated.

License

This project is licensed under the Apache License v2. Feel free to edit and distribute this template as you like.

See LICENSE for more information.