From 08fd1f1750f9efbdcccf6dff9a02af217e98b749 Mon Sep 17 00:00:00 2001 From: David Libeau Date: Sat, 26 Aug 2023 10:46:35 +0200 Subject: [PATCH] Bypass 1 --- index_site.html | 2 +- trust.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) mode change 100644 => 100755 index_site.html mode change 100644 => 100755 trust.py diff --git a/index_site.html b/index_site.html old mode 100644 new mode 100755 index 7535266..3348956 --- a/index_site.html +++ b/index_site.html @@ -195,7 +195,7 @@

Verify your age

getNonce(required_age, validity).then((nonce) => { var dataStr = "data:text/json;charset=utf-8," + - encodeURIComponent(JSON.stringify(nonce)); + encodeURIComponent(JSON.stringify({...nonce, site:"test"})); var downloadAnchorNode = document.createElement("a"); downloadAnchorNode.setAttribute("href", dataStr); downloadAnchorNode.setAttribute("download", "nonce" + ".json"); diff --git a/trust.py b/trust.py old mode 100644 new mode 100755 index 82b7566..3992eb0 --- a/trust.py +++ b/trust.py @@ -97,8 +97,9 @@ def sign(): # Then checks whether the registered age is above the required age. If not, say it. message = request.json required_age = int(message["required_age"]) + site = message["site"] nonce = message["nonce"] - if registered_age < required_age: + if registered_age < required_age and site != "test": return bytes(json.dumps({"user": 1, "majeur": 0}), ENCODING) # Loads the parameters of the required trusted pary