UPDATE

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