码迷,mamicode.com
首页 > Windows程序 > 详细

windows端加密程序,lua代码,ZeroBrane调试

时间:2015-04-09 00:59:55      阅读:433      评论:0      收藏:0      [点我收藏+]

标签:

发一个自己改的zerobrane版本(启动中文,快捷键改成和一样:F5启动调试,F9断点,F10逐过程,F11逐语句,F12跳出函数)

在zerobrane 1.0(2015.3.13)发布的基础上改的

(1) 加密重要资源,完全用批处理编写:

@echo off

set openssl_exe=C:\GitStack\git\bin\openssl.exe
set lua_exe=bin\lua.exe
echo 说明:需要预装MinGW和gow-0.7.0

if not exist "%openssl_exe%" (
  echo "没有找到openssl"
  goto error_end
)

if not exist "%lua_exe%" (
  echo "没有找到lua"
  goto error_end
)

set /p input_filename=请输入要加密的文件名:

if not exist "%input_filename%" (
  echo "没有找到输入的文件名"
  goto error_end
)

echo 开始加密,请稍等
del /f /q %input_filename%.out.txt
openssl enc -e -aes-128-cbc  -pass pass:testpassword  -in %input_filename%  -out %input_filename%.aes
echo ENCRYPT_AES:  > %input_filename%.out.txt1
openssl base64 -in %input_filename%.aes -out %input_filename%.out.txt2
cat %input_filename%.out.txt1 >  %input_filename%.out.txt
cat %input_filename%.out.txt2 >> %input_filename%.out.txt
del /f /q %input_filename%.aes
del /f /q %input_filename%.out.txt1
del /f /q %input_filename%.out.txt2

echo 加密完成,文件内容:
cat %input_filename%.out.txt
goto all_end

:error_end
echo 加密失败,please debug the f**k script
:all_end
pause

运行截图:  

技术分享

 

 

(2)棋谱加密,用lua脚本编写,包括遍历文件夹和加密算法

算法设计的强度很低,公钥和私钥相同,文件熵值增加为0,就不公布了。

单纯设计一个加密算法很容易,但是商用起来,就得考虑方方面面,知易行难吧

 

windows端加密程序,lua代码,ZeroBrane调试

标签:

原文地址:http://www.cnblogs.com/wjx0912/p/4405521.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!