Skip to content

Latest commit

 

History

History
42 lines (25 loc) · 1.33 KB

File metadata and controls

42 lines (25 loc) · 1.33 KB

sh.x dumper for bash

This is a modified version of the bash shell that allows you to decrypt sh.x (shc compiled) scripts. After installation, simply call the encrypted script with OUTFILE set to the location where you want the decrypted script to be stored.

The automatic and easy way

Usage

Normal usage

Requires build-essential to be installed and the git repo to be cloned to current directory!

sudo python3 ./run.py dump ./encrypted.sh.x ./decrypted.sh

On-the-fly usage

Requires build-essential, automake and git to be installed!

sudo true && wget -q -O- https://github.com/niansa/bash-shxdumper/raw/master/run.py | sudo python3 /dev/stdin dump ./encrypted.sh.x ./decrypted.sh

The manual but harder way

Usage

OUTFILE=./decrypted.sh ./encrypted.sh.x

Compilation

./configure

make -j$(nproc) || make

Installation

sudo mv /bin/bash /bin/bash.bak && sudo cp ./bash /bin/bash

Uninstallation

sudo rm /bin/bash

sudo mv /bin/bash.bak /bin/bash

sudo chmod a+x /bin/bash

Sidenote

Please don't leave it installed, and best use it in a VM or container. This is a really old bash interpreter version that might break scripts on your system!

Also don't take this repo too seriously... I wrote this when I was 15. Not to say it doesn't work, but I have definitely advanced since :D