From 568840cba2f1eecfd2814389e5218c7137981712 Mon Sep 17 00:00:00 2001 From: milangfx Date: Fri, 27 Mar 2020 01:22:55 +0100 Subject: [PATCH] Fix URL encoding of cookie --- SlackPirate.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SlackPirate.py b/SlackPirate.py index fa074ec..f1a0359 100755 --- a/SlackPirate.py +++ b/SlackPirate.py @@ -164,8 +164,7 @@ def display_cookie_tokens(cookie, user_agent): """ try: - if cookie['d'].endswith("="): - cookie['d'] = urllib.parse.quote(cookie['d']) + cookie['d'] = urllib.parse.quote(urllib.parse.unquote(cookie['d'])) r = requests.get("https://slackpirate-donotuse.slack.com", cookies=cookie) already_signed_in_match = re.findall(ALREADY_SIGNED_IN_TEAM_REGEX, str(r.content)) if already_signed_in_match: