├── LICENSE ├── README.md ├── Screen Shot 2017-09-07 at 8.13.00 PM.png ├── continuousscan.sh ├── data.csv ├── nmap.html └── nmapcsv.sh /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Jerry Gamblin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## What 2 | 3 | Have you ever needed to provide nmap scan data in an easily understandable format? Have you noticed how hard it is to do? So did I! 4 | So I hacked together these tools using [Namp Grepable Output](https://nmap.org/book/output-formats-grepable-output.html), A bash script to convert it to a CSV and some [D3.js code](https://d3js.org/). 5 | 6 | ## How 7 | 8 | Runnig this is as easy as: 9 | 10 | #### Nmap Your Target: 11 | `nmap -sV jerrygamblin.com -oG scan.gnamp` 12 | 13 | #### Transform the data to a CSV: 14 | `./nmapcsv.sh scan.gnamp > data.csv` 15 | 16 | #### Enjoy the data: 17 | `http-server ~/nmaptable` 18 | 19 |  20 | 21 | ## Demo? 22 | 23 | You want a Demo? [Here you go!](http://htmlpreview.github.io/?https://raw.githubusercontent.com/jgamblin/nmaptable/master/nmap.html) 24 | 25 | ## You want more? 26 | 27 | I added a shell script that will allow you to contiously scan your targets and update the webpage. Edit the varaibles in continuousscan.sh and run it in a screen session. 28 | 29 | `screen -s scan` 30 | 31 | `./continuousscan.sh` 32 | 33 | `ctrl+a d` 34 | -------------------------------------------------------------------------------- /Screen Shot 2017-09-07 at 8.13.00 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgamblin/nmaptable/de662c6441351c88b21eb7d96c29a922f7a06b25/Screen Shot 2017-09-07 at 8.13.00 PM.png -------------------------------------------------------------------------------- /continuousscan.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TARGETS="127.0.0.1" 4 | OPTIONS='-sV -R' 5 | 6 | cd ~/nmaptable 7 | LAST_RUN_FILE='lastrun' 8 | 9 | while true; do 10 | START_TIME=$(date +%s) 11 | echo '' 12 | echo '==================' 13 | echo '' 14 | 15 | DATE=`date +%Y-%m-%d_%H-%M-%S` 16 | 17 | echo '' 18 | echo $(date) "- Starting Nmap Scan" 19 | # Remove Old Gnmap 20 | rm scan.gnmap 21 | #Start Nmap: 22 | nmap ${OPTIONS} ${TARGETS} -oG scan.gnmap > /dev/null 23 | #Remove Old Data 24 | rm data.csv 25 | #Update Data: 26 | ./nmapcsv.sh scan.gnmap > data.csv 27 | 28 | 29 | #2 Hour Count Down Between Scans 30 | m=${1}-1 31 | Floor () { 32 | DIVIDEND=${1} 33 | DIVISOR=${2} 34 | RESULT=$(( ( ${DIVIDEND} - ( ${DIVIDEND} % ${DIVISOR}) )/${DIVISOR} )) 35 | echo ${RESULT} 36 | } 37 | 38 | Timecount(){ 39 | s=7200 40 | HOUR=$( Floor ${s} 60/60 ) 41 | s=$((${s}-(60*60*${HOUR}))) 42 | MIN=$( Floor ${s} 60 ) 43 | SEC=$((${s}-60*${MIN})) 44 | while [ $HOUR -ge 0 ]; do 45 | while [ $MIN -ge 0 ]; do 46 | while [ $SEC -ge 0 ]; do 47 | printf "Rescanning in %02d:%02d:%02d\033[0K\r" $HOUR $MIN $SEC 48 | SEC=$((SEC-1)) 49 | sleep 1 50 | done 51 | SEC=59 52 | MIN=$((MIN-1)) 53 | done 54 | MIN=59 55 | HOUR=$((HOUR-1)) 56 | done 57 | } 58 | 59 | Timecount $m 60 | 61 | done 62 | -------------------------------------------------------------------------------- /data.csv: -------------------------------------------------------------------------------- 1 | "IP","Hostname","Port","Protocol","Status","Service","Version" 2 | "50.87.249.69","box1269.bluehost.com","110","tcp","open","pop3","Dovecot pop3d" 3 | "50.87.249.69","box1269.bluehost.com","143","tcp","open","imap","Dovecot imapd" 4 | "50.87.249.69","box1269.bluehost.com","21","tcp","open","ftp","Pure-FTPd" 5 | "50.87.249.69","box1269.bluehost.com","22","tcp","open","ssh","OpenSSH 5.3 (protocol 2.0)" 6 | "50.87.249.69","box1269.bluehost.com","25","tcp","open","smtp","Exim smtpd 4.87" 7 | "50.87.249.69","box1269.bluehost.com","26","tcp","open","smtp","Exim smtpd 4.87" 8 | "50.87.249.69","box1269.bluehost.com","443","tcp","open","ssl|http","Apache httpd" 9 | "50.87.249.69","box1269.bluehost.com","465","tcp","open","tcpwrapped","" 10 | "50.87.249.69","box1269.bluehost.com","587","tcp","open","tcpwrapped","" 11 | "50.87.249.69","box1269.bluehost.com","80","tcp","open","http","Apache httpd" 12 | "50.87.249.69","box1269.bluehost.com","8080","tcp","open","http","Apache httpd" 13 | "50.87.249.69","box1269.bluehost.com","993","tcp","open","ssl|imap","Dovecot imapd" 14 | "50.87.249.69","box1269.bluehost.com","995","tcp","open","ssl|pop3","Dovecot pop3d" 15 | -------------------------------------------------------------------------------- /nmap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 |