Created
May 5, 2013 20:45
-
-
Save savon-noir/5522111 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from libnmap import NmapParser, NmapReport | |
import json | |
from libnmap import ReportEncoder | |
d = NmapParser.parse_fromfile('/root/dev/python-nmap-lib/libnmap/test/files/1_hosts.xml') | |
r = NmapReport('t1', d) | |
j = json.dumps(r, cls=ReportEncoder) | |
r.db().db_insert(json.loads(j)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment