Skip to content

Instantly share code, notes, and snippets.

@nalingarg2
Last active August 29, 2015 14:20
Show Gist options
  • Save nalingarg2/4ed98d98e6481c5fc165 to your computer and use it in GitHub Desktop.
Save nalingarg2/4ed98d98e6481c5fc165 to your computer and use it in GitHub Desktop.
shell script to binary
yum install -y make
yum install gcc gcc-c++ kernel-devel
wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.7.tgz OR wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9.tgz
tar xvfz shc-3.8.7.tgz
cd shc-3.8.7
make
#Test
./shc -v
./shc -f random.sh
or
./shc -v -r -T -f random.sh
1. random.sh is the original unencrypted shell script
2. random.sh.x is the encrypted shell script in binary format
3. random.sh.x.c is the C source code of the random.sh file. This C source code is compiled to create the above encrypted random.sh.x file. The whole logic behind the shc is to convert the random.sh shell script to random.sh.x.c C program (and of course compile that to generate the random.sh.x executable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment