腳本加密http://www.datsi.fi.upm.es/~frosal/sources/
阿新 • • 發佈:2017-09-19
github upm bit 系統 call nsh man 命令 readme
shc的官網下載地址: http://www.datsi.fi.upm.es/~frosal/sources/ 安裝: 復制代碼 代碼如下: tar xzvf shc-3.8.6.tgz cd shc-3.8.6 mkdir -p /usr/local/man/man1 這步是必須的,不然安裝過程中會報錯,shc將安裝命令到/usr/local/bin/目錄下; 將幫助文檔存放在/usr/local/man/man1/目錄下,如果系統中無此目錄,安裝時會報錯,可創建此目錄後再執行安裝. 安裝: make install 這是要回答yes或者y,不能直接回車,否則會報錯 使用方法: “-f”選項指定需要加密的程序 shc-r -f script-name 如下列子: [[email protected]666 ok]# ls test.sh [[email protected]666 ok]# shc -r -f test.sh [[email protected]666 ok]# ls test.sh test.sh.x test.sh.x.c #test.sh原始的shell腳本 #test.sh.x是加密後的可執行文件 #test.sh.x.c是生成test.sh.x的原文件(c語言) #test.sh.x,這個就是我要想要的文件 [[email protected]666 ok]# mkdir test [[email protected]666 ok]# mv test.sh.x test/test_kzxjb [[email protected]666 ok]# ./test/test_kzxjb nb!!!! #可見這達到了我們的效果(保護了shell中的密秘) #看一下文件的屬性: [[email protected]666 ok]# file test/test_kzxjb test/test_kzxjb: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), forGNU/Linux 2.6.32, BuildID[sha1]=36910307ed83f8d2fb591312d090aa680e5ad7cb, stripped 當然有加密就有解密: https://github.com/yanncam/UnSHc # tree UnSHc-master UnSHc-master ├── latest │ └── unshc.sh ├── README.md ├── release │ ├── 0.2 │ │ ├── unshc-v0.2b.sh │ │ └── unshc-v0.2.sh │ ├── 0.3 │ │ └── unshc-v0.3.sh │ ├── 0.4 │ │ └── unshc-v0.4.sh │ ├── 0.5 │ │ └── unshc-v0.5.sh │ ├── 0.6 │ │ └── unshc-v0.6.sh │ ├── 0.7 │ │ └── unshc-v0.7.sh │ └── 0.8 │ └── unshc-v0.8.sh └── sample ├── test.sh ├── test.sh.x └── test.sh.x.c 10 directories, 13 files ./UnSHc-master/latest/unshc.sh shc_加密過的文件 會生成: shc_加密過的文件 和解密後的文件 shc_加密過的文件.sh
腳本加密http://www.datsi.fi.upm.es/~frosal/sources/