diff --git a/README.md b/README.md index 5e7f53f..69abca4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ # gutterbox -nmap -O -oX scan.xml 192.168.1.0/24 +## setup +Install the dependancies + +specify the correct version for sqlite3 +``` +sudo apt update +sudo apt install php libapache2-mod-php php-mysql +sudo apt install php7.0-sqlite3 +``` + +## Use it! +Run the scan +``` +nmap -O -oX /var/www/html/gutterbox/scans/scan.xml 192.168.1.0/24 +``` + +Feed the parser +``` +./parser.py -x scans/scan.xml +``` diff --git a/parser.py b/parser.py index 04f3b4b..b4cd099 100644 --- a/parser.py +++ b/parser.py @@ -73,7 +73,7 @@ def main(): id integer PRIMARY KEY, os text, hostname text, - address integer, + address text, ports text ); """ create_table(conn, targetTableCreate) @@ -98,7 +98,7 @@ def main(): for addr in host.iter('address'): if(addr.attrib['addrtype'] == 'ipv4'): - address = str(addr.attrib['addr']).split('.')[-1] + address = str(addr.attrib['addr']) for port in host.iter('port'): ports.append(str(port.attrib['portid'])) diff --git a/scanned.db b/scanned.db deleted file mode 100644 index 71920d7..0000000 Binary files a/scanned.db and /dev/null differ