Skip to content

Instantly share code, notes, and snippets.

@jayluxferro
Last active October 18, 2020 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jayluxferro/f658c7e4192e5277e32730b307a0574d to your computer and use it in GitHub Desktop.
Save jayluxferro/f658c7e4192e5277e32730b307a0574d to your computer and use it in GitHub Desktop.
binwalk installer
#!/bin/bash
# root access
if [ $(whoami) != 'root' ];
then
echo 'Please run as root'
exit 1
fi
apt-get install python3 python3-pip python3-crypto python3-numpy python3-scipy python3-pip mtd-utils gzip bzip2 tar arj lhasa p7zip p7zip-full cabextract cramfsswap squashfs-tools sleuthkit default-jdk lzop srecord zlib1g-dev liblzma-dev liblzo2-dev git -y
# installing pip packages
python3 -m pip install nose coverage pyqtgraph capstone cstruct
# install extra deps
install_path=/tmp/binwalk_installer
if [ ! -d $install_path ];
then
mkdir -p $install_path
fi
git clone https://github.com/devttys0/sasquatch $install_path/sasquatch
cd $install_path/sasquatch
./build.sh
git clone https://github.com/sviehb/jefferson $install_path/jefferson
cd $install_path/jefferson
python3 setup.py install
git clone https://github.com/jrspruitt/ubi_reader $install_path/ubi_reader
cd $install_path/ubi_reader
python3 setup.py install
git clone https://github.com/devttys0/yaffshiv $install_path/yaffshiv
cd $install_path/yaffshiv
python3 setup.py install
wget -O - http://my.smithmicro.com/downloads/files/stuffit520.611linux-i386.tar.gz | tar -zxv
cp bin/unstuff /usr/local/bin/
# install binwalk
apt install binwalk
# remove directory
rm -rvf $install_path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment