modifié: m/login.py
modifié: superTornado.py
This commit is contained in:
parent
ca621aba8f
commit
e3c796a102
@ -6,7 +6,7 @@ from datetime import datetime
|
||||
class Login(object):
|
||||
def verifLogin(self,pLog,pMdp):
|
||||
hashMdp = hashlib.sha224(pMdp).hexdigest()
|
||||
with open("fichier/autorise", "r") as source :
|
||||
with open("m/fichier/autorise", "r") as source :
|
||||
for ligne in source :
|
||||
data = ligne.rstrip('\n\r').split(',')
|
||||
if data[0] in pLog :
|
||||
@ -17,7 +17,7 @@ class Login(object):
|
||||
return False
|
||||
|
||||
def enregDansLog(self,pLog,pMsg,pIP):
|
||||
with open("fichier/log", "a") as dest :
|
||||
with open("m/fichier/log", "a") as dest :
|
||||
d = datetime.now().strftime("%c")
|
||||
dest.write("%s,%s,%s,%s\n" % (d,pLog,pMsg,pIP))
|
||||
|
||||
|
@ -141,9 +141,9 @@ application = tornado.web.Application([
|
||||
(r"/unauthorized", UnauthorizedHandler),
|
||||
(r"/disconnection", DisconnectionHandler),
|
||||
(r"/socket", WSocketHandler),
|
||||
(r"/style/(.*)", tornado.web.StaticFileHandler,{"path":"./style"},),
|
||||
(r"/images/(.*)", tornado.web.StaticFileHandler,{"path":"./images"},),
|
||||
(r"/js/(.*)", tornado.web.StaticFileHandler,{"path":"./js"},)],
|
||||
(r"/style/(.*)", tornado.web.StaticFileHandler,{"path":"./v/style"},),
|
||||
(r"/images/(.*)", tornado.web.StaticFileHandler,{"path":"./v/images"},),
|
||||
(r"/js/(.*)", tornado.web.StaticFileHandler,{"path":"./v/js"},)],
|
||||
cookie_secret="1213215656")
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Reference in New Issue
Block a user