Skip to content

Instantly share code, notes, and snippets.

@savon-noir
Created May 14, 2014 17:07
Show Gist options
  • Save savon-noir/b666d6f15a8435428347 to your computer and use it in GitHub Desktop.
Save savon-noir/b666d6f15a8435428347 to your computer and use it in GitHub Desktop.
NmapService.cpelist
In [1]: from libnmap.parser import NmapParser
In [2]: p = NmapParser.parse_fromfile('libnmap/test/files/fullscan.xml')
In [3]: h = p.hosts.pop()
In [4]: s = h.services[2]
In [5]: for s in h.services:
for cpe in s.cpelist:
print cpe
...:
cpe:/a:openbsd:openssh:5.9p1
cpe:/o:linux:linux_kernel
cpe:/a:apache:http_server:2.2.22
@savon-noir
Copy link
Author

coded on the run.

fix in branch issue28: https://github.com/savon-noir/python-libnmap/tree/issue28
see commit: savon-noir/python-libnmap@1042db1

further tests needed before merge in master..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment