当前位置:网站首页 > 技术博客 > 正文

shell aes256加密



Shell script compiler (shc)

apt install shc 
yum -y install shc 
wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.7.tgz tar xvfz shc-3.8.7.tgz && cd shc-3.8.7 make 
evan@myxps:~/tmp/shc$ cat a.sh #!/bin/bash ls /tmp shc -r -f a.sh 注意 脚本一定要有 解释器 不然会说 shc: invalid first line in script 加密后不能再用bash file ,因为已是bina了 -f 指定要解密的文件,-r 指定一种安全的加密方式。之后,生成两个文件update.sh.x和update.sh.x.c,前者是动态链接的二进制可执行文件,后者相应的是C程序。这儿便产生了一个问题:因为动态链接属性,前者update.sh.x运行时需要对应的库的链接的 支持,也就是说,目标运行环境也需要安装shc或者安装shc的库,这无疑很是麻烦,应用起来不方便 另shc还提供了一种设定有效执行期限的方法,过期时间,如: # shc -e 28/01/2012 -m "过期了" -f abc.sh 生成静态链接的二进制可执行文件 CFLAGs=-static shc -r -f a.sh 另shc还提供了一种设定有效执行期限的方法,过期时间,如: # shc -e 28/01/2012 -m "过期了" -f abc.sh 选项“-e”指定过期时间,格式为“日/月/年”;选项“-m”指定过期后执行此shell程序的提示信息。 如果在过期后执行,则会有如下提示: # https://wiki.linuxchina.net/index.php/abc.sh.x https://wiki.linuxchina.net/index.php/abc.sh.x: has expired! 过期了 

版权声明


相关文章:

  • mysql内置函数应用2025-07-02 18:30:05
  • 安卓自定义seekbar2025-07-02 18:30:05
  • 迭代器iterator三个方法2025-07-02 18:30:05
  • 火鸟字幕官网2025-07-02 18:30:05
  • linux curses2025-07-02 18:30:05
  • 广州达测科技有限公司2025-07-02 18:30:05
  • linux系统中文件权限管理2025-07-02 18:30:05
  • 安卓xposed插件大全2025-07-02 18:30:05
  • js es6 symbol2025-07-02 18:30:05
  • spring boot增删改查项目2025-07-02 18:30:05