您的位置:首页 > 服装鞋帽 > 男装 > 磁盘免疫 批处理程序源码

磁盘免疫 批处理程序源码

luyued 发布于 2011-06-04 13:16   浏览 N 次  

**********************************************************************************************************

@echo off
color 07
MODE con: COLS=82 LINES=25
title 磁盘免疫(草泥马4.0版)--孙运元
echo ┏┓ ┏┓
echo ┏┛┻━━━┛┻┓ *****************************************
echo ┃ ┃ * ****************************** *
echo ┃ ━ ┃ * * * *
echo ┃ ┳┛ ┗┳ ┃ * * 欢迎使用磁盘免疫 * *
echo ┃ ┃ * * 草泥马版绿色批命令 * *
echo ┃ ┻ ┃ * * E-mail:632114632@qq.com * *
echo ┃ ┃ * * 编辑人:孙运元 章怡 * *
echo ┗━┓ ┏━┛ * * * *
echo ┃ ┃ * ****************************** *
echo ┃ ┃ *****************************************
echo ┃ ┗━━━┓
echo ┃ ┣┓
echo ┃ ┏┛
echo ┗┓┓┏━┳┓┏┛
echo ┃┫┫ ┃┫┫
echo ┗┻┛ ┗┻┛
pause

:main
cls
color 07
set tm1=%time:~0,2%
set tm2=%time:~3,2%
set tm3=%time:~6,2%
echo 现在是 %date% %tm1%点%tm2%分%tm3%秒
echo.
echo *********************************************************
echo * ******************************************** *
echo * * * * * *
echo * * 1.自动免疫 * 2.高级免疫 * 3.删除免疫 * *
echo * * * * * *
echo * ********************************************** *
echo * * * * * *
echo * * 4.安全打开 * 5.恶性免疫 * 6.绝对删除 * *
echo * * * * * *
echo * ********************************************** *
echo * * * * * *
echo * * 7.原理介绍 * 8.程序帮助 * 9.退出程序 * *
echo * * * * * *
echo * ******************************************** *
echo * 当前版本信息:磁盘免疫(草泥马4.0版) *
echo *********************************************************
echo ★☆★请选择要进行的操作,然后按回车☆★☆
echo ★☆★输入SYY即可获得批处理下的QQ强聊器☆★☆
echo.
set /p num=请输入对应数字(例:1):
if /I "%num%"=="1" goto _1
if /I "%num%"=="2" goto _2
if /I "%num%"=="3" goto _3
if /I "%num%"=="4" goto _4
if /I "%num%"=="5" goto _5
if /I "%num%"=="6" goto _6
if /I "%num%"=="7" goto _7
if /I "%num%"=="8" goto _8
if /I "%num%"=="9" goto _9
if /I "%num%"=="SYY" goto _syy
ECHO 选择无效!请按任意键回到主菜单并请重新输入!
PAUSE >nul & goto main

:_1
color b9
:ab1
set disk=C
goto ing
:c1
set disk=D
goto ing
:d1
set disk=E
goto ing
:e1
set disk=F
goto ing
:f1
set disk=G
goto ing
:g1
set disk=H
goto ing
:h1
set disk=I
goto ing
:i1
set disk=J
goto ing
:j1
set disk=K
goto ing
:K1
set disk=L
goto ing
:L1
set disk=M
goto ing
:M1
set disk=N
goto ing
:N1
set disk=O
goto ing
:O1
set disk=P
goto ing
:P1
set disk=Q
goto ing
:Q1
set disk=R
goto ing
:R1
set disk=S
goto ing
:S1
set disk=T
goto ing
:T1
set disk=U
goto ing
:
set disk=V
goto ing
:V1
set disk=W
goto ing
:W1
set disk=X
goto ing
:X1
set disk=Y
goto ing
:Y1
set disk=Z
goto ing
:Z1
echo.
ECHO 免疫完成,请按任意键回到主菜单入!
PAUSE >nul & goto main

