发一个自己改的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
在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,就不公布了。
单纯设计一个加密算法很容易,但是商用起来,就得考虑方方面面,知易行难吧