From 0b3938d035f784d9938c14a9bc4c86fdcbc6ed47 Mon Sep 17 00:00:00 2001 From: milangfx Date: Sun, 3 Nov 2019 18:16:01 +0100 Subject: [PATCH 1/2] Automatically URL encode cookie if it's URL decoded --- SlackPirate.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SlackPirate.py b/SlackPirate.py index 6aedc89..326e3e5 100755 --- a/SlackPirate.py +++ b/SlackPirate.py @@ -9,6 +9,7 @@ import requests import termcolor import queue +import urllib.parse from typing import List from multiprocessing import Process, Queue @@ -163,6 +164,8 @@ def display_cookie_tokens(cookie, user_agent): """ try: + if cookie['d'].endswith("="): + cookie['d'] = urllib.parse.quote(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: From 980fc90563ffff72fd6a1e2b1cedd3988d57b238 Mon Sep 17 00:00:00 2001 From: milangfx Date: Sun, 3 Nov 2019 18:51:37 +0100 Subject: [PATCH 2/2] Ignore folders of search results --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b3e23cb..ff2bd54 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .*/ __pycache__ -SlackPirate/ \ No newline at end of file +SlackPirate_*/