From 6628d657d774399658cd01959b9735cb59aa2414 Mon Sep 17 00:00:00 2001 From: eli fessler Date: Tue, 25 Oct 2022 20:40:44 -1000 Subject: [PATCH] avoid upload error by blanking out hacked grizzco weapons (#61) --- utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 2dcea72..727f598 100644 --- a/utils.py +++ b/utils.py @@ -105,9 +105,14 @@ def b64d(string): thing_id = base64.b64decode(string).decode('utf-8') thing_id = thing_id.replace("VsStage-", "") thing_id = thing_id.replace("VsMode-", "") - thing_id = thing_id.replace("Weapon-", "") thing_id = thing_id.replace("CoopStage-", "") thing_id = thing_id.replace("CoopGrade-", "") + + if "Weapon-" in thing_id: + thing_id = thing_id.replace("Weapon-", "") + if len(thing_id) == 5 and thing_id[:2] == "20": # grizzco weapon ID from a hacker + return "" + if thing_id[:15] == "VsHistoryDetail" or thing_id[:17] == "CoopHistoryDetail": return thing_id # string else: