Skip to content

Commit

Permalink
Merge pull request #49 from milangfx/fix_urlencode
Browse files Browse the repository at this point in the history
Fix URL encoding of cookie
  • Loading branch information
emtunc authored Mar 27, 2020
2 parents 5014833 + 568840c commit 833fd11
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions SlackPirate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 833fd11

Please sign in to comment.