Board logo

标题: [文本处理] Hope EasyCommand EasyDeCode 批处理解密器 [打印本页]

作者: HOPE2021    时间: 2021-10-15 19:23     标题: Hope EasyCommand EasyDeCode 批处理解密器

____更新日志______________________________________
    版本 1.0.0000 2021/10/15 本楼

代码
  1. @Echo Off
  2. Cls
  3. Mode Con: Cols=120 Lines=16384
  4. Color 0F
  5. Title Hope(R) Office EasyCommand EasyDeCode
  6. Chcp 936 > Nul
  7. Rem Hope(R) Office EasyCommand EasyDeCode
  8. Echo.
  9. Call :Type "  "
  10. Call :Type "#" 116
  11. Echo.
  12. Call :Type " " 55
  13. Call :Type "EasyDeCode"
  14. Echo.
  15. Call :Type "  "
  16. Call :Type "#" 116
  17. Echo.
  18. Echo.
  19. Echo.  ^>^> Hope(R) Office EasyCommand EasyDeCode [Version 1.0.0000]
  20. Echo.  ^>^> (C) Copyright 2016-2021 Hope Corp.
  21. Echo.  ^>^> (C) Copyright 2020-2021 Hope2021 ^& Cmd1152 Corp.
  22. If "%~1"=="" (
  23. Set FileNum=1
  24. ) Else (
  25. Set FileNum=2
  26. )
  27. Md "%UserProFile%\Desktop" >Nul 2>Nul
  28. Set "Pro=%0"
  29. Set "lnk=Hope(R) Office EasyCommand EasyDeCode [Version 1.0.0000]"
  30. Set "Pro=%Pro:"=%"
  31. Mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\Hope Office EasyCommand EasyDeCode [Version 1.0.0000].lnk""):b.TargetPath=""%Pro%"":b.WorkingDirectory=""%~dp0"":b.Save:close") >Nul 2>Nul
  32. @Goto :Main
  33. :Main
  34. Echo.
  35. Set "FileName=///*无此文件*///"
  36. If "%FileNum%"=="1" (
  37. Set /P FileName=#  ^>^> 请将需要解密的文件拖动至此窗体:
  38. ) Else (
  39. Set /P FileName=#  ^>^> 请将需要解密的文件拖动至此窗体:%~1<Nul
  40. Echo.
  41. Set FileName=%~1
  42. Set FileNum=1
  43. )
  44. Set "FileName=%FileName:"=%"
  45. For /F %%I in ('Dir /b') Do (
  46. If "%%I"=="%FileName%" (
  47. Set "FileName=%Cd%\%FileName%"
  48. )
  49. )
  50. Set FileName="%FileName%"
  51. If Not Exist %FileName% (
  52. Echo.
  53. Echo.  ^>^> 无此文件!无法解密...
  54. @Goto :Main
  55. )
  56. Set FilenameExtension=%FileName:~-5%
  57. Set FilenameExtension=%FilenameExtension:~0,4%
  58. For /L %%i in (1,1,2048) Do (
  59. If Not Exist "File-%%i\" (
  60. Md "File-%%i\" >Nul 2>Nul
  61. Set DeCodeDir=File-%%i\
  62. Set Num=%%i
  63. @Goto :DeCode
  64. )
  65. )
  66. Echo.
  67. Echo.  ^>^> 可分配的内存已经占满,无法解密...
  68. @Goto :Main
  69. :DeCode
  70. Set "Choice="
  71. If /I Not "%FilenameExtension%"==".Bat" (
  72. If /I Not "%FilenameExtension%"==".Cmd" (
  73. @Goto :Choice
  74. )
  75. )
  76. For /L %%i in (1,1,47) Do Call :RepeatBS
  77. Echo.
  78. Call :Type "  "
  79. Call :Type "+"
  80. Call :Type "=" 4
  81. Call :Type "正在解密"
  82. Call :Type "=" 4
  83. Call :Type "+"
  84. Call :Type "=" 98
  85. Echo.
  86. Echo.
  87. Echo.  开始解密时间: %Time%
  88. Echo.
  89. Echo.  文件名: %FileName%
  90. Echo.
  91. Cd %DeCodeDir%
  92. Copy %FileName% "%cd%\File.Bat" > Nul
  93. For /F %%i in ('dir /b File.Bat') do (
  94. For /L %%j in (0,1,%%~zi) do (
  95. Set /P Bytes[FileName]=%Bs%  文件大小: %%j Byte[s]<Nul
  96. )
  97. )
  98. Echo.
  99. > File2.Bat Echo.@Echo Off & Rem 由 Hope Studio 提供技术支持
  100. For /F "tokens=*" %%i in (File.Bat) do (
  101. >> "File2.Bat" Echo.%%i
  102. )
  103. More File2.Bat +3 > DeCode.Bat
  104. Echo.
  105. Echo.  解密后的文件: "%Cd%\DeCode.Bat"
  106. Echo.
  107. If Exist "File.Bat" Del "File.Bat"
  108. If Exist "File2.Bat" Del "File2.Bat"
  109. For /F %%i in ('dir /b DeCode.Bat') do (
  110. For /L %%j in (0,1,%%~zi) do (
  111. Set /P Bytes[FileName]=%Bs%  解密后的大小: %%j Byte[s]<Nul
  112. )
  113. )
  114. Echo.
  115. Echo.
  116. Echo.  解密结束时间: %Time%
  117. Echo.
  118. Call :Type "  "
  119. Call :Type "+"
  120. Call :Type "=" 4
  121. Call :Type "=" 8
  122. Call :Type "=" 4
  123. Call :Type "+"
  124. Call :Type "=" 98
  125. Echo.
  126. Mshta VBScript:msgbox("解密%FileName:~1,-1%文件成功",64,"Hope(R) Office EasyCommand EasyDeCode [Version 1.0.0000]")(window.close)
  127. Start Explorer "%Cd%"
  128. Start "" "Notepad" "DeCode.Bat"
  129. Echo.
  130. Echo.  ^>^> 解密完毕,是否要调试?[Y/N][输入完毕后请按下回车]
  131. Echo.
  132. Set /p "Choice=#  ^>^> "
  133. Echo.
  134. Call :Type "  "
  135. Call :Type "+"
  136. Call :Type "=" 4
  137. Call :Type "=" 8
  138. Call :Type "=" 4
  139. Call :Type "+"
  140. Call :Type "=" 98
  141. Echo.
  142. If /I Not "%Choice%"=="Y" (
  143. Cd..
  144. @Goto :Main
  145. )
  146. Start "" "DeCode.Bat"
  147. Echo.
  148. Call :Type "  "
  149. Call :Type "_" 116
  150. Echo.
  151. Call :Type "  "
  152. Call :Type "_" 4
  153. Call :Type "Code"
  154. Call :Type "_" 108
  155. Echo.
  156. Echo.
  157. More "DeCode.Bat"
  158. Echo.
  159. Call :Type "  "
  160. Call :Type "_" 116
  161. Echo.
  162. Echo.
  163. Cd..
  164. @Goto :Main
  165. :RepeatBS
  166. Set "Bs=%Bs%"
  167. @Goto :Eof
  168. :Type <Text> [Num]
  169. %=Company {Hope Studio}=%
  170. %=Author  {Hope Studio}=%
  171. If '%2'=='' (
  172. Set /p Text=#%~1<Nul
  173. @Goto :Eof
  174. )
  175. If Not '%2'=='' (
  176. For /l %%I in (1,1,%2) Do (
  177. Set /p Text=#%~1<Nul
  178. )
  179. )
  180. @Goto :Eof
  181. :Choice
  182. Echo.
  183. Echo.  ^>^> 此文件不是批处理文件,是否要解密?[Y/N][输入完毕后请按下回车]
  184. Echo.
  185. Set /p "Choice=#  ^>^> "
  186. If /I Not "%Choice%"=="Y" (
  187. @Goto :Main
  188. )
  189. Set "FilenameExtension=.Bat"
  190. @Goto :DeCode
复制代码
By Hope2021
谢谢.
作者: cmd1152    时间: 2021-10-15 20:55

为什么你不做一个不可逆的加密器
作者: HOPE2021    时间: 2021-10-15 21:17

回复 2# cmd1152
以我的技术,在短时间内不可能.
作者: cmd1152    时间: 2021-10-15 21:54

回复 3# HOPE2021


    利用VB的自编译功能生成文件
作者: cmd1152    时间: 2021-10-16 11:13

[批处理之家专享]VB实现不可逆加密Bat文件 - [阅读权限 6]




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2