2021-01-24 12:51:42 +01:00
|
|
|
# Snappy-fox 🦀🦊
|
2021-01-24 12:49:56 +01:00
|
|
|
|
|
|
|
<a href="https://github.com/berdav/snappy-fox/blob/master/LICENSE">
|
|
|
|
<img alt="GitHub" src="https://img.shields.io/github/license/berdav/snappy-fox.svg?color=blue">
|
|
|
|
</a>
|
2021-01-24 12:50:57 +01:00
|
|
|
|
|
|
|
Snappy-fox is a morgue cache decompressor for Firefox which does not have
|
2021-01-24 12:27:39 +01:00
|
|
|
dependencies.
|
|
|
|
|
|
|
|
## Why?
|
|
|
|
Online applications such as whatsapp web (web.whatsapp.com) saves cache
|
|
|
|
files (e.g. images) in a compressed way.
|
|
|
|
|
2021-01-24 12:39:34 +01:00
|
|
|
You can recognize these files searching for the pattern sNaPpY:
|
|
|
|
```bash
|
|
|
|
grep 'sNaPpY' ~/.mozilla/firefox/*/storage/default/*/cache/morgue/*/*
|
|
|
|
```
|
|
|
|
|
2021-01-24 12:27:39 +01:00
|
|
|
This application can help the retrieval of such cache files.
|
|
|
|
|
|
|
|
## Setup
|
|
|
|
Just compile this application, you will need a C compiler
|
|
|
|
(gcc or clang) and make
|
|
|
|
```bash
|
|
|
|
sudo apt install make gcc
|
|
|
|
```
|
|
|
|
|
2021-01-24 12:31:35 +01:00
|
|
|
Then just compile the application
|
|
|
|
```bash
|
|
|
|
make
|
|
|
|
```
|
|
|
|
|
|
|
|
You can add debug prints with
|
|
|
|
```bash
|
|
|
|
make CFLAGS=DEBUG
|
|
|
|
```
|
|
|
|
|
2021-01-24 12:27:39 +01:00
|
|
|
## How?
|
|
|
|
|
|
|
|
The usage of the application is pretty simple:
|
|
|
|
```bash
|
2021-01-24 12:43:01 +01:00
|
|
|
./snappy-fox <input-file> <output-file>
|
2021-01-24 12:27:39 +01:00
|
|
|
```
|
|
|
|
The input or the output files can be `-` to use, respectively stdin and
|
|
|
|
stdout.
|
|
|
|
|
|
|
|
For instance you can do:
|
|
|
|
```bash
|
|
|
|
mkdir /tmp/extracted-cache-whatsapp
|
|
|
|
for f in
|
|
|
|
find ~/.mozilla/firefox/**/storage/default/https+++web.whatsapp.com/cache/ -name '*.final';
|
|
|
|
do
|
2021-01-24 12:43:01 +01:00
|
|
|
./snappy-fox "$f" "/tmp/extracted-cache-whatsapp/$(basename $f)"
|
2021-01-24 12:27:39 +01:00
|
|
|
done
|
|
|
|
```
|
|
|
|
|
|
|
|
And it will extract all your cache files in the
|
|
|
|
`/tmp/extracted-cache-whatsapp` directory.
|