https://github.com/juniforge/nmap_xml_parser
A simple OCaml script that parses Nmap XML output and extracts IPv4 addresses marked as "up" in a comma-separated list.
https://github.com/juniforge/nmap_xml_parser
nmap ocaml xml xml-parser
Last synced: 11 months ago
JSON representation
A simple OCaml script that parses Nmap XML output and extracts IPv4 addresses marked as "up" in a comma-separated list.
- Host: GitHub
- URL: https://github.com/juniforge/nmap_xml_parser
- Owner: Juniforge
- License: mit
- Created: 2024-12-28T20:56:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-29T20:11:08.000Z (over 1 year ago)
- Last Synced: 2025-05-30T13:34:13.412Z (about 1 year ago)
- Topics: nmap, ocaml, xml, xml-parser
- Language: OCaml
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NMAP XML PARSER

This project provides a simple OCaml script that parses Nmap XML output to extract IPv4 addresses that are marked as "up". It is designed to work with Nmap scan results that list multiple IP addresses along with their status (up or down). The script outputs a comma-separated list of IPs that are currently up.
## Features
- Parses Nmap XML output.
- Extracts only the IPv4 addresses marked as "up".
- Outputs the extracted IPs in a comma-separated list format.
## Requirements
Before running the project, you will need to have the following installed:
- **OCaml**: The language used to write the script.
- **Dune**: The build system used for this project.
You can install OCaml and Dune by following the official instructions:
- [Install OCaml](https://ocaml.org/docs/install.html)
- [Install Dune](https://dune.build/)
### Installing OCaml and Dune
If you're on a Unix-like system (Linux/macOS), you can install OCaml and Dune via `opam` (OCaml's package manager):
```bash
# Install OPAM (if you don't have it)
sudo apt install opam # On Ubuntu/Debian
brew install opam # On macOS
# Initialize OPAM
opam init
# Install OCaml and Dune
opam install ocaml dune
```