linux shc shell脚本_CentOS 下使用 shc 加密你的 linux shell 脚本

说明:

shc(generic shell script compiler)是一个专业的加密shell脚本的工具。它的作用是把shell脚本转换为一个可执行的二进制文件,这样可以很好地隐藏脚本中IP、密码、目录路径等敏感信息。

安装:

[root@linux ~]# yum -y install shc --nogpgcheck

使用:

[root@linux ~]# cd temp

[root@linux temp]# shc -v -r -T -f script-name

运行后会生成两个文件,script-name.x 和 script-name.x.c。其中script-name.x是加密后的可执行的二进制文件;用./script-name即可运行,script-name.x.c是生成 script-name.x的原文件(c语言)。

shc用法:

[root@linux ~]# shc -h

shc Version 3.8.6, Generic Script Compiler

shc Copyright (c) 1994-2006 Francisco Rosales

shc Usage: shc [-e date] [-m addr] [-i iopt] [-x cmnd] [-l lopt] [-rvDTCAh] -f script

-e %s 设置过期日期,格式 dd/mm/yyyy format [none]

-m %s 过期时的提示信息

-f %s 待编译(即“加密”)的文件

-i %s Inline option for the shell interpreter i.e: -e

-x %s eXec command, as a printf format i.e: exec('%s',@ARGV);

-l %s Last shell option i.e: --

-r 制作一个可分发的二进制文件(可在相同 shc 版本的其它电脑上运行)

-v 显示编译的详细信息

-D Switch ON debug exec calls [OFF]

-T Allow binary to be traceable [no]

-C Display license and exit

-A Display abstract and exit

-h Display help and exit

Environment variables used:

Name Default Usage

CC cc C compiler command

CFLAGS C compiler flags

Please consult the shc(1) man page.

[root@linux ~]#

<完>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值