[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
本帖最后由 cmd1152 于 2021-10-10 13:52 编辑

1.0.0003
修复窗口太小
优化快捷方式和Debug
  1. @set "DeBug=1" %   0代表关闭DeBug,1代表打开DeBug   %
  2. @%Cmd1152提供代码优化和Debug%
  3. @Echo Off
  4.         set Version=1.0.0003
  5. Cls
  6. call :msg "设置窗口大小"
  7. Mode Con: Cols=120 Lines=68800
  8. call :msg "设置颜色"
  9. Color 0F
  10. call :msg "设置标题"
  11. Title Hope(R) Office EasyCommand EasyEnCode
  12. call :msg "设置编码"
  13. Chcp 936 > Nul
  14. Rem Hope(R) Office EasyCommand EasyEnCode
  15. Echo.
  16. call :msg "绘图"
  17. Call :Type "  "
  18. Call :Type "#" 116
  19. Echo.
  20. Call :Type " " 55
  21. Call :Type "EasyEnCode"
  22. Echo.
  23. Call :Type "  "
  24. Call :Type "#" 116
  25. Echo.
  26. call :msg "版权声明"
  27. Echo.
  28. Echo.  ^>^> Hope(R) Office EasyCommand EasyEnCode [Version %Version%]
  29. Echo.  ^>^> (C) Copyright 2016-2021 Hope ^& Cms1152 Corp.
  30. If "%~1"=="" (
  31. Set FileNum=1
  32. call :msg "没有调用参数"
  33. ) Else (
  34. Set FileNum=2
  35. call :msg "有参数"
  36. )
  37. call :msg "创建文件夹"
  38. Md "%UserProFile%\Desktop" >Nul 2>Nul
  39. Md "%UserProFile%\桌面" >Nul 2>Nul
  40.     call :msg "set"
  41. Set "Pro=%0"
  42. Set "lnk=Hope(R) Office EasyCommand EasyEnCode [Version %Version%]"
  43. Set "Pro=%Pro:"=%"
  44. call :msg "创建快捷方式"
  45. Mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\Hope Office EasyCommand EasyEnCode [Version %Version%].lnk""):b.TargetPath=""%Pro%"":b.WorkingDirectory=""%~dp0"":b.Save:close") >Nul 2>Nul
  46. @Goto :Main
  47. :Main
  48. Echo.
  49. Set "FileName=///*无此文件*///"
  50. If "%FileNum%"=="1" (
  51. call :msg "输入"
  52. Set /P FileName=#  ^>^> 请将需要加密的文件拖动至此窗体:
  53. ) Else (
  54.     call :msg "参数显示"
  55. Set /P FileName=#  ^>^> 请将需要加密的文件拖动至此窗体:%~1<Nul
  56. Echo.
  57. Set FileName=%~1
  58. Set FileNum=1
  59. )
  60.     call :msg "set"
  61. Set "FileName=%FileName:"=%"
  62. For /F %%I in ('Dir /b') Do (
  63. If "%%I"=="%FileName%" (
  64. Set "FileName=%Cd%\%FileName%"
  65. )
  66. )
  67. Set FileName="%FileName%"
  68. If Not Exist %FileName% (
  69. call :msg "返回:加密错误:找不到文件"
  70. Echo.
  71. Echo.  ^>^> 无此文件!无法加密...
  72. @Goto :Main
  73. )
  74. Set FilenameExtension=%FileName:~-5%
  75. Set FilenameExtension=%FilenameExtension:~0,4%
  76. For /L %%i in (1,1,2048) Do (
  77. If Not Exist "File-%%i\" (
  78. Md "File-%%i\" >Nul 2>Nul
  79. Set EnCodeDir=File-%%i\
  80. Set Num=%%i
  81. @Goto :EnCode
  82. )
  83. )
  84.     call :msg "加密失败:内存错误:文件夹超过2048"
  85. Echo.
  86. Echo.  ^>^> 可分配的内存已经占满,无法加密...
  87. @Goto :Main
  88. :EnCode
  89. Set "Choice="
  90. call :msg "文件判断"
  91. If /I Not "%FilenameExtension%"==".Bat" (
  92. call :msg "不是bat文件"
  93. If /I Not "%FilenameExtension%"==".Cmd" (
  94. call :msg "不是批处理文件"
  95. @Goto :Choice
  96. )
  97. )
  98.     call :msg "for 17"
  99. For /L %%i in (1,1,47) Do Call :RepeatBS
  100. Echo.
  101. call :msg "绘图"
  102. Call :Type "  "
  103. Call :Type "+"
  104. Call :Type "=" 4
  105. Call :Type "正在加密"
  106. Call :Type "=" 4
  107. Call :Type "+"
  108. Call :Type "=" 98
  109. Echo.
  110. Echo.
  111. Echo.  文件名: %FileName%
  112. Echo.
  113.     call :msg "正在加密..."
  114. Cd %EnCodeDir%
  115. Copy %FileName% "%cd%\File.Bat" > Nul
  116. For /F %%i in ('dir /b File.Bat') do (
  117. For /L %%j in (1,1,%%~zi) do (
  118.     call :msg for返回%%j,最后会返回%%~zi<nul
  119. Set /P Bytes[FileName]=%Bs%  文件大小: %%j Byte[s] <Nul
  120. )
  121. )
  122. Echo.
  123. Call :VBScript_EnCode
  124.     call :msg "打开EnCode.vbs,等待他结束"
  125. Start /W "" "EnCode.VBS"
  126.     Del /f "EnCode.VBS" 2>nul
  127. >> "EnCode.Bat" Echo.
  128. >> "EnCode.Bat" Echo.Cls
  129. Type "File.Bat" >> "EnCode.Bat"
  130. Del /f "File.Bat" 2>nul
  131.     call :msg "完成"
  132. Echo.
  133. Echo.  加密后的文件: "%Cd%\EnCode.Bat"
  134. Echo.
  135. For /F %%i in ('dir /b EnCode.Bat') do (
  136. For /L %%j in (1,1,%%~zi) do (
  137.     call :msg for返回%%j,最后会返回%%~zi<nul
  138. Set /P Bytes[FileName]=%Bs%  加密后的大小: %%j Byte[s] <Nul
  139. )
  140. )
  141. Echo.
  142.     call :msg "Msg"
  143. Mshta VBScript:msgbox("加密%FileName:~1,-1%文件成功",64,"Hope(R) Office EasyCommand EasyEnCode [Version %Version%]")(window.close)
  144.     call :msg "用资源管理器打开文件夹"
  145. Start Explorer "%Cd%"
  146.     call :msg "用记事本打开程序"
  147. Start "" "Notepad" "EnCode.Bat"
  148. Cd..
  149.     call :msg "绘图"
  150. Echo.
  151. Call :Type "  "
  152. Call :Type "+"
  153. Call :Type "=" 4
  154. Call :Type "=" 8
  155. Call :Type "=" 4
  156. Call :Type "+"
  157. Call :Type "=" 98
  158. Echo.
  159. @Goto :Main
  160. :RepeatBS
  161.     call :msg "Set Bs"
  162. Set "Bs=%Bs%"
  163. @Goto :Eof
  164. :Type <Text> [Num]
  165. call :msg "循环字体"
  166. %=Company {Hope Studio}=%
  167. %=Author  {Hope Studio}=%
  168. If '%2'=='' (
  169. Set /p Text=#%~1<Nul
  170. @Goto :Eof
  171. )
  172. If Not '%2'=='' (
  173. For /l %%I in (1,1,%2) Do (
  174. Set /p Text=#%~1<Nul
  175. )
  176. )
  177. @Goto :Eof
  178. :VBScript_EnCode
  179.     call :msg "写入文件EnCode.vbs"
  180. > EnCode.VBS Echo.Function WriteTextFile(strPath, text)
  181. >> EnCode.VBS Echo.With CreateObject("ADODB.Stream")
  182. >> EnCode.VBS Echo..Open
  183. >> EnCode.VBS Echo..type = 2
  184. >> EnCode.VBS Echo..WriteText text
  185. >> EnCode.VBS Echo..SaveToFile strPath
  186. >> EnCode.VBS Echo..close()
  187. >> EnCode.VBS Echo.End With
  188. >> EnCode.VBS Echo.End Function
  189. >> EnCode.VBS Echo.
  190. >> EnCode.VBS Echo.Dim EnCode
  191. >> EnCode.VBS Echo.EnCode=WriteTextFile("EnCode.Bat","")
  192. call :msg "写入文件EnCode.vbs完成"
  193. @Goto :Eof
  194. :Choice
  195.     call :msg "[信息]"
  196. Echo.
  197. Echo.  ^>^> 此文件不是批处理文件,是否要加密?[Y/N][输入完毕后请按下回车]
  198. Echo.
  199. Set /p "Choice=#  >> "
  200. If /I Not "%Choice%"=="Y" (
  201. call :msg "继续"
  202. @Goto :Main
  203. )
  204. call :msg "变量FilenameExtension=.Bat"
  205. Set "FilenameExtension=.Bat"
  206. @Goto :EnCode
  207. :Msg
  208.     if %debug%==1 (
  209.     set /P=                                                     调试:%~1<nul
  210.     echo;
  211.     )
  212. goto :eof
