免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3364 | 回复: 4
打印 上一主题 下一主题

shell脚本用shc加密问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-03-23 09:58 |只看该作者 |倒序浏览
本帖最后由 南非蜘蛛 于 2011-03-23 10:09 编辑

我把一个软件base加密后放到shell里,shell现在大小有317KB多了
我还想加密这个shell,但是
[@root]# ./shc -r -f a.sh
shc: WARNING!!
   Scripts of length near to (or higher than) the current System limit on
   "maximum size of arguments to EXEC", could comprise its binary execution.
   In the current System the call sysconf(_SC_ARG_MAX) returns 131072 bytes
   and your script "a.sh" is 323569 bytes length.
好像超出系统arg max的限制了,还有什么好的方法对大于131072byte的shell脚本加密吗?

论坛徽章:
0
2 [报告]
发表于 2011-03-23 10:00 |只看该作者
unlimit -a 一下就知道了...

论坛徽章:
0
3 [报告]
发表于 2011-03-23 10:06 |只看该作者
unlimit -a 一下就知道了...
南极雨 发表于 2011-03-23 10:00



ulimit好像不管这个吧?arg_max是系统的硬限制
The kernel's exec() function has NCARGS as the hard-coded limit on the number of bytes of argument buffer to use, and NCARGS is #defined to be ARG_MAX, so you won't be able to change this without (at least) recompiling the kernel. I suspect that changing this value may also affect the libraries and startup code for user-mode applications, but I haven't checked that code to be sure.

论坛徽章:
0
4 [报告]
发表于 2011-03-23 17:04 |只看该作者
用openssl

论坛徽章:
0
5 [报告]
发表于 2011-03-25 19:08 |只看该作者
回复 3# 南非蜘蛛


    那你试试 openssl 看看行不行吧?
openssl des3 -in <file> -out <file>
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP