UPDATE

上级 bbad1924
......@@ -18,9 +18,11 @@ if user_input != '':
# 使用subprocess运行dig命令并获取输出
result = subprocess.run(["dig", "+noall", "+answer", user_input ], capture_output=True)
# # 输出dig命令的结果
# print(result.stdout)
# subprocess.run(["dig", user_input])
st.write(result.stdout)
# 将输出转换为表格
output_lines = result.stdout.decode('utf-8').strip().split('\n')
table = [line.split() for line in output_lines]
# 将表格输出到streamlit界面
st.table(table)
else:
st.write('Please enter your name.')
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册