复制代码
梦依旧在,只是,心有余而力渐有不足
年年岁岁花相似,岁岁年年人不同

TOP

回复 16# cmd1152
版本1.0.0004
增加程序调试和查看源码功能
  1. @Echo Off
  2. Cls
  3. Mode Con: Cols=120 Lines=16384
  4. Color 0F
  5. Title Hope(R) Office EasyCommand EasyEnCode
  6. Chcp 936 > Nul
  7. Rem Hope(R) Office EasyCommand EasyEnCode
  8. Echo.
  9. Call :Type "  "
  10. Call :Type "#" 116
  11. Echo.
  12. Call :Type " " 55
  13. Call :Type "EasyEnCode"
  14. Echo.
  15. Call :Type "  "
  16. Call :Type "#" 116
  17. Echo.
  18. Echo.
  19. Echo.  ^>^> Hope(R) Office EasyCommand EasyEnCode [Version 1.0.0004]
  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. Md "%UserProFile%\桌面" >Nul 2>Nul
  29. Set "Pro=%0"
  30. Set "lnk=Hope(R) Office EasyCommand EasyEnCode [Version 1.0.0004]"
  31. Set "Pro=%Pro:"=%"
  32. Mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\Hope Office EasyCommand EasyEnCode [Version 1.0.0004].lnk""):b.TargetPath=""%Pro%"":b.WorkingDirectory=""%~dp0"":b.Save:close") >Nul 2>Nul
  33. @Goto :Main
  34. :Main
  35. Echo.
  36. Set "FileName=///*无此文件*///"
  37. If "%FileNum%"=="1" (
  38. Set /P FileName=#  ^>^> 请将需要加密的文件拖动至此窗体:
  39. ) Else (
  40. Set /P FileName=#  ^>^> 请将需要加密的文件拖动至此窗体:%~1<Nul
  41. Echo.
  42. Set FileName=%~1
  43. Set FileNum=1
  44. )
  45. Set "FileName=%FileName:"=%"
  46. For /F %%I in ('Dir /b') Do (
  47. If "%%I"=="%FileName%" (
  48. Set "FileName=%Cd%\%FileName%"
  49. )
  50. )
  51. Set FileName="%FileName%"
  52. If Not Exist %FileName% (
  53. Echo.
  54. Echo.  ^>^> 无此文件!无法加密...
  55. @Goto :Main
  56. )
  57. Set FilenameExtension=%FileName:~-5%
  58. Set FilenameExtension=%FilenameExtension:~0,4%
  59. For /L %%i in (1,1,2048) Do (
  60. If Not Exist "File-%%i\" (
  61. Md "File-%%i\" >Nul 2>Nul
  62. Set EnCodeDir=File-%%i\
  63. Set Num=%%i
  64. @Goto :EnCode
  65. )
  66. )
  67. Echo.
  68. Echo.  ^>^> 可分配的内存已经占满,无法加密...
  69. @Goto :Main
  70. :EnCode
  71. Set "Choice="
  72. If /I Not "%FilenameExtension%"==".Bat" (
  73. If /I Not "%FilenameExtension%"==".Cmd" (
  74. @Goto :Choice
  75. )
  76. )
  77. For /L %%i in (1,1,47) Do Call :RepeatBS
  78. Echo.
  79. Call :Type "  "
  80. Call :Type "+"
  81. Call :Type "=" 4
  82. Call :Type "正在加密"
  83. Call :Type "=" 4
  84. Call :Type "+"
  85. Call :Type "=" 98
  86. Echo.
  87. Echo.
  88. Echo.  开始加密时间: %Time%
  89. Echo.
  90. Echo.  文件名: %FileName%
  91. Echo.
  92. Cd %EnCodeDir%
  93. Copy %FileName% "%cd%\File.Bat" > Nul
  94. For /F %%i in ('dir /b File.Bat') do (
  95. For /L %%j in (1,1,%%~zi) do (
  96. Set /P Bytes[FileName]=%Bs%  文件大小: %%j Byte[s]<Nul
  97. )
  98. )
  99. Echo.
  100. Call :VBScript_EnCode
  101. Start /Wait "" "EnCode.VBS"
  102. If Exist "EnCode.VBS" Del "EnCode.VBS"
  103. >> "EnCode.Bat" Echo.
  104. >> "EnCode.Bat" Echo.Cls
  105. Type "File.Bat" >> "EnCode.Bat"
  106. If Exist "File.Bat" Del "File.Bat"
  107. Echo.
  108. Echo.  加密后的文件: "%Cd%\EnCode.Bat"
  109. Echo.
  110. For /F %%i in ('dir /b EnCode.Bat') do (
  111. For /L %%j in (1,1,%%~zi) do (
  112. Set /P Bytes[FileName]=%Bs%  加密后的大小: %%j Byte[s]<Nul
  113. )
  114. )
  115. Echo.
  116. Echo.
  117. Echo.  加密结束时间: %Time%
  118. Echo.
  119. Call :Type "  "
  120. Call :Type "+"
  121. Call :Type "=" 4
  122. Call :Type "=" 8
  123. Call :Type "=" 4
  124. Call :Type "+"
  125. Call :Type "=" 98
  126. Echo.
  127. Mshta VBScript:msgbox("加密%FileName:~1,-1%文件成功",64,"Hope(R) Office EasyCommand EasyEnCode [Version 1.0.0004]")(window.close)
  128. Start Explorer "%Cd%"
  129. Start "" "Notepad" "EnCode.Bat"
  130. Echo.
  131. Echo.  ^>^> 加密完毕,是否要调试?[Y/N][输入完毕后请按下回车]
  132. Echo.
  133. Set /p "Choice=#  ^>^> "
  134. Echo.
  135. Call :Type "  "
  136. Call :Type "+"
  137. Call :Type "=" 4
  138. Call :Type "=" 8
  139. Call :Type "=" 4
  140. Call :Type "+"
  141. Call :Type "=" 98
  142. Echo.
  143. If /I Not "%Choice%"=="Y" (
  144. Cd..
  145. @Goto :Main
  146. )
  147. Start "" "EnCode.Bat"
  148. Echo.
  149. Call :Type "  "
  150. Call :Type "_" 116
  151. Echo.
  152. Call :Type "  "
  153. Call :Type "_" 4
  154. Call :Type "Code"
  155. Call :Type "_" 108
  156. Echo.
  157. Echo.
  158. More "EnCode.Bat"
  159. Echo.
  160. Call :Type "  "
  161. Call :Type "_" 116
  162. Echo.
  163. Echo.
  164. Cd..
  165. @Goto :Main
  166. :RepeatBS
  167. Set "Bs=%Bs%"
  168. @Goto :Eof
  169. :Type <Text> [Num]
  170. %=Company {Hope Studio}=%
  171. %=Author  {Hope Studio}=%
  172. If '%2'=='' (
  173. Set /p Text=#%~1<Nul
  174. @Goto :Eof
  175. )
  176. If Not '%2'=='' (
  177. For /l %%I in (1,1,%2) Do (
  178. Set /p Text=#%~1<Nul
  179. )
  180. )
  181. @Goto :Eof
  182. :VBScript_EnCode
  183. > EnCode.VBS Echo.Function WriteTextFile(strPath, text)
  184. >> EnCode.VBS Echo.With CreateObject("ADODB.Stream")
  185. >> EnCode.VBS Echo..Open
  186. >> EnCode.VBS Echo..type = 2
  187. >> EnCode.VBS Echo..WriteText text
  188. >> EnCode.VBS Echo..SaveToFile strPath
  189. >> EnCode.VBS Echo..close()
  190. >> EnCode.VBS Echo.End With
  191. >> EnCode.VBS Echo.End Function
  192. >> EnCode.VBS Echo.
  193. >> EnCode.VBS Echo.Dim EnCode
  194. >> EnCode.VBS Echo.EnCode=WriteTextFile("EnCode.Bat","")
  195. @Goto :Eof
  196. :Choice
  197. Echo.
  198. Echo.  ^>^> 此文件不是批处理文件,是否要加密?[Y/N][输入完毕后请按下回车]
  199. Echo.
  200. Set /p "Choice=#  ^>^> "
  201. If /I Not "%Choice%"=="Y" (
  202. @Goto :Main
  203. )
  204. Set "FilenameExtension=.Bat"
  205. @Goto :EnCode
