时间:2023-02-12 04:48:01 | 来源:建站知识
时间:2023-02-12 04:48:01 来源:建站知识
nslookup domain [dnsserver]
nslookup -qt=ptr ip [dnsserver]
nslookup反向解析结果不够准确,而且很多ip是解析不出来的import socket domain=socket.gethostbyaddr('ip')
from requests.packages.urllib3.contrib import pyopenssl as reqsip='220.181.38.148'port='443'try: x509 = reqs.OpenSSL.crypto.load_certificate( reqs.OpenSSL.crypto.FILETYPE_PEM, reqs.ssl.get_server_certificate((ip, port)) ) domain = x509.get_subject().CN print(domain)except: print(ip+'>Get CN failed')
关键词:方法,利用