提交 97341d44 编写于 作者: W weixin_42259925

Fri Jan 19 17:34:00 CST 2024 inscode

上级 93642a73
import subprocess
# # 安装dnsutils
# subprocess.run(["apt-get", "install", "dnsutils" " -y"])
# 假设你要查询的域名是example.com
domain = "example.com"
# 使用subprocess运行dig命令并获取输出
result = subprocess.run(["dig", domain], capture_output=True)
# 输出结果
print(result.stdout.decode('utf-8'))
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册