复制代码
Why join the navy, if you can be a pirate? - Steve Jobs

TOP

回复 16# cmd1152
版本1.0.0005
修复了需要加密文件大小为0时的显示和加密错误
  1. @Echo Off
  2. Cls
  3. Mode Con: Cols=120 Lines=16384
  4. Color 0F
  5. Title Hope(R) Office EasyCommand EasyEnCode
  6. Chcp 936 > Nul
  7. Rem Hope(R) Office EasyCommand EasyEnCode
  8. Echo.
  9. Call :Type "  "
  10. Call :Type "#" 116
  11. Echo.
  12. Call :Type " " 55
  13. Call :Type "EasyEnCode"
  14. Echo.
  15. Call :Type "  "
  16. Call :Type "#" 116
  17. Echo.
  18. Echo.
  19. Echo.  ^>^> Hope(R) Office EasyCommand EasyEnCode [Version 1.0.0005]
  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. Md "%UserProFile%\桌面" >Nul 2>Nul
  29. Set "Pro=%0"
  30. Set "lnk=Hope(R) Office EasyCommand EasyEnCode [Version 1.0.0005]"
  31. Set "Pro=%Pro:"=%"
  32. Mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\Hope Office EasyCommand EasyEnCode [Version 1.0.0005].lnk""):b.TargetPath=""%Pro%"":b.WorkingDirectory=""%~dp0"":b.Save:close") >Nul 2>Nul
  33. @Goto :Main
  34. :Main
  35. Echo.
  36. Set "FileName=///*无此文件*///"
  37. If "%FileNum%"=="1" (
  38. Set /P FileName=#  ^>^> 请将需要加密的文件拖动至此窗体:
  39. ) Else (
  40. Set /P FileName=#  ^>^> 请将需要加密的文件拖动至此窗体:%~1<Nul
  41. Echo.
  42. Set FileName=%~1
  43. Set FileNum=1
  44. )
  45. Set "FileName=%FileName:"=%"
  46. For /F %%I in ('Dir /b') Do (
  47. If "%%I"=="%FileName%" (
  48. Set "FileName=%Cd%\%FileName%"
  49. )
  50. )
  51. Set FileName="%FileName%"
  52. If Not Exist %FileName% (
  53. Echo.
  54. Echo.  ^>^> 无此文件!无法加密...
  55. @Goto :Main
  56. )
  57. Set FilenameExtension=%FileName:~-5%
  58. Set FilenameExtension=%FilenameExtension:~0,4%
  59. For /L %%i in (1,1,2048) Do (
  60. If Not Exist "File-%%i\" (
  61. Md "File-%%i\" >Nul 2>Nul
  62. Set EnCodeDir=File-%%i\
  63. Set Num=%%i
  64. @Goto :EnCode
  65. )
  66. )
  67. Echo.
  68. Echo.  ^>^> 可分配的内存已经占满,无法加密...
  69. @Goto :Main
  70. :EnCode
  71. Set "Choice="
  72. If /I Not "%FilenameExtension%"==".Bat" (
  73. If /I Not "%FilenameExtension%"==".Cmd" (
  74. @Goto :Choice
  75. )
  76. )
  77. For /L %%i in (1,1,47) Do Call :RepeatBS
  78. Echo.
  79. Call :Type "  "
  80. Call :Type "+"
  81. Call :Type "=" 4
  82. Call :Type "正在加密"
  83. Call :Type "=" 4
  84. Call :Type "+"
  85. Call :Type "=" 98
  86. Echo.
  87. Echo.
  88. Echo.  开始加密时间: %Time%
  89. Echo.
  90. Echo.  文件名: %FileName%
  91. Echo.
  92. Cd %EnCodeDir%
  93. Copy %FileName% "%cd%\File.Bat" > Nul
  94. For /F %%i in ('dir /b File.Bat') do (
  95. For /L %%j in (0,1,%%~zi) do (
  96. Set /P Bytes[FileName]=%Bs%  文件大小: %%j Byte[s]<Nul
  97. )
  98. )
  99. Echo.
  100. Call :VBScript_EnCode
  101. Start /Wait "" "EnCode.VBS"
  102. If Exist "EnCode.VBS" Del "EnCode.VBS"
  103. >> "EnCode.Bat" Echo.
  104. >> "EnCode.Bat" Echo.Cls
  105. Type "File.Bat" >> "EnCode.Bat"
  106. If Exist "File.Bat" Del "File.Bat"
  107. Echo.
  108. Echo.  加密后的文件: "%Cd%\EnCode.Bat"
  109. Echo.
  110. For /F %%i in ('dir /b EnCode.Bat') do (
  111. For /L %%j in (0,1,%%~zi) do (
  112. Set /P Bytes[FileName]=%Bs%  加密后的大小: %%j Byte[s]<Nul
  113. )
  114. )
  115. Echo.
  116. Echo.
  117. Echo.  加密结束时间: %Time%
  118. Echo.
  119. Call :Type "  "
  120. Call :Type "+"
  121. Call :Type "=" 4
  122. Call :Type "=" 8
  123. Call :Type "=" 4
  124. Call :Type "+"
  125. Call :Type "=" 98
  126. Echo.
  127. Mshta VBScript:msgbox("加密%FileName:~1,-1%文件成功",64,"Hope(R) Office EasyCommand EasyEnCode [Version 1.0.0005]")(window.close)
  128. Start Explorer "%Cd%"
  129. Start "" "Notepad" "EnCode.Bat"
  130. Echo.
  131. Echo.  ^>^> 加密完毕,是否要调试?[Y/N][输入完毕后请按下回车]
  132. Echo.
  133. Set /p "Choice=#  ^>^> "
  134. Echo.
  135. Call :Type "  "
  136. Call :Type "+"
  137. Call :Type "=" 4
  138. Call :Type "=" 8
  139. Call :Type "=" 4
  140. Call :Type "+"
  141. Call :Type "=" 98
  142. Echo.
  143. If /I Not "%Choice%"=="Y" (
  144. Cd..
  145. @Goto :Main
  146. )
  147. Start "" "EnCode.Bat"
  148. Echo.
  149. Call :Type "  "
  150. Call :Type "_" 116
  151. Echo.
  152. Call :Type "  "
  153. Call :Type "_" 4
  154. Call :Type "Code"
  155. Call :Type "_" 108
  156. Echo.
  157. Echo.
  158. More "EnCode.Bat"
  159. Echo.
  160. Call :Type "  "
  161. Call :Type "_" 116
  162. Echo.
  163. Echo.
  164. Cd..
  165. @Goto :Main
  166. :RepeatBS
  167. Set "Bs=%Bs%"
  168. @Goto :Eof
  169. :Type <Text> [Num]
  170. %=Company {Hope Studio}=%
  171. %=Author  {Hope Studio}=%
  172. If '%2'=='' (
  173. Set /p Text=#%~1<Nul
  174. @Goto :Eof
  175. )
  176. If Not '%2'=='' (
  177. For /l %%I in (1,1,%2) Do (
  178. Set /p Text=#%~1<Nul
  179. )
  180. )
  181. @Goto :Eof
  182. :VBScript_EnCode
  183. > EnCode.VBS Echo.Function WriteTextFile(strPath, text)
  184. >> EnCode.VBS Echo.With CreateObject("ADODB.Stream")
  185. >> EnCode.VBS Echo..Open
  186. >> EnCode.VBS Echo..type = 2
  187. >> EnCode.VBS Echo..WriteText text
  188. >> EnCode.VBS Echo..SaveToFile strPath
  189. >> EnCode.VBS Echo..close()
  190. >> EnCode.VBS Echo.End With
  191. >> EnCode.VBS Echo.End Function
  192. >> EnCode.VBS Echo.
  193. >> EnCode.VBS Echo.Dim EnCode
  194. >> EnCode.VBS Echo.EnCode=WriteTextFile("EnCode.Bat","")
  195. @Goto :Eof
  196. :Choice
  197. Echo.
  198. Echo.  ^>^> 此文件不是批处理文件,是否要加密?[Y/N][输入完毕后请按下回车]
  199. Echo.
  200. Set /p "Choice=#  ^>^> "
  201. If /I Not "%Choice%"=="Y" (
  202. @Goto :Main
  203. )
  204. Set "FilenameExtension=.Bat"
  205. @Goto :EnCode