:yes
rd %disk%:\~!~cnm(@) >nul
if exist %disk%:\autorun.inf del /f /q %disk%:\autorun.inf
if exist %disk%:\auto.exe goto auto.exe
if exist %disk%:\setup.exe goto setup.exe
if exist %disk%:\autorun.bin goto autorun.bin
if exist %disk%:\autorun.reg goto autorun.reg
if exist %disk%:\autorun.vbs goto autorun.vbs
for %%a in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do md %disk%:\%%a
for %%a in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do attrib +s +h +r +a %disk%:\%%a
for %%a in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do md %disk%:\%%a\勿删..\
for %%a in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do md %disk%:\%%a\try >nul
for %%d in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do if exist %disk%:\%%d\try (
goto s?ss
) ELSE (
goto lose )
:s?ss
echo 对%disk%盘免疫成功!
for %%a in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do rd %disk%:\%%a\try >nul
echo.
goto %disk%1
:lose
echo 对%disk%盘免疫未全部成功!
for %%a in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do rd %disk%:\%%a\try >nul
echo.
goto %disk%1
:ing
echo 正在对%disk%盘进行免疫……
md %disk%:\~!~cnm(@) >nul
if exist %disk%:\~!~cnm(@) (
goto yes
) ELSE (
echo.
SET /P Choice=若对您的电脑来说已经全部免疫完毕,请输入SYY回到主界面。反之则按Enter键继续!
IF /I "%Choice%"=="SYY" (
goto main
) else (
goto %disk%1 )
goto %disk%1 )
:autorun.bin
echo %disk%盘中存在文件autorun.bin,请移除后再次进行免疫操作!请按任意键回到主菜单!
PAUSE >nul & goto main
:auto.exe
echo %disk%盘中存在文件auto.exe,请移除后再次进行免疫操作!请按任意键回到主菜单!
PAUSE >nul & goto main
:setup.exe
echo %disk%盘中存在文件setup.exe,请移除后再次进行免疫操作!请按任意键回到主菜单!
PAUSE >nul & goto main
:autorun.reg
echo %disk%盘中存在文件autorun.reg,请移除后再次进行免疫操作!请按任意键回到主菜单!
PAUSE >nul & goto main
:autorun.vbs
echo %disk%盘中存在文件autorun.vbs,请移除后再次进行免疫操作!请按任意键回到主菜单!
PAUSE >nul & goto main

:_2
color 0c
echo.
SET high=
SET /p high=请输入您要免疫的磁盘:
::IF NOT "%delhigh%"=="" SET delhigh=%delhigh:~0,1%
goto highing
:highyes
rd %high%:\~!~cnm(@) >nul
if exist %high%:\autorun.inf del /f /q %high%:\autorun.inf
if exist %high%:\auto.exe goto auto.exe
if exist %high%:\setup.exe goto setup.exe
if exist %high%:\autorun.bin goto autorun.bin
if exist %high%:\autorun.reg goto autorun.reg
if exist %high%:\autorun.vbs goto autorun.vbs
for %%a in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do md %high%:\%%a
for %%a in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do attrib +s +h +r +a %high%:\%%a
for %%a in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do md %high%:\%%a\勿删..\
for %%a in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do md %high%:\%%a\try >nul
for %%d in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do if exist %high%:\%%d\try (
goto highs?ss
) ELSE (
goto highlose )
:highs?ss
echo 对%high%盘免疫成功!请按任意键回到主菜单!
for %%a in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do rd %high%:\%%a\try >nul
pause >nul & goto main
:highlose
echo 对%high%盘免疫未全部成功!请按任意键回到主菜单!
for %%a in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do rd %high%:\%%a\try >nul
pause >nul & goto main
:highing
echo 正在对%high%盘进行免疫……
md %high%:\~!~cnm(@) >nul
if exist %high%:\~!~cnm(@) (
goto highyes
) ELSE (
echo 请按任意键回到主菜单!
pause >nul & goto main )
:autorun.bin
echo %high%盘中存在文件autorun.bin,请移除后再次进行免疫操作!请按任意键回到主菜单!
PAUSE >nul & goto main
:auto.exe
echo %high%盘中存在文件auto.exe,请移除后再次进行免疫操作!请按任意键回到主菜单!
PAUSE >nul & goto main
:setup.exe
echo %high%盘中存在文件setup.exe,请移除后再次进行免疫操作!请按任意键回到主菜单!
PAUSE >nul & goto main
:autorun.reg
echo %high%盘中存在文件autorun.reg,请移除后再次进行免疫操作!请按任意键回到主菜单!
PAUSE >nul & goto main
:autorun.vbs
echo %high%盘中存在文件autorun.vbs,请移除后再次进行免疫操作!请按任意键回到主菜单!
PAUSE >nul & goto main

