This commit is contained in:
Mr Chen
2019-01-15 15:38:00 +08:00
parent d09d17165c
commit 18c4b711f3
2 changed files with 9 additions and 1 deletions
+8 -1
View File
@@ -20,6 +20,7 @@ import db
def init():
initDB()
initInitD()
initUserInfo()
def initDB():
@@ -54,4 +55,10 @@ def initInitD():
def initUserInfo():
return ''
data = public.M('users').where('id=?', (1,)).getField('password')
if data == '21232f297a57a5a743894a0e4a801fc3':
pwd = public.getRandomString(8).lower()
file_pw = public.getRunDir() + '/data/default.pl'
public.writeFile(file_pw, pwd)
public.M('users').where('id=?', (1,)).setField(
'password', public.md5(pwd))
+1
View File
@@ -0,0 +1 @@
qpzw99oc