From d0d11e4ca0efbdf3809485e40b27780ef03684bb Mon Sep 17 00:00:00 2001 From: eli fessler Date: Sat, 10 Sep 2022 00:15:53 -1000 Subject: [PATCH] fix token length checking --- iksm.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/iksm.py b/iksm.py index 47a2027..047f50f 100644 --- a/iksm.py +++ b/iksm.py @@ -350,11 +350,14 @@ def enter_tokens(): print("Go to the page below to find instructions to obtain your gtoken and bulletToken:\nhttps://github.com/frozenpandaman/s3s/wiki/mitmproxy-instructions\n") new_gtoken = input("Enter your gtoken: ") - while len(new_gtoken) != 124: - new_gtoken = input("Invalid token - length should be 124 characters. Try again.\nEnter your gtoken: ") + while len(new_gtoken) != 926: + new_gtoken = input("Invalid token - length should be 926 characters. Try again.\nEnter your gtoken: ") new_bullettoken = input("Enter your bulletToken: ") - while len(new_bullettoken) != 926: - new_bullettoken = input("Invalid token - length should be 926 characters. Try again.\nEnter your bulletToken: ") + while len(new_bullettoken) != 124: + if len(new_bullettoken) == 123 and new_bullettoken[-1] != "=": + new_bullettoken += "=" # add a = to the end, which was probably left off (even though it works without) + else: + new_bullettoken = input("Invalid token - length should be 124 characters. Try again.\nEnter your bulletToken: ") return new_gtoken, new_bullettoken