• 传统的批处理变量加密的解密算法


     1 @echo off
     2 color 0A
     3 title 批处理变量加密解密工具
     4 
     5 if "%1" EQU "" (
     6     set /p file=目标文件路径: 
     7 ) else (
     8     set file=%1
     9 )
    10 
    11 (for /f "delims=" %%a in (%file%) do (
    12     set tv=%%a
    13     setlocal enabledelayedexpansion
    14         set tv=!tv:^&=#_1_#!
    15         set tv=!tv:^|=#_2_#!
    16         set tv=!tv:^<=#_3_#!
    17         set tv=!tv:^>=#_4_#!
    18         set tv=!tv:^^=^^^^!
    19         for /f "delims=" %%b in ("!tv!") do (
    20     endlocal
    21             echo; | ^> tmp.txt echo %%b
    22         )
    23  
    24     for /f "delims=" %%b in (tmp.txt) do (
    25         set tv2=%%b
    26         setlocal enabledelayedexpansion
    27         set tv2=!tv2:#_1_#=^&!
    28         set tv2=!tv2:#_2_#=^|!
    29         set tv2=!tv2:#_3_#=^<!
    30         set tv2=!tv2:#_4_#=^>!
    31         echo !tv2!
    32         if "!tv2:set =!" neq "!tv2!" (endlocal&call %%a) else (endlocal)
    33     )
    34 ))>out.txt 2>nul
    35 
    36 del tmp.txt
    37 
    38 cls & echo 尝试解密完成: & echo ===============================================================================
    39 type out.txt
    40 echo ===============================================================================& pause > nul
    View Code
  • 相关阅读:
    html 注释和特殊字符
    html 锚点链接
    html 链接标签
    spring 利用工厂模式解耦
    html 路径
    html 图像标签
    html div和span标签
    html 文本格式化标签
    P5358 [SDOI2019]快速查询
    luoguP2679 子串
  • 原文地址:https://www.cnblogs.com/gwsbhqt/p/5456522.html
Copyright © 2020-2023  润新知