shell脚本加密工具shc

安装与使用

下载shc:

wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9.tgz

解压&安装:

tar -zxf shc-3.8.9.tgz
make&&make install

发现报错:XXX/usr/local/man/manl/ is not a directory: No such file or directory
那么我们手动创建即可:mkdir -p /usr/local/man/man1/
再运行make&&make install即可

常用命令:
常用参数:
-e date (指定过期日期)例:shc -e 01/01/2020
-m message (指定过期提示的信息)
-f script_name(指定要编译的shell的路径及文件名)
-r Relax security. (可以相同操作系统的不同系统中执行)
-v Verbose compilation(编译的详细情况)

使用例子:
加密test.sh,使用shc -f test.sh,会生成test.sh.c的源文件和test.sh.x的加密文件(可以改名为test.sh,不影响)
注:如果想要跨主机执行加密后的脚本必须要指定r参数,如shc -rf test.sh
注:添加过期时间时,可以在脚本中添加自动更新系统时间的命令

参考

本博文参考:http://www.zhanghaobk.com/archives/shell-jiao-ben-jia-mi-gong-ju-shc

作者:
除特别声明为原创博文外,均可转载,也欢迎转载,未经作者同意必须在文章页面给出原文链接,否则保留追究法律责任的权利,谢谢您的配合。
原文地址:https://www.cnblogs.com/sillage/p/14907357.html