zoukankan      html  css  js  c++  java
  • 传统的批处理变量加密的解密算法

     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
  • 相关阅读:
    Section 3.1 Shaping Regions
    3D@OpenSource
    查找资料
    Section 3.1 Shaping Regions Again
    USACO Contact IOI’98 TLE
    事项ON丰宁坝上草原
    四叉树@POJ1610 Quad Trees
    在TabCtrl上放View@MFC
    CUGB的一场周赛
    贴图程序进展
  • 原文地址:https://www.cnblogs.com/gwsbhqt/p/5456522.html
Copyright © 2011-2022 走看看