dean 0c1c82e67d first commit in gogs. | 6 лет назад | |
---|---|---|
.. | ||
local_generater | 6 лет назад | |
passwd_changer | 6 лет назад | |
README.md | 6 лет назад | |
__init__.py | 6 лет назад |
依赖模块
pip install redis MySQLdb
日志
[handler_rotateFileHandler]
class=handlers.RotatingFileHandler
level=DEBUG
formatter=simpleFormatter
args=('securitypw.log', 'a', 50*1024*1024, 6)
密码修改间隔时间
token_unix_time = hashlib.md5(str(int(self.t) / 300)).hexdigest()[10:]
配置redis、mysql和用户名
class Config():
#database setting
dbhost = '678h0MTkyLjE2OC41LjnTjBX8ugEwNQ'
dbport = 'WRed4MzMwNg'
dbuser = 'qCgtpZGVhbg'
dbpasswd = 'jcwGKMTIzNDU2'
dbname = 'yU4LbYXV0aGNlbneWYjqFvQRlcg'
#redis setting
redishost = 'eZroIMTkyLjE2OC4xvEWFh7azLjgy'
redisport = 'MRci8NjM3OQ'
redisdb=0
#users
users = [ 'mYPeZZG91eXVedTrv2ONvcHM',
]