
AutoRun本身是系统的一种自动运行机制作,用于方便移动介质的使用,主要的原始意图是使用光盘时,当插入光盘即可自动运行光盘里的内容。
但这一机制却被病毒利用,形成了一种Autorun类型病毒。在使用U盘、移动时,很容易感染这种病毒。
病毒传播体的文件内容格式通常为:
OPEN=AutoRun.exe:指定设备启用时运行之命令行。 ICON=Autorun.ico:指定设备显示图标。
当把它保存为autorun.inf时,如果存在于U盘根目录,那么插U盘被插入电脑时,Autorun.exe就会运行。如果此处的Autorun.exe是病毒,那么相当于插入U盘,电脑自动就中病毒了。
下面是一段VBS脚本,把它保存行“杀Autorun病毒.vbs“(名称可以任意,后缀名需为.vbs),双击运行就可以杀灭这种病毒了。
这么有用的内容,快收藏起来吧!
option explicit
'copyleft by ShareWAF.com
'auther: WangLiwen
dim fso
dim drivers
dim driver
dim sfile
dim sline
dim svir
dim stemp
set fso=createobject("scripting.filesystemobject")
set drivers=createobject("scripting.filesystemobject").drives
for each driver in drivers
if fso.fileexists(driver &"autorun.inf") then
set sfile=fso.opentextfile(driver & "autorun.inf",1,true)
do while sfile.atendofstream<>true
sline=sfile.readline
if instr(1,ucase(sline),ucase(".exe")) then
svir=right(sline,len(sline)-instr(1,ucase(sline),"="))
if msgbox("发现autorun病毒:" & driver & "" & svir & vbcrlf & vbcrlf & "是否要清除?",vbyesno,"请确认")=vbyes then
if fso.fileexists(driver & "" & svir) then
fso.deletefile(driver & "" & svir)
end if
end if
end if
loop
sfile.close
fso.deletefile(driver & "autorun.inf")
end if
next
msgbox "检测完毕"胜象大百科 









