mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-02-22 17:06:15 +00:00
7 lines
171 B
Python
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()))
|
|
|