Skip to content

Commit

Permalink
Merge pull request #43 from milangfx/auto_url_encode_cookie
Browse files Browse the repository at this point in the history
Automatically URL encode cookie if it's URL decoded
  • Loading branch information
emtunc authored Nov 3, 2019
2 parents 079cc07 + 980fc90 commit 3349701
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.*/
__pycache__
SlackPirate/
SlackPirate_*/
3 changes: 3 additions & 0 deletions SlackPirate.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import requests
import termcolor
import queue
import urllib.parse

from typing import List
from multiprocessing import Process, Queue
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 3349701

Please sign in to comment.