+
95
-

linux如何加密sh脚本,输入密码才能运行?

linux如何加密sh脚本,输入密码才能运行?


网友回复

+
15
-

首先你要在你的系统上安装shc,可以根据你的Linux发行版的包管理器来安装。例如在Debian 或者Ubuntu上,可以使用以下命令来安装:

sudo apt install shc

yum install shc

800_auto

创建一个简单的Shell脚本,例如名为script.sh,代码内容如下:

    #!/bin/bash
    read -sp "Enter Password: " pass
    if [ "$pass" == "pass...

点击查看剩余70%

我知道答案,我要回答