本文最后更新于 420 天前,其中的信息可能已经有所发展或是发生改变。
:::info
💘渗透全流程:
信息👣收集 – 漏洞发现 – 漏洞利用 – 权限提升 – 隧道搭建 – 内网渗透 – 横向移动 – 后渗透
:::
域名反查
思路分析:
whois 进行域名反查,可以从在线资源获取,也可以直接使用 python 命令
实现步骤:
- 指定域名
- 判断域名是否有效
- 查询 whois 信息
V1.0
基本功能实现
★ python 需要安装的是 python-whois 包,而不是 whois。这是完全不同的两个包。
import whois
# pip install Python-whois
def is_register(domain_name):
try:
w = whois.whois(domain_name)
print(w)
except:
print('exception')
return False
return bool(w.domain_name)
if __name__ == '__main__':
dms = [
'www.baidu.com',
'hola-security.cn',
'hola-security.com',
'hola_security.cn',
'hola_security.com'
]
for domain in dms:
if is_register(domain):
print('[+] %s is registered' % domain)
else:
print('[-] %s is not registered' % domain)
V2.0
功能优化