优化python脚本加密

This commit is contained in:
aixiao 2023-02-14 17:16:17 +08:00
parent 15aba655f0
commit abf85e1cbd
2 changed files with 32 additions and 15 deletions

View File

@ -1,4 +1,5 @@
# sha
Shell Stript AES加密工具
理论支持所有解析类脚本语言加密
测试通过的脚本:
@ -6,7 +7,8 @@
bash
python3
# Build
## Build
git clone https://git.aixiao.me/aixiao/sha
cd sha
make
@ -14,7 +16,8 @@
make uninstall
# Help Information
## Help Information
SHA
Shell Strict AES 128 bit encryption tool
AUTHOR: AIXIAO@AIXIAO.ME
@ -29,4 +32,3 @@
动态链接:
sha -k aixiao.me -f test.sh

19
sha.c
View File

@ -689,19 +689,34 @@ char *source_c[] = {
" }",
" //printf(\"%s\\n\", shbin);",
"",
" if (strstr(shbin, \"python\") != NULL) {",
" argvs[0] = argv[0];",
" argvs[1] = \"-c\";",
" argvs[2] = (char *)Hex_string;",
" //argvs[3] = argv[0];",
" for(i=3; i<=argc-1+3; i++)",
" {",
" argvs[i] = argv[l];",
" l++;",
" }",
" execvp(shbin, argvs);",
" }",
" else",
" {",
" argvs[0] = argv[0];",
" argvs[1] = \"-c\";",
" argvs[2] = (char *)Hex_string;",
" argvs[3] = argv[0];",
"",
" for(i=4; i<=argc-1+4; i++)",
" {",
" argvs[i] = argv[l];",
" l++;",
" }",
"",
" execvp(shbin, argvs);",
" }",
"",
"",
"EXIT:",