Thu May 25 03:36:00 UTC 2023 inscode

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