最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp 显示目录下载所有文件夹与文件
时间:2022-06-30 09:14:00 编辑:袖梨 来源:一聚教程网
asp 显示目录下载所有文件夹与文件
Sub ShowAllFile(Path)
Set F1SO = CreateObject("Scripting.FileSystemObject")
if not F1SO.FolderExists(path) then exit sub
Set f = F1SO.GetFolder(Path)
Set fc2 = f.files
For Each myfile in fc2
If CheckExt(F1SO.GetExtensionName(path&""&myfile.name)) Then
Call ScanFile(Path&Temp&""&myfile.name, "")
SumFiles = SumFiles + 1
End If
Next
Set fc = f.SubFolders
For Each f1 in fc
ShowAllFile path&""&f1.name
SumFolders = SumFolders + 1
Next
Set F1SO = Nothing
End Sub
Sub ScanFile(FilePath, InFile)
Server.ScriptTimeout=999999999
If InFile "" Then
Infiles = "该文件被)&""" target=_blank>"& InFile & "文件包含执行"
End If
Set FSO1s = CreateObject("Scripting.FileSystemObject")
on error resume next
set ofile = FSO1s.OpenTextFile(FilePath)
filetxt = Lcase(ofile.readall())
If err Then Exit Sub end if
if len(filetxt)>0 then
filetxt = vbcrlf & filetxt
temp = ""))&""" target=_blank>"&replace(FilePath,server.MapPath("")&"","",1,1,1)&"
"
temp=temp&"")&""",""EditFile"")' class='am' title='编辑'>Edit "
temp=temp&" onclick='return yesok()' class='am' title='删除'>Del "
temp=temp&" class='am' title='复制'>Copy "
temp=temp&" class='am' title='移动'>Move"
If instr( filetxt, Lcase("WScr"&DoMyBest&"ipt.Shell") ) or Instr( filetxt, Lcase("clsid:72C24DD5-D70A"&DoMyBest&"-438B-8A42-98424B88AFB8") ) then
Report = Report&"
"&GetDateModify(filepath)&"
Sun = Sun + 1
temp="-同上-"
End if
If instr( filetxt, Lcase("She"&DoMyBest&"ll.Application") ) or Instr( filetxt, Lcase("clsid:13709620-C27"&DoMyBest&"9-11CE-A49E-444553540000") ) then
Report = Report&"
"&GetDateModify(filepath)&"
Sun = Sun + 1
temp="-同上-"
End If
Set regEx = New RegExp
regEx.IgnoreCase = True
regEx.Global = True
regEx.Pattern = "bLANGUAGEs*=s*[""]?s*(vbscript|jscript|javascript).encodeb"
If regEx.Test(filetxt) Then
Report = Report&"
"&GetDateModify(filepath)&"
Sun = Sun + 1
temp="-同上-"
End If
regEx.Pattern = "bEv"&"alb"
If regEx.Test(filetxt) Then
Report = Report&"
但是javascript代码中也可以使用,有可能是误报。"&infiles&"
"&GetDateModify(filepath)&"
Sun = Sun + 1
temp="-同上-"
End If
regEx.Pattern = "[^.]bExe"&"cuteb"
If regEx.Test(filetxt) Then
Report = Report&"
"&infiles&"
"&GetDateModify(filepath)&"
Sun = Sun + 1
temp="-同上-"
End If
regEx.Pattern = ".(Open|Create)TextFileb"
If regEx.Test(filetxt) Then
Report = Report&"
"&GetDateModify(filepath)&"
Sun = Sun + 1
temp="-同上-"
End If
regEx.Pattern = ".SaveToFileb"
If regEx.Test(filetxt) Then
Report = Report&"
"&GetDateModify(filepath)&"
Sun = Sun + 1
temp="-同上-"
End If
regEx.Pattern = ".Saveb"
If regEx.Test(filetxt) Then
Report = Report&"
"&GetDateModify(filepath)&"
Sun = Sun + 1
temp="-同上-"
End If
Set regEx = Nothing
Set regEx = New RegExp
regEx.IgnoreCase = True
regEx.Global = True
regEx.Pattern = "
相关文章
- 迅雷浏览器手机版APP下载安装包-迅雷浏览器安卓最新正式版下载 12-17
- 天下万象平民玩家职业选择推荐 12-17
- 哔咔漫画iOS入口极速适配-哔咔漫画iOS入口秒速加载 12-17
- 新三国志曹操传马超无双试炼五通关攻略 12-17
- 知乎网页版入口在哪里?直接打开方法 12-17
- 小红书电脑版网页版-PC端官方入口 12-17