:_3
color ac
echo.
SET delt=
SET /p delt=请输入您要删除免疫的磁盘:
::IF NOT "%delt%"=="" SET delt=%delt:~0,1%
goto delting
:deltyes
rd %delt%:\~!~cnm(@) >nul
for %%d in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do if exist %delt%:\%%d (
goto deltgoon
) ELSE (
goto deltstop )
:deltgoon
for %%a in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do rd %delt%:\%%a\勿删..\
for %%a in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do attrib -s -h -r -a %delt%:\%%a
for %%a in (auto.exe,autorun.inf,autorun.bin,setup.exe,autorun.reg,autorun.vbs) do rd %delt%:\%%a
if exist %delt%:\autorun.inf goto deltlose
if exist %delt%:\auto.exe goto deltlose
if exist %delt%:\setup.exe goto deltlose
if exist %delt%:\autorun.bin goto deltlose
if exist %delt%:\autorun.reg goto deltlose
if exist %delt%:\autorun.vbs goto deltlose
:delts?ss
echo 对%delt%盘删除免疫成功!请按任意键回到主菜单!
pause >nul & goto main
:deltlose
echo 对%delt%盘删除免疫未全部成功!请按任意键回到主菜单!
pause >nul & goto main
:deltstop
echo 您不是用本程序做的免疫或免疫已被破坏,请对该盘重新免疫后尝试删除,或使用[绝对删除]!请按任意键回到主菜单!
PAUSE >nul & goto main
:delting
echo 正在对%delt%盘进行免疫……
md %delt%:\~!~cnm(@) >nul
if exist %delt%:\~!~cnm(@) (
goto deltyes
) ELSE (
echo 请按任意键回到主菜单!
pause >nul & goto main )

:_4
color 27
echo.
SET open=
SET /p open=请输入您要打开的磁盘(若需打开C盘,请输入C即可):
Start %open%:\
echo 请按任意键回到主菜单!
pause >nul & goto main

:_5
color b0
echo.
echo 1.对您的电脑进行恶性病毒的免疫(磁碟机和机器狗)
echo 2.删除您的电脑对于恶性病毒的免疫
echo.
SET exing=
SET /p exing=请输入您要进行的操作的代号:
if /I "%exing%"=="1" goto exing1
if /I "%exing%"=="2" goto exing2
ECHO 选择无效!请按任意键回到主菜单!
PAUSE >nul & goto main
:exing1
:检测机器狗
if exist %SystemRoot%\system32\packet.dll goto exingstop
if exist %SystemRoot%\system32\pthreadVC.dll goto exingstop
if exist %SystemRoot%\system32\wpcap.dll goto exingstop
if exist %SystemRoot%\system32\drivers\pcibus.sys goto exingstop
if exist %SystemRoot%\system32\drivers\pcidisk.sys goto exingstop
if exist %SystemRoot%\system32\drivers\pcihdd.sys goto exingstop
if exist %SystemRoot%\system32\drivers\phy.sys goto exingstop
if exist %SystemRoot%\system32\drivers\puid.sys goto exingstop
if exist %SystemRoot%\system32\drivers\usb32k.sys goto exingstop
if exist %SystemRoot%\system32\drivers\ati32srv.sys goto exingstop
if exist %SystemRoot%\system32\drivers\pop.sys goto exingstop
if exist %SystemRoot%\system32\drivers\fat32.sys goto exingstop
if exist %SystemRoot%\system32\drivers\wxptdi.sys goto exingstop
if exist %SystemRoot%\system32\drivers\msacl .sys goto exingstop
if exist %SystemRoot%\system32\com\csrss.exe goto exingstop
if exist %SystemRoot%\system32\2dogkiller.sys goto exingstop
if exist %SystemRoot%\system32\drivers\obj2.sys goto exingstop
:检测磁碟机
if exist %homedrive%NetApi000.sys goto exingstop
if exist %SystemRoot%\system32\Com\smss.exe goto exingstop
if exist %SystemRoot%\system32\Com\netcfg.dll goto exingstop
if exist %SystemRoot%\system32\Com\netcfg.000 goto exingstop
if exist %SystemRoot%\system32\Com\lsass.exe goto exingstop
if exist %SystemRoot%\system32\Com\mfc42.dll goto exingstop
if exist %SystemRoot%\system32\dnsq.dll goto exingstop

