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