2015-11-03 85 views
-1

如果我使用下面的代码从URL获取IP地址,如何从该IP地址获取Nmap扫描? 进口插座如何在Windows上使用python获取Nmap和Whois

def get_ips_for_host(url): 
    try: 
     ips = socket.gethostbyname_ex(url) 
    except socket.gaierror: 
     ips = [] 
    return ips 

ips = get_ips_for_host('www.facebook.com') 
print(repr(ips)) 

回答

相关问题