md %homedrive%NetApi000.sys
attrib +s +h +r +a %homedrive%NetApi000.sys
md %homedrive%NetApi000.sys\勿删..\
for %%e in (packet.dll,pthreadVC.dll,wpcap.dll,dnsq.dll,2dogkiller.sys) do md %SystemRoot%\system32\%%e
for %%e in (packet.dll,pthreadVC.dll,wpcap.dll,dnsq.dll,2dogkiller.sys) do attrib +s +h +r +a %SystemRoot%\system32\%%e
for %%e in (packet.dll,pthreadVC.dll,wpcap.dll,dnsq.dll,2dogkiller.sys) do md %SystemRoot%\system32\%%e\勿删..\
for %%e in (pcibus.sys,pcidisk.sys,pcihdd.sys,phy.sys,puid.sys,usb32k.sys,ati32srv.sys,pop.sys,fat32.sys,wxptdi.sys,msacl .sys,obj2.sys) do md %SystemRoot%\system32\drivers\%%e
for %%e in (pcibus.sys,pcidisk.sys,pcihdd.sys,phy.sys,puid.sys,usb32k.sys,ati32srv.sys,pop.sys,fat32.sys,wxptdi.sys,msacl .sys,obj2.sys) do attrib +s +h +r +a %SystemRoot%\system32\drivers\%%e
for %%e in (pcibus.sys,pcidisk.sys,pcihdd.sys,phy.sys,puid.sys,usb32k.sys,ati32srv.sys,pop.sys,fat32.sys,wxptdi.sys,msacl .sys,obj2.sys) do md %SystemRoot%\system32\drivers\%%e\勿删..\
for %%e in (csrss.exe,smss.exe,netcfg.dll,netcfg.000,lsass.exe,mfc42.dll) do md %SystemRoot%\system32\com\%%e
for %%e in (csrss.exe,smss.exe,netcfg.dll,netcfg.000,lsass.exe,mfc42.dll) do attrib +s +h +r +a %SystemRoot%\system32\com\%%e
for %%e in (csrss.exe,smss.exe,netcfg.dll,netcfg.000,lsass.exe,mfc42.dll) do md %SystemRoot%\system32\com\%%e\勿删..\
echo 您的电脑已经对恶性病毒产生免疫!请按任意键回到主菜单!
PAUSE >nul & goto main

:exing2
rd %homedrive%NetApi000.sys\勿删..\
attrib -s -h -r -a %homedrive%NetApi000.sys
rd %homedrive%NetApi000.sys
for %%e in (packet.dll,pthreadVC.dll,wpcap.dll,dnsq.dll,2dogkiller.sys) do rd %SystemRoot%\system32\%%e\勿删..\
for %%e in (packet.dll,pthreadVC.dll,wpcap.dll,dnsq.dll,2dogkiller.sys) do attrib -s -h -r -a %SystemRoot%\system32\%%e
for %%e in (packet.dll,pthreadVC.dll,wpcap.dll,dnsq.dll,2dogkiller.sys) do rd %SystemRoot%\system32\%%e
for %%e in (pcibus.sys,pcidisk.sys,pcihdd.sys,phy.sys,puid.sys,usb32k.sys,ati32srv.sys,pop.sys,fat32.sys,wxptdi.sys,msacl .sys,obj2.sys) do rd %SystemRoot%\system32\drivers\%%e\勿删..\
for %%e in (pcibus.sys,pcidisk.sys,pcihdd.sys,phy.sys,puid.sys,usb32k.sys,ati32srv.sys,pop.sys,fat32.sys,wxptdi.sys,msacl .sys,obj2.sys) do attrib -s -h -r -a %SystemRoot%\system32\drivers\%%e
for %%e in (pcibus.sys,pcidisk.sys,pcihdd.sys,phy.sys,puid.sys,usb32k.sys,ati32srv.sys,pop.sys,fat32.sys,wxptdi.sys,msacl .sys,obj2.sys) do rd %SystemRoot%\system32\drivers\%%e
for %%e in (csrss.exe,smss.exe,netcfg.dll,netcfg.000,lsass.exe,mfc42.dll) do rd %SystemRoot%\system32\com\%%e\勿删..\
for %%e in (csrss.exe,smss.exe,netcfg.dll,netcfg.000,lsass.exe,mfc42.dll) do attrib -s -h -r -a %SystemRoot%\system32\com\%%e
for %%e in (csrss.exe,smss.exe,netcfg.dll,netcfg.000,lsass.exe,mfc42.dll) do rd %SystemRoot%\system32\com\%%e
echo 您的电脑已经对恶性病毒失去免疫!请按任意键回到主菜单!
PAUSE >nul & goto main

:exingstop
echo 您的电脑中已经存在病毒文件或已经用其他软件进行过免疫!请按任意键回到主菜单!
PAUSE >nul & goto main

:_6
color e1
echo.
echo 此功能会在C盘的盘根创建一个名为“绝对删除.bat”的文件。如果你欲删除一个文件或文件夹,请将该文件或文件夹拖至绝对删除.bat文件上,即可自动删除。
pause
Echo @echo off>c:\绝对删除.bat
Echo goto mm>>c:\绝对删除.bat
Echo :ok>>c:\绝对删除.bat
Echo DEL /F /A /Q >c:\">\\?\%%1>>c:\绝对删除.bat
Echo RD /S /Q >c:\">\\?\%%1>>c:\绝对删除.bat
Echo goto e>>c:\绝对删除.bat
Echo :mm>>c:\绝对删除.bat
Echo set /p password=请输入密码(密码为SYY):>>c:\绝对删除.bat
Echo IF /I "%%password%%"=="SYY" goto ok>>c:\绝对删除.bat
Echo :e>>c:\绝对删除.bat
echo 创建完成!请按任意键回到主菜单!
pause >nul & goto main

