淘特ASP木马扫描器的代码(9)
If Lcase(FileExt) = Ext(i) Then
CheckExt = True
Exit Function
End If
Next
End Function
'删除文件
Sub DelFile(FilePath)
Set fso = Server.CreateObject("Scripting.FileSystemObject")
if fso.FileExists(FilePath) then
fso.DeleteFile(FilePath)
Response.Write("<h2>成功删除文件:</h2>" &FilePath)
else
response.Write("<h2>删除失败!文件:"&FilePath&"没有找到!</2>")
end if
set fso=nothing
end Sub
'下载文件
sub Download(FilePath)
dim oStream
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
if FSO.FileExists(FilePath) then
set oStream=Server.CreateObject("ADODB.Stream")
oStream.Type=1
oStream.Open
on error resume next
oStream.LoadFromFile(FilePath)
if Err.Number=0 then
Response.AddHeader "Content-Disposition", "attachment; filename=" & FSO.GetFileName(FilePath)
Response.AddHeader "Content-Length", oStream.Size
Response.ContentType="bad/type" 'yeu cau ie hien hop thoai save-as
Response.BinaryWrite oStream.Read
end if
oStream.Close
set oStream=nothing
end if
set FSO=nothing
end sub
Function GetDateModify(filepath)
dim s,days
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(filepath)
内容版权声明:除非注明,否则皆为本站原创文章。