
hello.sh 脚本内容 #!/bin/bash echo "hello" ./hello.sh hello 运行 shc 并生成 hello.sh.x 和 hello.sh.x.c
shc -v -f hello.sh shc shll=bash shc [-i]=-c shc [-x]=exec '%s' "$@" shc [-l]= shc opts= shc: cc hello.sh.x.c -o hello.sh.x shc: strip hello.sh.x shc: chmod go-r hello.sh.x file hello.sh.x hello.sh.x: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=f0a0b69bf0de61bd28c34fe9d4a5c0655321bdaa, stripped file hello.sh.x.c hello.sh.x.c: C source, ASCII text 运行 hello.sh.x,然后就卡住,没反应,只能按 ctrl+c 取消
运行 hello.sh.x 卡住时,在另一个终端运行 ps -efww | grep hello.sh.x
./hello.sh.x -c exec './hello.sh.x' "$@" ./hello.sh.x 请问这是什么问题?网上看教程都是直接"shc -f 脚本名" 就可以,我自己试就不行。
1 aloxaf 2020-11-24 10:33:51 +08:00 看了下, 这玩意儿最终还是把代码送给 bash 执行的。那这种所谓的加密就没有任何意义…… 建议不要在没有意义的事情上浪费时间 |
2 0zero0 2020-11-26 10:37:45 +08:00 哈哈,只是起到了一个障眼法的作用 |