Skip to content

Instantly share code, notes, and snippets.

@savon-noir
Created May 9, 2013 11:43
Show Gist options
  • Save savon-noir/5546991 to your computer and use it in GitHub Desktop.
Save savon-noir/5546991 to your computer and use it in GitHub Desktop.
ton backend
from libnmap.parser import NmapParser
from libnmap.plugins.backendpluginFactory import BackendPluginFactory
report = NmapParser.parse_fromfile('/root/dev/python-nmap-lib/libnmap/test/files/1_hosts.xml')
monbackend = BackendPluginFactory().create()
monbackend.insert(report)
rec = monbackend.get('518a2cee2c15d01d3a0edbf5')[0]
del rec['_id']
report2 = NmapParser.parse_fromdict(rec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment