update:优化页面样式

This commit is contained in:
hrz
2025-02-15 16:17:08 +08:00
parent 2379cdc3ba
commit 2901506157
13 changed files with 80257 additions and 74 deletions
+30
View File
@@ -1,4 +1,5 @@
import os
import re
import json
import yaml
import socket
@@ -91,3 +92,32 @@ def remove_punctuation_and_length(text):
if result == "Yeah":
return 0
return len(result), result
def check_password(password):
"""
检查密码是否满足以下条件:
1. 密码长度大于八位。
2. 密码包含英文和数字。
3. 密码不能包含“xiaozhi”字符。
:param password: 要检查的密码
:return: 如果密码满足条件,则返回True;否则返回False。
"""
# 检查密码长度
if len(password) < 10:
return False
# 检查是否包含英文字符和数字
if not re.search(r'[A-Za-z]', password) or not re.search(r'[0-9]', password):
return False
# 检查是否包含“xiaozhi”字符
if "xiaozhi" in password:
return False
if "123456" in password:
return False
# 如果满足所有条件,则返回True
return True