A goal is a dream with a deadline. Much effort, Much prosperity.
Why Encrypt shell scripts? Of course it's for security!
Maybe the script involves a password or something, and it needs to be encrypted.
I. Download and install the SHC tool
To protect your own shell scripting program, there are many methods, the simplest way there are two: 1, encryption 2, set the expiration time, following the SHC tool as an example description:
SHC is a tool for encrypting shell scripts. Its role is to convert the shell script into an executable binary file.
[[email protected] ~]# wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.7.tgz[[email protected] ~]# tar XF Shc-3.8.7.tgz[[email protected] ~]# CD Shc-3.8.7[[email protected] shc-3.8.7]# Mkdir/usr/local/shc[[email protected] shc-3.8.7]# make Test[[email protected] shc-3.8.7]# Make[[email protected] shc-3.8.7]# make Test[[email protected] shc-3. 8.7]# make Strings[[email protected] shc-3.8.7]# make install #这步需要有root权限
To encrypt
[Email protected] test]# Lsscript.sh[[email protected] test]# cat Script.sh#!/bin/bashecho "123123" echo "123123" echo " 123123 "echo" 123123 "echo" 123123 "echo" 123123 "echo" 123123 "[[email protected] test]# shc-r-F script.sh[[email protected ] test]# lsscript.sh script.sh.x script.sh.x.c[[email protected] test]#./script.sh.x[[email protected] test] #./script.sh.x123123123123123123
·····
Shell Scripting Encryption