如果我执行此代码(如下)从 URL 获取 IP 地址,如何从该 IP 地址获取 Nmap 扫描?导入套接字
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))