Last active
August 29, 2015 14:01
-
-
Save savon-noir/84c6165e8ce130135e0d 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.parser import NmapParser | |
p = NmapParser.parse_fromfile("<path to the result of command>.xml") | |
for host in p.hosts: | |
for service in host.services: | |
for script_output in service.scripts_results: | |
print "Output of {0}: {1}".format(script_output['id'], script_output['output']) |
I am very new to this and really appreciate your guidance.
I am wondering if you pasted the wrong script as the output shows the script name ntp-monlist and the script posted is ntpmon.py.
Your example is reading the results from a file.
I was trying to get the result directly from NMAP output without writing to a file first, is that possible or do I have to write the results out and then go back and read the file?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output of ntp-monlist:
Target is synchronised with {some ip}
Alternative Target Interfaces:
192.168.1.3
Public Servers (1)
{some ip}
Private Clients (1)
127.0.0.1