使用`shc`命令可以增强shell脚本的安全性和保护脚本的机密信息。 Linux中的shc命令是一个Shell脚本编译器,它用于将bash脚本或Shell脚本编译成可执行的二进制文件。这样的话,其他用户将无法轻易地查看和修改原始脚本的内容。 shc命令的安装和使用相对简单。以下是在Linux系统上使用shc命令的方法和操作流程。 ## 1. 安...
参数说明:无参数:默认情况下,gzexe命令会使用gzip算法对shell脚本进行压缩,并创建一个自解压缩的脚本副本。-d:解压缩gzexe压缩过的脚本,将脚本恢复为原始的文本文件。用法:压缩脚本:gzexe script.sh。解压缩脚本:gzexe -d script.sh.gz。shc命令参数说明和用法:参数说明:-e:指定加密后的可执行文件的输出...
linux shell命令之用shc对脚本进行加密 安装shc sudo apt install shc shc -v -f color_script.sh shc shll=bash shc [-i]=-c shc [-x]=exec '%s' "$@" shc [-l]= shc opts= shc: cc color_script.sh.x.c -o color_script.sh.x shc: strip color_script.sh.x shc: chmod go-r color_...
yum -y install gcc shc 1. 创建测试脚本 cat test.sh #!/bin/sh echo "Welcome to linux world" chmod +x test.sh 1. 2. 3. 4. 使用SHC加密脚本文件 [root@node1 ~]# shc -v -f test.sh shc shll=sh shc [-i]=-c shc [-x]=exec '%s' "$@" shc [-l]= shc opts= shc: cc t...
1. 使用shc命令加密脚本文件: shc是一个shell脚本编译器,可以将Shell脚本编译成可执行的二进制文件。使用shc命令加密脚本文件的操作流程如下: 步骤1:安装shc “` sudo apt-get install shc “` 步骤2:编译脚本 “` shc -f your_script.sh “` 这将生成一个名为your_script.sh.x的加密的可执行文件。
运行上述命令后,shc会生成两个文件:script.sh.x(加密后的可执行程序)和script.sh.x.c(相应的 C 源代码文件)。你可以检查script.sh.x文件以确认它是一个静态链接的可执行文件: filescript.sh.x 1. 输出应该显示该文件是静态链接的。 运行加密的脚本: ...
1、安装编译软件,编译后生成shc文件就是命令程序 yum install glibc-devel gcc c++ -y cd /usr/src wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9.tgz tar xzf shc-3.8.9.tgz cd shc-3.8.9/ make 查看帮助手册 [root@localhost shc-3.8.9]# ./shc -help ...
shc Generic shell script compiler. https://www.linux-man.cn/command/shc/ #Compile a shell script: shc -f {{script}} #Compile a shell script and specif
今天在LInux了接触到一个命令:“shc”,以前还真没遇到过,这个也不是内置的 ,不过挺有意思的 记录一下 这个是一个专门给shell脚本进行二进制加密的一个小程序,安装的话 直接 代码语言:javascript 复制 yum install shc 当然也可以源码安装 https://github.com/neurobin/shc ...