shc

时间:2023-11-17 08:57:56

A tool  for encrytion of bash shell scripts .

Install:

wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9.tgz
.tgz
cd shc-
mkdir -p /usr/local/man/man1/       #this is necessary.
make install

create one bash script, content follows:

#!/bin/bash
echo "hello ITDHZ.COM"

Testing it:

shell > shc -r -f -T .sh    # '-T' used for outputing information, created by echo commd.
shell > ls
...sh.x.c

As you see, two new file were created, 'XX.x' is the executable file, and the 'XX.x.c' is the C source file.

by the way , you cann't run the executable file by using like this: '/bin/bash xx.x' ,  './xx.x' is the only right way.

shell > ./.sh.x

Besides, you can also set the expiration time and expiration description for the binary file, as follows:

shell > shc -r -T -e .sh
shell > ./.sh.x
./.sh.x: has expired!
this file is expiration date.