diff options
author | Toke Høiland-Jørgensen <toke@toke.dk> | 2023-10-18 00:05:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-18 00:05:12 +0200 |
commit | 27c8262f2a60ef1276869a1d4d5d43a0339a785d (patch) | |
tree | 68b77aee7a6cb623a6db7c48a624412933e0060f /_pytest/test_formatted_name.py | |
parent | 1f9f89c778708698070e9cba639f2c53dec23490 (diff) | |
download | wee-slack-27c8262f2a60ef1276869a1d4d5d43a0339a785d.tar.gz |
Handle Firefox containers in extract_token_from_browser.py (#909)
The extract_token_from_browser.py script does not handle Firefox containers
correctly. The container support works by namespacing cookies and local storage
with a 'userContextId'. In effect this means that when containers are used,
running the script will select the cookie from whichever container happens to be
returned first by the database query, which will be combined with the
non-containerised instance of the local storage.
Add correct handling by adding a new --container flag which specifies a
container either by numeric ID or by name, and including the correct
userContextId into the cookie query and local storage path (or excluding all
cookies from containers from the query if no --container flag is supplied).
With this the script can be run like:
python extract_token_from_browser.py --container Work firefox
to get the Slack auth token for the 'Work' container.
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Diffstat (limited to '_pytest/test_formatted_name.py')
0 files changed, 0 insertions, 0 deletions