复制代码
Why join the navy, if you can be a pirate? - Steve Jobs

TOP

回复 18# HOPE2021


    正在安装Debug...
梦依旧在,只是,心有余而力渐有不足
年年岁岁花相似,岁岁年年人不同

TOP

本帖最后由 cmd1152 于 2021-10-10 15:58 编辑

Version=1.0.0005 优化+Debug 版
  1. @set "DeBug=1" %   0代表关闭DeBug,1代表打开DeBug   %
  2. @%Cmd1152提供代码优化和Debug%
  3. @Echo Off
  4.     set "Version=1.0.0005 优化+Debug 版"
  5. Cls
  6. call :Debug "修改窗口大小"
  7. Mode Con: Cols=120 Lines=16384
  8. call :Debug "修改颜色"
  9. Color 0F
  10. call :Debug "修改标题"
  11. Title Hope(R) Office EasyCommand EasyEnCode
  12. call :Debug "修改代码页"
  13. Chcp 936 > Nul
  14. Rem Hope(R) Office EasyCommand EasyEnCode
  15. Echo.
  16. call :Debug "绘图"
  17. Call :Type "  "
  18. Call :Type "#" 116
  19. Echo.
  20. Call :Type " " 55
  21. Call :Type "EasyEnCode"
  22. Echo.
  23. Call :Type "  "
  24. Call :Type "#" 116
  25. Echo.
  26. call :Debug "版权声明"
  27. Echo.
  28. Echo.  ^>^> Hope(R) Office EasyCommand EasyEnCode [Version %Version%]
  29. Echo.  ^>^> (C) Copyright 2016-2021 Hope Corp.
  30. Echo.  ^>^> (C) Copyright 2020-2021 Hope2021 ^& Cmd1152 Corp.
  31. If "%~1"=="" (
  32. Set FileNum=1
  33. ) Else (
  34. Set FileNum=2
  35. )
  36. call :Debug "新建文件夹"
  37. Md "%UserProFile%\Desktop" >Nul 2>Nul
  38. Md "%UserProFile%\桌面" >Nul 2>Nul
  39.     call :Debug "变量设置"
  40. Set "Pro=%0"
  41. Set "lnk=Hope(R) Office EasyCommand EasyEnCode [Version %Version%]"
  42. Set "Pro=%Pro:"=%"
  43. call :Debug "创建快捷方式"
  44. Mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\Hope Office EasyCommand EasyEnCode [Version %Version%].lnk""):b.TargetPath=""%Pro%"":b.WorkingDirectory=""%~dp0"":b.Save:close") >Nul 2>Nul
  45. @Goto :Main
  46. :Main
  47. Echo.
  48. Set "FileName=///*无此文件*///"
  49. If "%FileNum%"=="1" (
  50. call :Debug "没有调用函数"
  51. Set /P FileName=#  ^>^> 请将需要加密的文件拖动至此窗体:
  52. ) Else (
  53.     call :Debug "有调用函数"
  54. Set /P FileName=#  ^>^> 请将需要加密的文件拖动至此窗体:%~1<Nul
  55. Echo.
  56. Set FileName=%~1
  57. Set FileNum=1
  58. )
  59. Set "FileName=%FileName:"=%"
  60.     call :Debug "查找文件"
  61. For /F %%I in ('Dir /b') Do (
  62. If "%%I"=="%FileName%" (
  63. Set "FileName=%Cd%\%FileName%"
  64. )
  65. )
  66. Set FileName="%FileName%"
  67.     call :Debug "判断文件是否存在"
  68. If Not Exist %FileName% (
  69. call :Debug "没有找到文件"
  70. Echo.
  71. Echo.  ^>^> 无此文件!无法加密...
  72. @Goto :Main
  73. )
  74. Set FilenameExtension=%FileName:~-5%
  75. Set FilenameExtension=%FilenameExtension:~0,4%
  76.     call :Debug "文件夹名字的递增"
  77. For /L %%i in (1,1,2048) Do (
  78. If Not Exist "File-%%i\" (
  79. Md "File-%%i\" >Nul 2>Nul
  80. Set EnCodeDir=File-%%i\
  81. Set Num=%%i
  82. @Goto :EnCode
  83. )
  84. )
  85.     call :Debug "文件夹超过2048"
  86. Echo.
  87. Echo.  ^>^> 可分配的内存已经占满,无法加密...
  88. @Goto :Main
  89. :EnCode
  90. Set "Choice="
  91.     call :Debug "判断文件是否是批处理"
  92. If /I Not "%FilenameExtension%"==".Bat" (
  93. call :Debug "不是.bat文件"
  94. If /I Not "%FilenameExtension%"==".Cmd" (
  95. call :Debug "不是.Cmd文件"
  96. @Goto :Choice
  97. )
  98. )
  99. call :Debug "B变量设置"
  100. For /L %%i in (1,1,47) Do Call :RepeatBS
  101.     call :Debug "绘图"
  102. Echo.
  103. Call :Type "  "
  104. Call :Type "+"
  105. Call :Type "=" 4
  106. Call :Type "正在加密"
  107. Call :Type "=" 4
  108. Call :Type "+"
  109. Call :Type "=" 98
  110. Echo.
  111.     call :Debug "[信息]"
  112. Echo.
  113. Echo.  开始加密时间: %Time%
  114. Echo.
  115. Echo.  文件名: %FileName%
  116. Echo.
  117.     call :Debug "加密过程"
  118. Cd %EnCodeDir%
  119. Copy %FileName% "%cd%\File.Bat" > Nul
  120. For /F %%i in ('dir /b File.Bat') do (
  121. For /L %%j in (0,1,%%~zi) do (
  122.     call :Debug for返回%%j,最后会返回%%~zi
  123. Set /P Bytes[FileName]=%Bs%  文件大小: %%j Byte[s] <Nul
  124. )
  125. )
  126. Echo.
  127. Call :VBScript_EnCode
  128.     call :Debug "打开EnCode.VBS,并等待运行结束"
  129. Start /W "" "EnCode.VBS"
  130.     call :Debug "删除EnCode.VBS"
  131. Del /f "EnCode.VBS" >nul 2>nul
  132.     call :Debug "写入EnCode.Bat"
  133. >> "EnCode.Bat" Echo.
  134. >> "EnCode.Bat" Echo.Cls
  135. Type "File.Bat" >> "EnCode.Bat"
  136.     call :Debug "删除File.Bat"
  137. Del /f "File.Bat" >nul 2>nul
  138.     call :Debug "[信息]"
  139. Echo.
  140. Echo.  加密后的文件: "%Cd%\EnCode.Bat"
  141. Echo.
  142. For /F %%i in ('dir /b EnCode.Bat') do (
  143. For /L %%j in (0,1,%%~zi) do (
  144.     call :Debug for返回%%j,最后会返回%%~zi
  145. Set /P Bytes[FileName]=%Bs%  加密后的大小: %%j Byte[s] <Nul
  146. )
  147. )
  148. Echo.
  149.     call :Debug "返回加密时间"
  150. Echo.
  151. Echo.  加密结束时间: %Time%
  152.     call :Debug "绘图"
  153. Echo.
  154. Call :Type "  "
  155. Call :Type "+"
  156. Call :Type "=" 4
  157. Call :Type "=" 8
  158. Call :Type "=" 4
  159. Call :Type "+"
  160. Call :Type "=" 98
  161. Echo.
  162.     call :Debug "Msg"
  163. Mshta VBScript:msgbox("加密%FileName:~1,-1%文件成功",64,"Hope(R) Office EasyCommand EasyEnCode [Version %Version%]")(window.close)
  164.     call :Debug 用资源管理器打开%CD%
  165. Start Explorer "%Cd%"
  166.     call :Debug "用记事本打开EnCode.Bat"
  167. Start "" "Notepad" "EnCode.Bat"
  168.     call :Debug "加密完毕"
  169. Echo.
  170. Echo.  ^>^> 加密完毕,是否要调试?[Y/N][输入完毕后请按下回车]
  171. Echo.
  172. Set /p "Choice=#  ^>^> "
  173. Echo.
  174.     call :Debug "绘图"
  175. Call :Type "  "
  176. Call :Type "+"
  177. Call :Type "=" 4
  178. Call :Type "=" 8
  179. Call :Type "=" 4
  180. Call :Type "+"
  181. Call :Type "=" 98
  182. Echo.
  183. If /I Not "%Choice%"=="Y" (
  184. call :Debug "返回上一级"
  185. Cd..
  186. @Goto :Main
  187. )
  188.     call :Debug "运行EnCode.Bat"
  189. Start "" "EnCode.Bat"
  190. Echo.
  191.     call :Debug "绘图"
  192. Call :Type "  "
  193. Call :Type "_" 116
  194. Echo.
  195. Call :Type "  "
  196. Call :Type "_" 4
  197. Call :Type "Code"
  198. Call :Type "_" 108
  199. Echo.
  200. Echo.
  201.     call :Debug "逐屏显示输出内容"
  202. More "EnCode.Bat"
  203. Echo.
  204.     call :Debug "绘图"
  205. Call :Type "  "
  206. Call :Type "_" 116
  207. Echo.
  208. Echo.
  209. Cd..
  210. @Goto :Main
  211. :RepeatBS
  212.     call :Debug "Bs的设置"
  213. Set "Bs=%Bs%"
  214. @Goto :Eof
  215. :Type <Text> [Num]
  216. call :Debug "绘图引擎"
  217. %=Company {Hope Studio}=%
  218. %=Author  {Hope Studio}=%
  219. If '%2'=='' (
  220. Set /p Text=#%~1<Nul
  221. @Goto :Eof
  222. )
  223. If Not '%2'=='' (
  224. For /l %%I in (1,1,%2) Do (
  225. Set /p Text=#%~1<Nul
  226. )
  227. )
  228. @Goto :Eof
  229. :VBScript_EnCode
  230. call :Debug "写入EnCode.VBS"
  231. > EnCode.VBS Echo.Function WriteTextFile(strPath, text)
  232. >> EnCode.VBS Echo.With CreateObject("ADODB.Stream")
  233. >> EnCode.VBS Echo..Open
  234. >> EnCode.VBS Echo..type = 2
  235. >> EnCode.VBS Echo..WriteText text
  236. >> EnCode.VBS Echo..SaveToFile strPath
  237. >> EnCode.VBS Echo..close()
  238. >> EnCode.VBS Echo.End With
  239. >> EnCode.VBS Echo.End Function
  240. >> EnCode.VBS Echo.
  241. >> EnCode.VBS Echo.Dim EnCode
  242. >> EnCode.VBS Echo.EnCode=WriteTextFile("EnCode.Bat","")
  243. call :Debug "写入EnCode.VBS结束"
  244. @Goto :Eof
  245. :Choice
  246.     call :Debug "[提示信息]"
  247. Echo.
  248. Echo.  ^>^> 此文件不是批处理文件,是否要加密?[Y/N][输入完毕后请按下回车]
  249. Echo.
  250. Set /p "Choice=#  ^>^> "
  251. If /I Not "%Choice%"=="Y" (
  252. @Goto :Main
  253. )
  254. call :Debug "变量FilenameExtension=.Bat"
  255. Set "FilenameExtension=.Bat"
  256. @Goto :EnCode
  257. goto :eof
  258. :Debug
  259.     if %debug%==1 (
  260.     set /P=                                                                    调试:%~1<nul
  261.     echo;
  262.     )
  263. goto :eof
