Skip to content

Commit

Permalink
Version 1.1
Browse files Browse the repository at this point in the history
- Installing pip2 not longer necessary
- Improve compatibility
  • Loading branch information
Anthares101 committed Dec 18, 2020
1 parent c4b7327 commit 7e2254a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img alt="GitHub" src="https://img.shields.io/badge/version-v1.0-blue"> <img alt="GitHub" src="https://img.shields.io/github/license/anthares101/kali_volatility_installer">
<img alt="GitHub" src="https://img.shields.io/badge/version-v1.1-blue"> <img alt="GitHub" src="https://img.shields.io/github/license/anthares101/kali_volatility_installer">

# Kali Volatility installer

Expand All @@ -11,16 +11,16 @@ I tested this script in Kali Linux only, it should work in all Linux distributio

# The problem for Kali Users

If you use Kali Linux, you may have noticed that python 2 support is... not good in Kali last updates, pip for Python 2 is not even installed and you cant add it from Kali repositories. Volatility is affected by this because right now, it only works with Python 2 (I know they are working in a Python 3 version but is not done yet) and you need to install some dependencies with pip, which is not available, so can be a bit tricky getting the last Volatility version to work properly.
If you use Kali Linux, you may have noticed that you cant use `pip2` and if you use `pip` it will install the dependencies for Python 3. Volatility is affected by this because right now, it only works with Python 2 (I know they are working in a Python 3 version but is not done yet) and you need to install some dependencies with pip, which is not available, so can be a bit tricky getting the last Volatility version to work properly.

## Prerequisites

- Install `python-dev` with `sudo apt install python-dev` before executing this installer. I decided to let this step to you because you need `sudo` for it and executing a hole
script with it can be scary you know.
- Also make sure `$HOME/.local/bin` is in your path.
- Make sure you have `python2` installed in your system. You can install it with `sudo apt install python2`

## Solution

Well, i wrote a little script that will install the last Volatility version available and all the dependecies needed to run it. The script will install pip too using the `get-pip.py` file, you can find more information about it [here](https://pip.pypa.io/en/stable/installing/).
Well, i wrote a little script that will install the last Volatility version available and all the dependecies needed to run it.

The installer will also add Volatility to your path as `volatility2` (You will need to reopen the terminal for this changes to take effect) and if you need to update Volatility just rerun this installer (Wont duplicate anything dont worry about that).
16 changes: 2 additions & 14 deletions install_volatility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,14 @@ git clone "https://github.com/volatilityfoundation/volatility.git" "${HOME}/vola
printCommandResult
exitOnError

# Install pip for python 2 if necessary
echo -ne "Installing pip for python 2...\t\t\t"
if command -v pip2 &> /dev/null; then
echo -e "[${GREEN}DONE${NC}]"
else
curl https://bootstrap.pypa.io/get-pip.py -o "${HOME}/volatility/get-pip.py" &> /dev/null
python "${HOME}/volatility/get-pip.py" &> /dev/null
printCommandResult
exitOnError
rm "${HOME}/volatility/get-pip.py"
fi

# Install dependencies
echo -ne "Installing dependencies...\t\t\t"
pip2 install distorm3==3.4.4 yara-python pycrypto pillow openpyxl ujson &> /dev/null
python2 -m pip install distorm3==3.4.4 yara-python pycrypto pillow openpyxl ujson &> /dev/null
printCommandResult

# Create bash script for execution using path
echo -ne "Create bash script for execution...\t\t"
echo -e "#! /bin/bash\n\npython $HOME/volatility/vol.py \"\$@\"" > "${HOME}/volatility/volatility2"
echo -e "#! /bin/bash\n\npython2 $HOME/volatility/vol.py \"\$@\"" > "${HOME}/volatility/volatility2"
chmod u+x "${HOME}/volatility/volatility2" &> /dev/null
printCommandResult

Expand Down

0 comments on commit 7e2254a

Please sign in to comment.