mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 04:19:26 +08:00
Update firewall_api.py
This commit is contained in:
@@ -212,12 +212,12 @@ class firewall_api:
|
||||
status = False
|
||||
|
||||
# 密码登陆配置检查
|
||||
pass_rep = "PasswordAuthentication\s+(\w*)\s*\n"
|
||||
data['pass_prohibit_status'] = True
|
||||
pass_rep = "#PasswordAuthentication\s+(\w*)\s*\n"
|
||||
data['pass_prohibit_status'] = False
|
||||
pass_status = re.search(pass_rep, conf)
|
||||
if pass_status:
|
||||
if pass_status.groups(0)[0].strip() == 'yes':
|
||||
data['pass_prohibit_status'] = False
|
||||
data['pass_prohibit_status'] = True
|
||||
|
||||
data['port'] = port
|
||||
data['status'] = status
|
||||
|
||||
Reference in New Issue
Block a user