modifié: illegal.html
modifié: superTornado.py
This commit is contained in:
parent
a8affc98a6
commit
b88379ebc6
@ -9,8 +9,8 @@
|
||||
<h2>Acces securise camera</h2>
|
||||
<form action="/unauthorized" method="post">
|
||||
<p>Forcer l'acces a la camera :</p>
|
||||
Oui <input type="radio" name="illegalAccess">
|
||||
Non : <input type="radio" name="illegalAccess"> <br/>
|
||||
Oui : <input type="radio" name="illegalAccess" value=1>
|
||||
Non : <input type="radio" name="illegalAccess" value= 2 checked="checked"> <br/>
|
||||
<input type="submit" value="Valider">
|
||||
</form>
|
||||
</body>
|
||||
|
@ -47,7 +47,7 @@ class MainHandler(BaseHandler):
|
||||
print '->Send visual alarm unauthorized user'
|
||||
print 'maison.request("GET", "micom/lamp.php?room=salon1&order=1")'
|
||||
print "->An unauthorized user try to access"
|
||||
self.redirect("/illegal.html")
|
||||
self.redirect("/unauthorized")
|
||||
|
||||
class VideoHandler(BaseHandler):
|
||||
def get(self):
|
||||
@ -61,7 +61,7 @@ class UnauthorizedHandler(BaseHandler):
|
||||
def get(self):
|
||||
self.render("illegal.html")
|
||||
def post(self):
|
||||
force = self.get_argument("id","")
|
||||
force = self.get_argument("illegalAccess","")
|
||||
if force == 1 :
|
||||
self.set_secure_cookie("user", "illegalUser")
|
||||
else :
|
||||
|
Reference in New Issue
Block a user