modifié: superTornado.py
This commit is contained in:
parent
79353d888a
commit
14ec8b46ec
@ -4,7 +4,6 @@ import tornado.httpserver
|
||||
import tornado.websocket
|
||||
import tornado.options
|
||||
import base64
|
||||
import tornado.web.RequestHandler.request
|
||||
from urllib import urlopen
|
||||
|
||||
|
||||
@ -32,7 +31,7 @@ class MainHandler(BaseHandler):
|
||||
autorise = login.connexion(iden, mdp)
|
||||
#maison = httplib.HTTPConnection("192.168.16.150", 80)
|
||||
if autorise == True:
|
||||
ficLog.enregDansLog(iden,"Authorized user connection",self.remote_ip())
|
||||
ficLog.enregDansLog(iden,"Authorized user connection",self.request.remote_ip.()
|
||||
if confAveug == True:
|
||||
print '->Send audio alarm authorized user'
|
||||
print 'maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20autorisee")'
|
||||
@ -61,7 +60,7 @@ class UnauthorizedHandler(BaseHandler):
|
||||
force = self.get_argument("illegalAccess","")
|
||||
if force == "1" :
|
||||
self.set_secure_cookie("user", "illegalUser")
|
||||
ficLog.enregDansLog("illegalUser","Unauthorized user connection",self.remote_ip())
|
||||
ficLog.enregDansLog("illegalUser","Unauthorized user connection",self.request.remote_ip.())
|
||||
if confAveug == True:
|
||||
print '->Send audio alarm unauthorized user'
|
||||
print 'maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20non%20autorisee")'
|
||||
|
Reference in New Issue
Block a user