• 批处理加密[转摘]


    @echo off
    title By Ycool tools
    mode con: cols=80 lines=22
    color 1f
    :start
    echo                        ╭───────────────╮
    echo    ╭─────────┤       BAT 加 密 工 具      ├─────────╮
    echo    │                  ╰───────────────╯                  │
    echo    │                                                                      │
    echo    │            1、本工具用来对明文批处理文件进行加密!                    │
    echo    │                                                                      │
    echo    │            2、直接把待加密批处理文件拖至本窗口释放即可!              │
    echo    │                                                                      │
    echo    │            3、加密后会在当前目录下生成NewCode.bat文件!               │
    echo    │                                                                      │
    echo    │                07年11月17日    BY Ycool       │
    echo    ╰───────────────────────────────────╯
    echo.
    set /p file=请输入需要加密的批处理文件名后按回车键[Q=退出]:
    if "%file%"=="q" goto quit
    echo %file%|findstr /i "\.bat$">nul && goto go
    echo %file%|findstr /i "\.c*$">nul && goto go
    cls
    echo ==============
    echo 请正确输入!
    echo ==============
    echo.
    echo.
    echo 按任意键重新输入......
    pause>nul
    goto start
    :go
    if not exist "%file%" goto newly
    if exist encrypt.bat copy encrypt.bat encryptbak.bat
    echo %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a >"%tmp%\encrypt.tmp"
    echo cls>>"%tmp%\encrypt.tmp"
    type "%file%">>"%tmp%\encrypt.tmp"
    setlocal enabledelayedexpansion
    for %%i in ("%tmp%\encrypt.tmp") do (
        echo %%~zi >nul 2>nul
        set size=%%~zi
        set num=!size:~-1!
        set /a mod=!num!%%2
        if !mod! equ 0 (goto even) else (goto odd)
    )
    :even
    copy "%tmp%\encrypt.tmp" NewCode.bat
    del "%tmp%\encrypt.tmp"
    cls
    echo ==========================================
    echo 恭喜你, 批处理加密成功,已保存为NewCode.bat
    echo ==========================================
    echo.
    echo.
    echo 按任意键退出......
    pause>nul
    goto quit
    :odd
    echo. >>"%tmp%\encrypt.tmp"
    copy "%tmp%\encrypt.tmp" NewCode.bat
    del "%tmp%\encrypt.tmp"
    cls
    echo ==========================================
    echo 恭喜你, 批处理加密成功,已保存为NewCode.bat
    echo ==========================================
    echo.
    echo.
    echo 按任意键退出......
    pause>nul
    goto quit
    :newly
    cls
    echo ================================
    echo 找不到批处理文件, 请重新输入!
    echo ================================
    echo.
    echo.
    echo 按任意键开始......
    pause>nul
    goto start
    :quit
    exit

  • 相关阅读:
    【java】一种自动生成数据库文档的方法
    sublime vintage mode 按住一个键(比如 j)不会重复的问题
    SQL Service服务更换帐户后无法启动的情况(Security 4625 Type 5)
    隐藏的计划任务运行,导致账户被锁的调查方法
    nodejs 热更新页面
    数组转tree arrToTree
    compose函数
    react 类组件的生命周期
    qiankun 微应用demo
    application 'xxx' died in status LOADING_SOURCE_CODE: [qiankun] You need to export lifecycle functions in xxx entry
  • 原文地址:https://www.cnblogs.com/mic86/p/1777028.html
Copyright © 2020-2023  润新知