Convert a shell script into an executable binary
Convert a shell script into an executable binary This article will help you to create binary file of your shell script, so no one can see the source code of your script and we can use them as a command. To create binary file from a script we use SHC compiler written by Francisco Javier Rosales GarcĂa . Shell Script Compiler (SHC) 1. Download shc and install it $ 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 2. Verify that shc is installed properly. $ ./shc -v shc parse ( -f ) : No source file specified shc Usage: shc [ -e date ] [ -m addr ] [ -i iopt ] [ -x cmnd ] [ -l lopt ] [ -rvDTCAh ] -f script 3. Create a Sample Shell Script $ vi test.sh #!/bin/bash need to put at the beginning of a script file. #!/bin/bash echo -n "Test" 4. Create Binary of Script $ ./shc -T -f test.sh -T : this will allow the created binary files to be traceable using programs like strace...