modifié: superTornado.py
This commit is contained in:
parent
26646d7f91
commit
5439f04254
@ -74,25 +74,25 @@ class WSocketHandler(BaseHandler,tornado.websocket.WebSocketHandler):
|
|||||||
self.close()
|
self.close()
|
||||||
return
|
return
|
||||||
print "->Websocket opened"
|
print "->Websocket opened"
|
||||||
if self.current_user == "illegalUser":
|
if self.current_user == "illegalUser":
|
||||||
iden="IllegalUser"
|
iden="IllegalUser"
|
||||||
ficLog.enregDansLog(iden,"Unauthorized user connection","IP TO DO")
|
ficLog.enregDansLog(iden,"Unauthorized user connection","IP TO DO")
|
||||||
if confAveug == True:
|
if confAveug == True:
|
||||||
print '->Send audio alarm unauthorized user'
|
print '->Send audio alarm unauthorized user'
|
||||||
print 'maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20non%20autorisee")'
|
print 'maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20non%20autorisee")'
|
||||||
else:
|
else:
|
||||||
print '->Send visual alarm unauthorized user'
|
print '->Send visual alarm unauthorized user'
|
||||||
print 'maison.request("GET", "micom/lamp.php?room=salon1&order=1")'
|
print 'maison.request("GET", "micom/lamp.php?room=salon1&order=1")'
|
||||||
else :
|
else :
|
||||||
iden = self.current_user
|
iden = self.current_user
|
||||||
ficLog.enregDansLog(iden,"Authorized user connection","IP TO DO")
|
ficLog.enregDansLog(iden,"Authorized user connection","IP TO DO")
|
||||||
if confAveug == True:
|
if confAveug == True:
|
||||||
print '->Send audio alarm authorized user'
|
print '->Send audio alarm authorized user'
|
||||||
print 'maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20autorisee")'
|
print 'maison.request("GET", "micom/say.php?source=toto&text=Connection%20a%20la%20camera%20autorisee")'
|
||||||
else:
|
else:
|
||||||
print '->Send visual alarm authorized user'
|
print '->Send visual alarm authorized user'
|
||||||
print 'maison.request("GET", "micom/lamp.php?room=salon1&order=1")'
|
print 'maison.request("GET", "micom/lamp.php?room=salon1&order=1")'
|
||||||
print "->Authorized user access"
|
print "->Authorized user access"
|
||||||
|
|
||||||
try :
|
try :
|
||||||
f = urlopen('http://test:a@192.168.0.13/image.jpg?cidx=791836195')
|
f = urlopen('http://test:a@192.168.0.13/image.jpg?cidx=791836195')
|
||||||
|
Reference in New Issue
Block a user