Linux 脚本加密解密工具
1、系统自带工具gzexe
加密方法:
# gzexe test.sh
此时在目录下就会产生一个test.sh~文件,该文件是源文件,test.sh是加密后的文件
解密方法:
# gzexe -d test.sh
在目录下就会产生一个test.sh~文件,该文件是源文件,test.sh是解密后的文件
2、shc加密软件,unshc来解密软件
# wget https://www.datsi.fi.upm.es/%7Efrosal/sources/shc-3.8.9.tgz
# tar vxf shc-3.8.9.tgz
# cd shc-3.8.9
# ./shc --help
-e date (指定过期日期)
-m message (指定过期提示的信息)
-f script_name(指定要编译的shell的路径及文件名)
-r Relax security. (可以相同操作系统的不同系统中执行)
-v Verbose compilation(编译的详细情况)
加密操作:
# shc -v -f test.sh
test.sh.x为加密后的二进制文件,test.sh.x.c是源文件,可删除
过期加密法:
# shc -e 14/09/2016 -m -f test.sh
解密方法:(https://github.com/yanncam/UnSHc/)
# ./unshc.sh script.sh.x -o script_done.sh
script.sh.x文件为经过加密的二进制文件 script_done.sh文件为解密后shell脚本