2016-10-11 16:42:06 +00:00

7 lines
171 B
Python

import nmap
nm = nmap.PortScanner()
nm.scan('localhost', arguments= '-S 127.0.0.1')
for host in nm.all_hosts():
print('Host : %s (%s)' % (host, nm[host].hostname()))