https://github.com/sgabe/nmap2csv
Nmap to CSV spreadsheet converter
https://github.com/sgabe/nmap2csv
Last synced: 9 months ago
JSON representation
Nmap to CSV spreadsheet converter
- Host: GitHub
- URL: https://github.com/sgabe/nmap2csv
- Owner: sgabe
- License: mit
- Created: 2014-12-07T16:17:03.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-11-02T12:56:41.000Z (about 9 years ago)
- Last Synced: 2025-03-29T05:04:41.943Z (10 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Nmap2CSV
=======
**Nmap2CSV** is a simple Python script to convert one or more XML (`-oX`) Nmap output files to a single CSV spreadsheet which summarizes all hosts and open ports in a table in `IP,PORT1,PORT2,PORT3,...,PORTN` format: The first row is the header with all open ports found on the scanned hosts. In the following rows the specified character (default `X`) marks if the given port was found open on the given host.
## Usage
Pass the XML Nmap output (`-oX`) via a specified file or directory (`-i`). The resulted CSV spreadsheet is saved to a file (default is nmap2csv-summary-tcp.csv).
### Options
```
$ python nmap2csv.py -h
usage: nmap2csv.py [-h] [-i INPUT] [-p PREFIX] [-s SUFFIX] [-m MARKER]
_ _ ___ ___ _____ __
| \| |_ __ __ _ _ __|_ ) __/ __\ \ / /
| .` | ' \/ _` | '_ \/ / (__\__ \\ V /
|_|\_|_|_|_\__,_| .__/___\___|___/ \_/
|_|
Nmap to CSV spreadsheet converter
optional arguments:
-h, --help show this help message and exit
-i INPUT Scan output file or folder (default current folder)
-p PREFIX prefix for output file names (default nmap2csv)
-s SUFFIX suffix for output file names (default tcp)
-m MARKER marker character (default X)
```
### Example output
```
0.0.0.0,123,135,139,443,445,
192.168.1.1,,X,X,,,
192.168.1.2,X,,,X,X,
192.168.1.3,X,,,,,
192.168.1.4,,,,X,X,
```
| 0.0.0.0 | 123 | 135 | 139 | 443 | 445 |
| ------------|:---:|:---:|:---:|:---:|:---:|
| 192.168.1.1 | | X | X | | |
| 192.168.1.2 | X | | | X | X |
| 192.168.1.3 | X | | | | |
| 192.168.1.4 | | | | X | X |
## License
This project is licensed under the terms of the MIT license.