Auto commit

上级 1d782812
......@@ -10,10 +10,13 @@ user_input = st.text_input('输入域名http://')
# 判断用户是否有输入,并输出一句问候语
if user_input != '':
st.write('正在解析:,', user_input, '......')
# 定义dig命令
# result = subprocess.run(["python", "dig.py"],capture_output=True)
# 假设你要查询的域名是example.com
# domain = "example.com"
# 检测dig是否安装
try:
subprocess.check_output(["dig", "-v"])
except subprocess.CalledProcessError:
# 如果未安装,则安装dig
subprocess.call(["sudo", "apt-get", "update"])
subprocess.call(["sudo", "apt-get", "install", "-y", "dnsutils"])
# 使用subprocess运行dig命令并获取输出
result = subprocess.run(["dig", "+noall", "+answer", user_input ], capture_output=True)
......@@ -25,4 +28,4 @@ if user_input != '':
# 将表格输出到streamlit界面
st.table(table)
else:
st.write('Please enter your name.')
st.write('这是一个dig的UI界面,Stremlit太强到了')
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册