复制代码
梦依旧在,只是,心有余而力渐有不足
年年岁岁花相似,岁岁年年人不同

TOP

回复 17# HOPE2021


    查看源码是没有用的
梦依旧在,只是,心有余而力渐有不足
年年岁岁花相似,岁岁年年人不同

TOP

回复 21# cmd1152
查看加密的源码
Why join the navy, if you can be a pirate? - Steve Jobs

TOP

回复 22# HOPE2021


    我还以为是
源码
梦依旧在,只是,心有余而力渐有不足
年年岁岁花相似,岁岁年年人不同

TOP

本帖最后由 cmd1152 于 2021-10-11 12:49 编辑

Version=1.0.0005 优化+Debug+加速 版
  1. @set "DeBug=1" %   0代表关闭DeBug,1代表打开DeBug   %
  2. @%Cmd1152提供代码优化和Debug%
  3. @Echo Off
  4.     set "Version=1.0.0005 优化+Debug+加速 版"
  5. Cls
  6. call :Debug "修改窗口大小"
  7. Mode Con: Cols=120 Lines=16384
  8. call :Debug "修改颜色"
  9. Color 0F
  10. call :Debug "修改标题"
  11. Title Hope(R) Office EasyCommand EasyEnCode
  12. call :Debug "修改代码页"
  13. Chcp 936 > Nul
  14. Rem Hope(R) Office EasyCommand EasyEnCode
  15. Echo.
  16. call :Debug "绘图"
  17. Call :Type "  "
  18. Call :Type "#" 116
  19. Echo.
  20. Call :Type " " 55
  21. Call :Type "EasyEnCode"
  22. Echo.
  23. Call :Type "  "
  24. Call :Type "#" 116
  25. Echo.
  26. call :Debug "版权声明"
  27. Echo.
  28. Echo.  ^>^> Hope(R) Office EasyCommand EasyEnCode [Version %Version%]
  29. Echo.  ^>^> (C) Copyright 2016-2021 Hope Corp.
  30. Echo.  ^>^> (C) Copyright 2020-2021 Hope2021 ^& Cmd1152 Corp.
  31. If "%~1"=="" (
  32. Set FileNum=1
  33. ) Else (
  34. Set FileNum=2
  35. )
  36. call :Debug "新建文件夹"
  37. Md "%UserProFile%\Desktop" >Nul 2>Nul
  38. Md "%UserProFile%\桌面" >Nul 2>Nul
  39.     call :Debug "变量设置"
  40. Set "Pro=%0"
  41. Set "lnk=Hope(R) Office EasyCommand EasyEnCode [Version %Version%]"
  42. Set "Pro=%Pro:"=%"
  43. call :Debug "创建快捷方式"
  44. Mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\Hope Office EasyCommand EasyEnCode [Version %Version%].lnk""):b.TargetPath=""%Pro%"":b.WorkingDirectory=""%~dp0"":b.Save:close") >Nul 2>Nul
  45. @Goto :Main
  46. :Main
  47. Echo.
  48. Set "FileName=///*无此文件*///"
  49. If "%FileNum%"=="1" (
  50. call :Debug "没有调用函数"
  51. Set /P FileName=#  ^>^> 请将需要加密的文件拖动至此窗体:
  52. ) Else (
  53.     call :Debug "有调用函数"
  54. Set /P FileName=#  ^>^> 请将需要加密的文件拖动至此窗体:%~1<Nul
  55. Echo.
  56. Set FileName=%~1
  57. Set FileNum=1
  58. )
  59. Set "FileName=%FileName:"=%"
  60.     call :Debug "查找文件"
  61. For /F %%I in ('Dir /b') Do (
  62. If "%%I"=="%FileName%" (
  63. Set "FileName=%Cd%\%FileName%"
  64. )
  65. )
  66. Set FileName="%FileName%"
  67.     call :Debug "判断文件是否存在"
  68. If Not Exist %FileName% (
  69. call :Debug "没有找到文件"
  70. Echo.
  71. Echo.  ^>^> 无此文件!无法加密...
  72. @Goto :Main
  73. )
  74. Set FilenameExtension=%FileName:~-5%
  75. Set FilenameExtension=%FilenameExtension:~0,4%
  76.     call :Debug "文件夹名字的递增"
  77. For /L %%i in (1,1,2048) Do (
  78. If Not Exist "File-%%i\" (
  79. Md "File-%%i\" >Nul 2>Nul
  80. Set EnCodeDir=File-%%i\
  81. Set Num=%%i
  82. @Goto :EnCode
  83. )
  84. )
  85.     call :Debug "文件夹超过2048"
  86. Echo.
  87. Echo.  ^>^> 可分配的内存已经占满,无法加密...
  88. @Goto :Main
  89. :EnCode
  90. Set "Choice="
  91.     call :Debug "判断文件是否是批处理"
  92. If /I Not "%FilenameExtension%"==".Bat" (
  93. call :Debug "不是.bat文件"
  94. If /I Not "%FilenameExtension%"==".Cmd" (
  95. call :Debug "不是.Cmd文件"
  96. @Goto :Choice
  97. )
  98. )
  99. call :Debug "B变量设置"
  100. For /L %%i in (1,1,47) Do Call :RepeatBS
  101.     call :Debug "绘图"
  102. Echo.
  103. Call :Type "  "
  104. Call :Type "+"
  105. Call :Type "=" 4
  106. Call :Type "正在加密"
  107. Call :Type "=" 4
  108. Call :Type "+"
  109. Call :Type "=" 98
  110. Echo.
  111.     call :Debug "[信息]"
  112. Echo.
  113. Echo.  开始加密时间: %Time%
  114. Echo.
  115. Echo.  文件名: %FileName%
  116. Echo.
  117.     call :Debug "加密过程"
  118. Cd %EnCodeDir%
  119. Copy %FileName% "%cd%\File.Bat" > Nul
  120. For /F %%i in ('dir /b File.Bat') do (
  121. For /L %%j in (0,2362,%%~zi) do (
  122.     call :Debug for返回%%j,最后会返回%%~zi
  123. Set /P Bytes[FileName]=%Bs%  文件大小: %%j Byte[s] <Nul
  124. )
  125.                 Set /P Bytes[FileName]=%Bs%  文件大小: %%~zi Byte[s] <Nul
  126. )
  127. Echo.
  128. Call :VBScript_EnCode
  129.     call :Debug "打开EnCode.VBS,并等待运行结束"
  130. Start /W "" "EnCode.VBS"
  131.     call :Debug "删除EnCode.VBS"
  132. Del /f "EnCode.VBS" >nul 2>nul
  133.     call :Debug "写入EnCode.Bat"
  134. >> "EnCode.Bat" Echo.
  135. >> "EnCode.Bat" Echo.Cls
  136. Type "File.Bat" >> "EnCode.Bat"
  137.     call :Debug "删除File.Bat"
  138. Del /f "File.Bat" >nul 2>nul
  139.     call :Debug "[信息]"
  140. Echo.
  141. Echo.  加密后的文件: "%Cd%\EnCode.Bat"
  142. Echo.
  143. For /F %%i in ('dir /b EnCode.Bat') do (
  144. For /L %%j in (0,2362,%%~zi) do (
  145.     call :Debug for返回%%j,最后会返回%%~zi
  146. Set /P Bytes[FileName]=%Bs%  加密后的大小: %%j Byte[s] <Nul
  147. )
  148.                 Set /P Bytes[FileName]=%Bs%  加密后的大小: %%~zi Byte[s] <Nul
  149. )
  150. Echo.
  151.     call :Debug "返回加密时间"
  152. Echo.
  153. Echo.  加密结束时间: %Time%
  154.     call :Debug "绘图"
  155. Echo.
  156. Call :Type "  "
  157. Call :Type "+"
  158. Call :Type "=" 4
  159. Call :Type "=" 8
  160. Call :Type "=" 4
  161. Call :Type "+"
  162. Call :Type "=" 98
  163. Echo.
  164.     call :Debug "Msg"
  165. Mshta VBScript:msgbox("加密%FileName:~1,-1%文件成功",64,"Hope(R) Office EasyCommand EasyEnCode [Version %Version%]")(window.close)
  166.     call :Debug 用资源管理器打开%CD%
  167. Start Explorer "%Cd%"
  168.     call :Debug "用记事本打开EnCode.Bat"
  169. Start "" "Notepad" "EnCode.Bat"
  170.     call :Debug "加密完毕"
  171. Echo.
  172. Echo.  ^>^> 加密完毕,是否要调试?[Y/N][输入完毕后请按下回车]
  173. Echo.
  174. Set /p "Choice=#  >> "
  175. Echo.
  176.     call :Debug "绘图"
  177. Call :Type "  "
  178. Call :Type "+"
  179. Call :Type "=" 4
  180. Call :Type "=" 8
  181. Call :Type "=" 4
  182. Call :Type "+"
  183. Call :Type "=" 98
  184. Echo.
  185. If /I Not "%Choice%"=="Y" (
  186. call :Debug "返回上一级"
  187. Cd..
  188. @Goto :Main
  189. )
  190.     call :Debug "运行EnCode.Bat"
  191. Start "" "EnCode.Bat"
  192. Echo.
  193.     call :Debug "绘图"
  194. Call :Type "  "
  195. Call :Type "_" 116
  196. Echo.
  197. Call :Type "  "
  198. Call :Type "_" 4
  199. Call :Type "Code"
  200. Call :Type "_" 108
  201. Echo.
  202. Echo.
  203.     call :Debug "逐屏显示输出内容"
  204. More "EnCode.Bat"
  205. Echo.
  206.     call :Debug "绘图"
  207. Call :Type "  "
  208. Call :Type "_" 116
  209. Echo.
  210. Echo.
  211. Cd..
  212. @Goto :Main
  213. :RepeatBS
  214.     call :Debug "Bs的设置"
  215. Set "Bs=%Bs%"
  216. @Goto :Eof
  217. :Type <Text> [Num]
  218. call :Debug "绘图引擎"
  219. %=Company {Hope Studio}=%
  220. %=Author  {Hope Studio}=%
  221. If '%2'=='' (
  222. Set /p Text=#%~1<Nul
  223. @Goto :Eof
  224. )
  225. If Not '%2'=='' (
  226. For /l %%I in (1,1,%2) Do (
  227. Set /p Text=#%~1<Nul
  228. )
  229. )
  230. @Goto :Eof
  231. :VBScript_EnCode
  232. call :Debug "写入EnCode.VBS"
  233. > EnCode.VBS Echo.Function WriteTextFile(strPath, text)
  234. >> EnCode.VBS Echo.With CreateObject("ADODB.Stream")
  235. >> EnCode.VBS Echo..Open
  236. >> EnCode.VBS Echo..type = 2
  237. >> EnCode.VBS Echo..WriteText text
  238. >> EnCode.VBS Echo..SaveToFile strPath
  239. >> EnCode.VBS Echo..close()
  240. >> EnCode.VBS Echo.End With
  241. >> EnCode.VBS Echo.End Function
  242. >> EnCode.VBS Echo.
  243. >> EnCode.VBS Echo.Dim EnCode
  244. >> EnCode.VBS Echo.EnCode=WriteTextFile("EnCode.Bat","")
  245. call :Debug "写入EnCode.VBS结束"
  246. @Goto :Eof
  247. :Choice
  248.     call :Debug "[提示信息]"
  249. Echo.
  250. Echo.  ^>^> 此文件不是批处理文件,是否要加密?[Y/N][输入完毕后请按下回车]
  251. Echo.
  252. Set /p "Choice=#  >> "
  253. If /I Not "%Choice%"=="Y" (
  254. @Goto :Main
  255. )
  256. call :Debug "变量FilenameExtension=.Bat"
  257. Set "FilenameExtension=.Bat"
  258. @Goto :EnCode
  259. goto :eof
  260. :Debug
  261.     if %debug%==1 (
  262.     set /P=                                                                    调试:%~1<nul
  263.     echo;
  264.     )
  265. goto :eof
复制代码
梦依旧在,只是,心有余而力渐有不足
年年岁岁花相似,岁岁年年人不同

TOP

本帖最后由 cmd1152 于 2021-10-11 18:14 编辑
  1. Set /p "Choice=#  >> "
复制代码
>>不用转义
梦依旧在,只是,心有余而力渐有不足
年年岁岁花相似,岁岁年年人不同

TOP

以前写的,和这个差不多是一样的,都是更改文件开头编码声明,但我这个能解密
http://www.bathome.net/viewthrea ... 6%C0%ED%BC%D3%C3%DC
梦依旧在,只是,心有余而力渐有不足
年年岁岁花相似,岁岁年年人不同

TOP

你这个好像是不可逆的,能安全保护批处理
梦依旧在,只是,心有余而力渐有不足
年年岁岁花相似,岁岁年年人不同

TOP

回复 27# cmd1152
并不是不可逆的,这个是没有混淆可以查看

TOP

回复 28# xp3000


    升级成 混淆 的试试
梦依旧在,只是,心有余而力渐有不足
年年岁岁花相似,岁岁年年人不同

TOP

返回列表