Update mw.py

This commit is contained in:
dami
2025-09-11 16:31:43 +08:00
parent f1cb9a824d
commit e2fd50d152
+7 -2
View File
@@ -424,9 +424,14 @@ def md5(content):
def hasPwd(password):
# python3 -c "import crypt"
# python3 -c 'import crypt; print(crypt.crypt(""))'
# 加密密码字符
import crypt
return crypt.crypt(password, password)
# import crypt
# return crypt.crypt(password, password)
import bcrypt
salt = bcrypt.gensalt()
return bcrypt.hashpw(password.encode('utf-8'), salt)
def getFileMd5(filename):
# 文件的MD5值