Skip to content

Commit

Permalink
Update tools.py
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed May 20, 2024
1 parent 8da60ff commit 32a6b36
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,20 @@ def mwcli(mw_input=0):
else:
print("|-二次验证已关闭!")
elif mw_input == 26:
cmd = 'firewall-cmd --list-all'
os.system(cmd)
cmd = 'which ufw'
run_cmd = False
find_cmd = mw.execShell(cmd)
if find_cmd[0].strip() != '':
run_cmd = True
os.system('ufw status')

cmd = 'which firewall-cmd'
find_cmd = mw.execShell(cmd)
if find_cmd[0].strip() != '':
run_cmd = True
os.system('firewall-cmd --list-all')
if not run_cmd:
mw.echoInfo("未检测到防火墙!")
elif mw_input == 100:
php_conf = 'plugins/php/info.json'
if os.path.exists(php_conf):
Expand Down

0 comments on commit 32a6b36

Please sign in to comment.