From 92199749423c78bc3857a0e18f023b5950049fc1 Mon Sep 17 00:00:00 2001 From: 622ff545dfef6c4fdb84ccec <622ff545dfef6c4fdb84ccec@devide> Date: Mon, 8 May 2023 11:58:19 +0000 Subject: [PATCH] Auto commit --- stui.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stui.py b/stui.py index f168939..ba1dc3a 100644 --- a/stui.py +++ b/stui.py @@ -11,7 +11,6 @@ user_input = st.text_input('输入域名http://') if user_input != '': st.write('正在解析:,', user_input, '......') - # 判断当前操作系统是centos还是ubuntu os_check = subprocess.check_output('cat /etc/*-release | grep -i name', shell=True).decode() if 'centos' in os_check.lower(): @@ -29,9 +28,9 @@ if user_input != '': print('dig is not installed') # 判断操作系统,执行相应的安装命令 if os_name == 'CentOS': - subprocess.call(['sudo', 'yum', 'install', '-y', 'bind-utils']) + subprocess.call(['yum', 'install', '-y', 'bind-utils']) elif os_name == 'Ubuntu': - subprocess.call(['sudo', 'apt-get', 'install', '-y', 'dnsutils']) + subprocess.call(['apt-get', 'install', '-y', 'dnsutils']) else: print('Unknown operating system') -- GitLab