55
66# Installation
77
8+ Unblob consists of two main parts:
9+
10+ - unblob, the Python package (with optional Rust modules).
11+ - extractor command line tools like ` 7zip ` , ` unar ` , etc. (See [ Extractors] ( ./extractors.md ) for explanation.)
12+
13+ All of these need to be installed to make unblob fully functional.
14+ Depending the packaging solution you choose, you might need to
15+ install external extractors manually.
16+
17+ ## Python package
18+
19+ unblob can be installed (without the extractors) from PyPI (Python Package Index).
20+ This might be the easiest method, depending on whether you have Python 3 installed already.
21+
22+ 1 . First, install the Python package:
23+
24+ python3 -m pip install --user unblob
25+
26+ This will install the ` unblob ` script in ` ~/.local/bin ` . You can put that
27+ directory in your ` PATH ` environment variable, or call it directly.
28+
29+ !!! Warning
30+
31+ System-wide installation (with `sudo`) is not recommended, because it can potentially break your system.
32+
33+ 2 . Make sure to [ install extractors] ( #install-extractors ) .
34+
35+ 3 . Check that everything works correctly:
36+
37+ unblob --show-external-dependencies
38+
839## Docker image
940
1041unblob can be used right away from a ` docker ` image: ` ghcr.io/onekey-sec/unblob:latest ` ,
@@ -35,34 +66,33 @@ docker run --rm --pull always ghcr.io/onekey-sec/unblob:latest --help
3566unblob can be built and run using the [ Nix] ( https://nixos.org ) package manager.
3667The Nix derivation installs all 3rd party dependencies.
3768
38- 1 . [ Install and configure Nix] ( https://nixos.org/download.html ) .
69+ 1 . [ Install and configure Nix] ( https://nixos.org/download.html ) .
3970
40- 1 . _ Optional_ : enable the experimental features so that you don't need to pass
41- ` --extra-experimental-features "nix-command flakes" ` to ` nix ` command invocations:
71+ 1 . _ Optional_ : enable the experimental features so that you don't need to pass
72+ ` --extra-experimental-features "nix-command flakes" ` to ` nix ` command invocations:
4273
43- cat > ~/.config/nix/nix.conf <<EOF
44- experimental-features = nix-command flakes
45- EOF
74+ cat > ~/.config/nix/nix.conf <<EOF
75+ experimental-features = nix-command flakes
76+ EOF
4677
47- 1 . _ Optional_ : use pre-built binaries from GitHub using [ cachix] ( https://app.cachix.org/cache/unblob ) :
78+ 1 . _ Optional_ : use pre-built binaries from GitHub using [ cachix] ( https://app.cachix.org/cache/unblob ) :
4879
4980 nix-env -iA cachix -f https://cachix.org/api/v1/install
5081 cachix use unblob
5182
52- 1 . Install unblob:
83+ 1 . Install unblob:
5384
5485 nix profile install github:onekey-sec/unblob
5586
5687- Check that everything works correctly:
5788
5889 unblob --show-external-dependencies
5990
60-
6191## From source
6292
63- 1 . Install [ Git] ( https://git-scm.com/download/ ) if you don't have it yet.
64- 2 . Install the [ Poetry] ( https://python-poetry.org/docs/#installation ) Python package manager.
65- 3 . ** Clone** the unblob ** repository from GitHub** :
93+ 1 . Install [ Git] ( https://git-scm.com/download/ ) if you don't have it yet.
94+ 2 . Install the [ Poetry] ( https://python-poetry.org/docs/#installation ) Python package manager.
95+ 3 . ** Clone** the unblob ** repository from GitHub** :
6696
6797 git clone https://github.com/onekey-sec/unblob.git
6898
@@ -74,56 +104,26 @@ The Nix derivation installs all 3rd party dependencies.
74104 cd unblob
75105 UNBLOB_BUILD_RUST_EXTENSION=1 poetry install --no-dev
76106
77- 2 . Python packages only:
107+ 2 . Python packages only:
78108
79109 cd unblob
80110 poetry install --no-dev
81111
82- 5 . Install ** required extractors** with your operating system package manager:
83-
84- - on Ubuntu 22.04, install extractors with APT:
85-
86- sudo apt install e2fsprogs p7zip-full unar zlib1g-dev liblzo2-dev lzop lziprecover img2simg libhyperscan-dev zstd
87-
88- - If you need squashfs support, install sasquatch:
112+ 3 . Make sure you [ installed all extractors] ( #install-extractors ) .
89113
90- curl -L -o sasquatch_1.0_amd64.deb https://github.com/onekey-sec/sasquatch/releases/download/sasquatch-v1.0/sasquatch_1.0_amd64.deb
91- sudo dpkg -i sasquatch_1.0_amd64.deb
92- rm sasquatch_1.0_amd64.deb
93-
94- 6 . Check that everything works correctly:
95-
96- unblob --show-external-dependencies
97-
98- - Dependencies are all in place:
99- ``` console
100- $ poetry run unblob --show-external-dependencies
101- The following executables found installed, which are needed by unblob:
102- 7z ✓
103- debugfs ✓
104- jefferson ✓
105- lz4 ✓
106- lziprecover ✓
107- lzop ✓
108- sasquatch ✓
109- sasquatch-v4be ✓
110- simg2img ✓
111- ubireader_extract_files ✓
112- ubireader_extract_images ✓
113- unar ✓
114- yaffshiv ✓
115- zstd ✓
116- ```
114+ 4 . Check that everything works correctly:
117115
118- 7 . (Optional) Install it system wide.
116+ poetry run unblob --show-external-dependencies
119117
120- You can install unblob system wide in two operations:
118+ ## Install extractors
121119
122- 1. Build the unblob distribution package:
120+ 1 . With your operating system package manager:
121+ On Ubuntu 22.04, install extractors with APT:
123122
124- cd unblob
125- poetry build
123+ sudo apt install e2fsprogs p7zip-full unar zlib1g-dev liblzo2-dev lzop lziprecover img2simg libhyperscan-dev zstd
126124
127- 2. Install the unblob distribution package :
125+ 2 . If you need ** squashfs support ** , install sasquatch :
128126
129- sudo python3 -m pip install dist/unblob-<version>.tar.gz
127+ curl -L -o sasquatch_1.0_amd64.deb https://github.com/onekey-sec/sasquatch/releases/download/sasquatch-v1.0/sasquatch_1.0_amd64.deb
128+ sudo dpkg -i sasquatch_1.0_amd64.deb
129+ rm sasquatch_1.0_amd64.deb
0 commit comments