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