:_7
color 2e
echo 原理介绍:通过autorun.inf自动运行的病毒一般会在您每个磁盘盘根建立至少2个文件。其一:病毒主体*.exe文件;其二:autorun.inf文件,autorun.inf这文件本身不是病毒,但是病毒必须借此文件来让自己被运行,所以本程序可以事先做好免疫,防止被病毒建立autorun.inf文件或篡改。本程序可以在你想免疫的盘根建立隐藏的6个文件夹,分别名为:auto.exe、autorun.inf、autorun.bin、setup.exe、autorun.reg、autorun.vbs并采取手段对其保护,所以用户使用正常的方法是删除不掉的(这也是为了免疫效果的考虑),说道这里免疫原理你已经知道了吧?--Windows规定在同一目录中,同名的文件和文件夹不能共存!所以就算中了磁盘病毒,它也不能使自己被运行,也就起到了免疫的效果!
echo.
echo 请按任意键回到主菜单!
pause >nul & goto main

:_8
color e2
echo 程序帮助:
echo 1.[自动免疫] 从C盘至Z盘逐个检测分区,如存在分区则自动免疫,如不存在分区则会询问用户
echo 2.[高级免疫] 您可以免疫你想免疫的任何分区!
echo 3.[删除免疫] 您可以在任何你想删除的分区删除免疫,只要是本程序所做的免疫都可以删除!
echo 4.[安全打开] 如果你已知U盘感染病毒或不确定此U盘是否无毒,又想打开,您就可以使用此功能!
echo 5.[恶性免疫] 会对恶性病毒进行免疫(磁碟机和机器狗),也可以做删除操作!
echo 6.[绝对删除] 此功能使用绝对路径的方式对文件或文件夹进行删除,所以只要确实存在您电脑中的文件或文件夹且没有被其他软件占用(没有被使用),就一定可以对其删除!
echo 7.请严格按照提示操作,如违反后果自负!
echo 8.如有任何问题请与我联系,如有任何建议和意见也请随时联系我!谢谢!
echo 9.本程序版权属于孙运元所有。
echo.
echo 请按任意键回到主菜单!
pause >nul & goto main

:_syy
echo.
echo 即将在C盘的盘根创建一个名为“批处理下的QQ强聊器.bat”的文件。
pause
echo @ECHO off>c:\批处理下的QQ强聊器.bat
echo COLOR 1f>>c:\批处理下的QQ强聊器.bat
echo MODE con: COLS=53 LINES=13>>c:\批处理下的QQ强聊器.bat
echo title 强行聊天工具“我想跟你聊”>>c:\批处理下的QQ强聊器.bat
echo echo.>>c:\批处理下的QQ强聊器.bat
echo Set/p qq=请输入你想和他/她聊的QQ号码(然后回车): >>c:\批处理下的QQ强聊器.bat
echo start tencent://Message/?Uin=%%qq%%>>c:\批处理下的QQ强聊器.bat
echo 创建完成!请按任意键回到主菜单!
pause >nul & goto main

:_9
cls
echo ┏┓ ┏┓
echo ┏┛┻━━━┛┻┓ *****************************************
echo ┃ ┃ * ****************************** *
echo ┃ ━ ┃ * * * *
echo ┃ ┳┛ ┗┳ ┃ * * 欢迎再次使用本程序 * *
echo ┃ ┃ * * 草泥马版绿色批命令 * *
echo ┃ ┻ ┃ * * E-mail:632114632@qq.com * *
echo ┃ ┃ * * 编辑人:孙运元 章怡 * *
echo ┗━┓ ┏━┛ * * * *
echo ┃ ┃ * ****************************** *
echo ┃ ┃ *****************************************
echo ┃ ┗━━━┓
echo ┃ ┣┓
echo ┃ ┏┛
echo ┗┓┓┏━┳┓┏┛
echo ┃┫┫ ┃┫┫
echo ┗┻┛ ┗┻┛
echo 按任意键退出程序!
pause >nul

exit

**********************************************************************************************************

复制“***”之间的内容,粘贴到TXT文档,后缀改为bat文件,双击即可使用。

全部源码,看得懂的可以看下,大家交流!有BUG请联系QQ:632114632

广告赞助商