Update firewall_api.py

This commit is contained in:
midoks
2023-09-25 03:54:22 +08:00
parent 8bc9500b23
commit 1389280a70
+3 -1
View File
@@ -216,11 +216,13 @@ class firewall_api:
# 密码登陆配置检查
pass_rep = "^PasswordAuthentication\s+(\w*)\s*\n"
pass_status = re.search(pass_rep, conf)
if not pass_status:
if pass_status:
# pass_rep = "PasswordAuthentication\s+(\w*)\s*\n"
# pass_status = re.search(pass_rep, conf)
if pass_status and pass_status.groups(0)[0].strip() == 'no':
data['pass_prohibit_status'] = True
else:
data['pass_prohibit_status'] = True
data['port'] = port
data['status'] = status