zoukankan      html  css  js  c++  java
  • Linux之Shell 脚本加密工具-shc

    Much effort, much prosperity.

    为什么要加密Shell脚本呢?当然是为了安全!

    可能脚本里面涉及到密码之类的就需要进行加密了

    一、下载安装shc工具

    要保护自己编写的shell脚本程序,方法有很多,最简单的方法有两种:1、加密 2、设定过期时间,下面以shc工具为例说明:

    shc是一个加密shell脚本的工具.它的作用是把shell脚本转换为一个可执行的二进制文件.

    [root@localhost ~]# wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.7.tgz
    [root@localhost ~]# tar xf shc-3.8.7.tgz
    [root@localhost ~]# cd shc-3.8.7
    [root@localhost shc-3.8.7]# mkdir /usr/local/shc
    [root@localhost shc-3.8.7]# make test
    [root@localhost shc-3.8.7]# make
    [root@localhost shc-3.8.7]# make test
    [root@localhost shc-3.8.7]# make strings
    [root@localhost shc-3.8.7]# make install    #这步需要有root权限

    进行加密

    [root@localhost test]# ls
    script.sh
    [root@localhost test]# cat script.sh
    #!/bin/bash
    echo "123123"
    echo "123123"
    echo "123123"
    echo "123123"
    echo "123123"
    echo "123123"
    echo "123123"
    [root@localhost test]# shc -r -f script.sh
    [root@localhost test]# ls
    script.sh  script.sh.x  script.sh.x.c
    [root@localhost test]# ./script.sh.x
    [root@localhost test]# ./script.sh.x
    123123
    123123
    123123
    ·····
  • 相关阅读:
    android broadcast小结
    初学设计模式【7】单例模式——sington
    android之Service总结
    现代软件开发实现六面体
    牛顿迭代法求根
    实现顺序表的各种基本运算
    公共的分页类,包含jsp页面
    多项式拟合+高斯消元解方程组
    差商表及牛顿插值
    C#.NET 获取拨号连接 宽带连接
  • 原文地址:https://www.cnblogs.com/chuyiwang/p/8342882.html
Copyright © 2011-2022 走看看