Files
Linux/Shell/Shell脚本加密Shc.md
offends cee91802b3
Some checks failed
continuous-integration/drone Build is failing
synchronization
2025-08-25 15:57:40 +08:00

1.2 KiB

本文作者:丁辉

官方下载地址

Shell脚本加密Shc

Shc源码部署

  1. 下载

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

    tar -zxvf shc-*.tgz && cd shc-*
    
  3. 安装 gcc 和 make 后编译

    make && mv shc /usr/local/bin/
    

Shc网络源部署

  • Centos安装

    yum -y install shc
    
  • Ubuntu安装

    apt -y install shc
    

shc参数

参数 解释 使用示例
-e 指定过期时间 shc -e 06/09/2023 -f demo.sh
-m 过期后打印出的信息 shc -e 06/09/2023 -m "File is expired" -f demo.sh
-v 输出verbose 过程信息 shc -v -f demo.sh
-r 可在相同操作系统的不同主机上执行 shc -r demo.sh
-f 指定源shell shc -f demo.sh