def post(self): auth_code = base64.encodestring( hmac.new(ENV.password, unicode( self.request.body ).encode("utf-8"), hashlib.sha256).digest() ).strip() if ( auth_code == self.request.headers["Authorization"] ): ip = IP_DB.get_by_key_name(ENV.ip_key_name) self.response.out.write(ip.ip) else: self.error(401)
def post(self): if ( ENV.password_hash == hashlib.sha512(self.request.get('password')).hexdigest() ): ip = IP_DB.get_by_key_name(ENV.ip_key_name) self.response.out.write("<b>"+ip.ip+"</b><br>Last Update: "+str(ip.time)) else: self.response.out.write("<h1>Wrong Password</h1>")
def post(self): if ( ENV.password_hash == hashlib.sha512(self.request.get('password')).hexdigest() ): ip = IP_DB.get_by_key_name(ENV.ip_key_name) self.redirect("http://"+ip.ip) else: self.response.out.write("<h1>Wrong Password</h1>")