| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This fixes an issue where the temporary directory couldn't be deleted
after use because the connection to the LevelDB file in it was still
open.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
On some Linux systems org.freedesktop.Secret D-Bus service is not
available (installed/enabled), typically as a deliberate choice. In
those cases `extract_token_from_browser.py` hands for the duration of
D-Bus timeout and eventually fails. Note that it does not handle the
timeout exception, so a fallback is not used.
This commit adds `--no-secretstorage` option which skips using that
service.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
This line was wrongly indented after the merge conflict resolution in
commit e86e05e.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This flag overrides detction and uses the specified profile path. This
helps when a non-default profile is used for Slack. It also helps if
autodetection fails; accordingly, recommend use of the flag in that
case.
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
webappsstore.sqlite seems to be deprecated, and firefox is migrating to
per-page locations. The values inside the database can be
snappy-compressed, so handle decoding with a new dependency on
python-snappy. Suggested by Trygve Aaberge.
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Firefox's default profile can have several different name suffixes,
including ".default-release", the legacy ".default", and others for
different release channels. Rather than guessing, just parse
profiles.ini to determine the default path. Suggested by Trygve
Aaberge.
Link: https://support.mozilla.org/gl/questions/1264072
Link: https://support.mozilla.org/en-US/kb/understanding-depth-profile-installation
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This makes the code much easier to read in my opinion. It also fixes
some errors about potentially unbound variables.
|
| |
| |
| |
| |
| |
| |
| | |
Although this file exists in the Chromium profile directory, it's empty.
I would assume Chrome/Chromium always uses the LevelDB file, so there's
no point in checking the webappsstore.sqlite file. Doing this allows us
to refactor some code in the next commit.
|
| |
| |
| |
| |
| |
| | |
Chromium encrypted values start with v10, while Chrome values start with
v11. I don't see any reason to check that the prefix is either of these
really, just remove it unconditionally.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
I see no value of having this option, and it's just confusing since the
script is meant for extracting the token.
|
| |
| |
| |
| | |
The script didn't work anymore for firefox after commit c7868cc.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
The script prints usage if you run it with --help, so I don't see a need
for these examples. The examples are likely to get outdated when the
script options are changed, so I rather not have them there.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add support for cookies decryption for Chrome/beta
* Add support for firefox-snap, and multiple default/custom profiles
paths
* If no token can be found, like no key localConfig_v2 in
webappsstore2, try the best to fetch it from leveldb (or online copy
of it, if locked by running browser). When no luck even with that,
suggest the user to fetch it manually from dev console, and pass it
as an extra argument. This way it still saves some extra cycles for
the script users by fetching d/d-s values, and formatting the
ultimate registration command string.
Not tested on Darwin, leaving this as an exercise for you
Adding Chromium support should be straightforward and can be done in
follow-ups.
Signed-off-by: Bohdan Dobrelia <bdobreli@redhat.com>
Co-authored-by: Bogdan Dobrelya <bogdando@mail.ru>
|
|
|
|
|
| |
According to one comment it was necessary for them to include this
cookie as well.
|
| |
|
|
|
|
| |
The individual teams in the enterprise grid is still listed.
|
|
|