『第 4 楼』:
使用 LLM 解释/回答一下
这个bat随便放在哪儿都可以查杀常见的U盘病毒!
只要是根目录下的U盘病毒都可以查杀!
自己为了方便写的,请高手指点!
@echo off
echo.
echo.
echo.
echo ================================================================================
echo.
echo 这是一个U盘病毒查杀程序,在插入U盘后运行此程序就可以查杀一般U盘病毒!
echo.
echo 两秒后开始查毒!
echo ================================================================================
ping -n 3 -l 8 127.1>nul
for /d %%1 in (C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z) do (if exist %%1: (%%1: &attrib -s -a -r -h *.*>nul & (if EXIST autorun.inf (echo %%1盘发现在U盘病毒!&echo.&echo ================================================================================&echo 正在查杀%%1盘的U盘病毒,请稍候...&echo. &type autorun.inf|find "open=">te &type te&FOR /F "eol=s tokens=2,2,2,* delims== " %%i in (te) do taskkill /f /im %%i>nul&del %%1:\%%i&del %%1:\autorun.inf&del %%1:\te&echo.&echo %%1盘病毒查杀完成!&echo.&echo ================================================================================&echo.) else (echo %%1盘没有发现在U盘病毒!&echo.))))
attrib +s +a +r +h c:\boot.ini>nul
attrib +s +a +r +h c:\bootfont.bin>nul
attrib +s +a +r +h c:\IO.SYS>nul
attrib +s +a +r +h c:\MSDOS.SYS>nul
attrib +s +a +r +h c:\NTDETECT.COM>nul
attrib +s +a +r +h c:\ntldr>nul
echo 病毒查杀完毕!请稍候...
ping -n 3 -l 8 127.1>nul
cls
echo.
echo.
echo.
echo ================================================================================
echo.
echo 病毒查杀完成!请拔下U盘重新再插!!!
echo.
echo.
echo 五秒后窗口关闭!
echo ================================================================================
ping -n 6 -l 8 127.1>nul
exit
Last edited by lcgroger on 2007-7-5 at 02:01 PM ]
|