Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lemnos committed Jun 9, 2021
0 parents commit c0252c1
Show file tree
Hide file tree
Showing 5 changed files with 599 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.swp
*.swo
bin/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT/X Consortium License

© 2020 Aetnaeus <aetnaeus@protonmail.com>

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
all:
-mkdir bin
go build -o bin/chrome-session-dump *.go
install:
install -m755 bin/chrome-session-dump /usr/bin
rel:
GOOS=darwin GOARCH=amd64 go build -o bin/chrome-session-dump-osx *.go
GOOS=windows GOARCH=amd64 go build -o bin/chrome-session-dump.exe *.go
GOOS=linux GOARCH=amd64 go build -o bin/chrome-session-dump-linux *.go
GOOS=linux GOARCH=arm go build -o bin/chrome-session-dump-linux_arm *.go
GOOS=linux GOARCH=arm64 go build -o bin/chrome-session-dump-linux_arm64 *.go
51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# What

A tool for dumping the contents of chrome session files.

# Why?

Most tools for reading SNSS files (chrome session files) are either broken or
outdated. This tool aims to facilitate scripting by providing a clean way of
extracting useful information (like the active tab) from a running or saved
chrome session. You could, for instance, use the tool to extract the current
page within an external script and download its contents to disk or
store it inside a bookmark file.

# Installation

```
make && sudo make install
```

# Usage

```
# chrome-session-dump # Print the url of all tabs found in the session in order.
https://ddg.gg
https://protonmail.com
chrome-session-dump -active # Print the url of the most recently active tab
https://protonmail.com
chrome-session-dump -printf '%t\n'
Secure email: ProtonMail is free encrypted email.
DuckDuckGo — Privacy, simplified.
chrome-session-dump -deleted -history|grep 'chrome-session-dump' # Search history of all (potentially deleted) tabs for a url containing the given expression.
https://github.com/lemnos/chrome-session-dump
```

A session file (or chrome directory) can optionally be provided as the final argument, by default the tool will
look for the most recent session file in ~/.config/chrome.

# Caveats

Won't work on incognito tabs (since they are not persisted to disk)

# To whom it may concern

Please don't use this for evil.
Loading

0 comments on commit c0252c1

Please sign in to comment.