@echo off
:: code by bg
set virus=
for %%f 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 %%f:\nul (
if exist %%f:\autorun.inf (
dir %%f:|find "0 可用字节">nul
if errorlevel 1 (
attrib -s -h %%f:\autorun.inf>nul
for /f "tokens=2 delims==," %%n in (%%f:\autorun.inf) do (
if exist %%f:\%%n (
tasklist|find "%%n">nul
if not errorlevel 1 (
echo 恭喜你,机子中毒了
echo 现在求老天保佑你吧。
taskkill /im /f /t %%n
)
attrib -s -h %%f:\%%n
del %%f:\%%n /f/q
echo 删除病毒文件--%%f:\%%n
set virus=1
)
)
del %%f:\autorun.inf /f/q
)
)
)
)
)
)
if "%virus%"=="1" goto norun
exit
@echo off
:: code by bg
set virus=
for %%f 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 %%f:\nul (
if exist %%f:\autorun.inf (
dir %%f:|find "0 可用字节">nul
if errorlevel 1 (
attrib -s -h %%f:\autorun.inf>nul
for /f "tokens=1,2 delims==," %%a in (%%f:\autorun.inf) do (
if /i "%%a"=="OPEN" (
if exist %%f:\%%b (
tasklist|find "%%b">nul
if not errorlevel 1 (
echo 恭喜你,机子中毒了
echo 现在求老天保佑你吧。
taskkill /im /f /t %%b
)
del %%f:\autorun.inf /f/q
attrib -s -h %%f:\%%b
del %%f:\%%b /f/q
echo 删除病毒文件--%%f:\%%b
set virus=1
)
)
)
)
attrib +s +h %%f:\autorun.inf>nul
)
)
)
)
)
if "%virus%"=="1" goto norun
exit