码迷,mamicode.com
首页 > 其他好文 > 详细

shc

时间:2016-12-29 16:40:42      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:out   bin   can   hello   create   time   sid   exp   ted   

A tool  for encrytion of bash shell scripts .

Install:

wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9.tgz
tar zxvf shc-3.8.9.tgz
cd shc-3.8.9
mkdir -p /usr/local/man/man1/       #this is necessary.
make install

create one bash script, content follows:

#!/bin/bash
echo "hello ITDHZ.COM"

Testing it:

shell > shc -r -f -T 123.sh    # ‘-T‘ used for outputing information, created by echo commd.
shell > ls
123.sh  123.sh.x  123.sh.x.c

As you see, two new file were created, ‘XX.x‘ is the executable file, and the ‘XX.x.c‘ is the C source file. 

by the way , you cann‘t run the executable file by using like this: ‘/bin/bash xx.x‘ ,  ‘./xx.x‘ is the only right way.

shell > ./123.sh.x

Besides, you can also set the expiration time and expiration description for the binary file, as follows:

shell > shc -r -T -e "31/10/2004" -m "this file is expiration date." -f 123.sh
shell > ./123.sh.x
./123.sh.x: has expired!
this file is expiration date.

 

shc

标签:out   bin   can   hello   create   time   sid   exp   ted   

原文地址:http://www.cnblogs.com/lydygly/p/6233372.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!