Initial commit: 商品售卖网站
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import sqlite3
|
||||
import bcrypt
|
||||
|
||||
conn = sqlite3.connect('backend/sale.db')
|
||||
cursor = conn.cursor()
|
||||
|
||||
new_password = "admin123"
|
||||
hashed = bcrypt.hashpw(new_password.encode('utf-8'), bcrypt.gensalt()).decode('utf-8')
|
||||
|
||||
cursor.execute("UPDATE users SET password_hash = ? WHERE email = ?", (hashed, "admin@viaeon.com"))
|
||||
conn.commit()
|
||||
|
||||
print("密码已重置为: admin123")
|
||||
Reference in New Issue
Block a user