您的位置:首页资讯教你一招 → 声音文件 MP3.RM.RAM.WMV.ASF.WMA 无限目录读取下载系统

声音文件 MP3.RM.RAM.WMV.ASF.WMA 无限目录读取下载系统

时间:2004/10/15 1:16:00来源:本站整理作者:蓝点我要评论(0)

  大家测试看看代码安全不??:(:(:(:(:(

http://www.7765.com/mp3/

以下代码可以随便改任意*.asp名字!

=========================================

<%@ LANGUAGE = VBScript %>
<%Server.ScriptTimeout=5000%>


声音文件 MP3.RM.RAM.WMV.ASF.WMA 无限目录读取下载系统!


<%
okdir="E:\music\kevan\mp3"

'=============== 默 认 读 取 路 径 开 始 =====================

'_______________________{Power by kevanTM All Rights Reserved.}_________________________

bys=17

'=====安全路径保护字节限制,例如:[ E:\music\kevan\mp3 ]中共有18-1个字节=============

thisdir=Request("Path")

if thisdir="" or len(thisdir)
thisdir=okdir

end if
%>
<%
k=5
e=0
v=0
a=2
n=1
t=3
e=8
l=8
Response.Write""& vbCrLf
if Request.QueryString("mp3")<>"" then
FileName = Request.QueryString("mp3")
strFile=FileName
if FileName="" or len(FileName)<17 Then
  Response.Write("

错误:

无效文件名!请您不要乱提交参数路径!

")
    Response.End
End if
FileExt = Mid(FileName, InStrRev(FileName, ".") + 1)
Select Case UCase(FileExt)
    Case "ASP", "ASA", "ASPX", "ASAX", "MDB"
  Response.Write("

错误:

" & FileName & " KevanTM系统强行禁止您不许下载这个文件!

")
  Response.End
End Select
strFilename = strFile
Response.Buffer = True
Response.Clear
Set s = Server.CreateObject("ADODB.Stream")
s.Open
s.Type = 1
on error resume next
Set fso = Server.CreateObject("Scripting.FileSystemObject")
if not fso.FileExists(strFilename) then
  Response.Write("

错误:

" & strFilename & " 该文件不存在于服务器里面!

")
  Response.End
end if
Set f = fso.GetFile(strFilename)
intFilelength = f.size
s.LoadFromFile(strFilename)
if err then
  Response.Write("

错误:

" & err.Description & " 无数据流!

")
  Response.End
end if
Response.AddHeader "Content-Disposition", "attachment; filename=" & f.name
Response.AddHeader "Content-Length", intFilelength
Response.CharSet = "UTF-8"
Response.ContentType = "application/octet-stream"
  Response.BinaryWrite s.Read
Response.Flush
s.Close
Set s = Nothing
response.end
end if

Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set fdir=fs.GetFolder(thisdir)
response.write "

"
function getUpfoldersString(temp)

temps=StrReverse(temp)
temps=replace(temps,"/","\")
if right(temp,1)="\" or right(temp,1)="/" then
temps=replace(temp,"\","")
end if
temps=StrReverse(mid(temps,inStr(temps,"\")+1))
getUpfoldersString=temps

End function

if Request("Path")<>"" or len(Request("Path"))>bys then
response.write ""
else
response.write ""
if right(thisdir,1)="\" or right(thisdir,1)="/" then
   thisdir=replace(thisdir,"\","")
end if
end if
dim i
For each thing in fdir.SubFolders
Response.Write ""
Next
response.write "
[ 点击这里返回上一级目录 ]  当前目录为:"&thisdir&"
[ 首 目 录 列 表 ]
------------------->  [ " & thing.Name & " ]注释:" & thing.Name & "目录文件夹
"
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set fdir=fs.GetFolder(thisdir)
response.write ""
response.write ""
dim strExt
For each thing in fdir.Files
response.write ""
'==================================读取.mp3文件格式===========================
        strExt=lcase(right(thing.Name,4))
        select case strExt
        case ".mp3"
Response.Write ""
response.write ""
        end select
'==================================读取.wma文件格式===========================
        strExt=lcase(right(thing.Name,4))
        select case strExt
        case ".wma"
Response.Write ""
response.write ""
        end select
'==================================读取.wmv文件格式===========================
        strExt=lcase(right(thing.Name,4))
        select case strExt
        case ".wmv"
Response.Write ""
response.write ""
        end select
'==================================读取.rm文件格式===========================
        strExt=lcase(right(thing.Name,3))
        select case strExt
        case ".rm"
Response.Write ""
response.write ""
        end select
'==================================读取.asf文件格式===========================
        strExt=lcase(right(thing.Name,4))
        select case strExt
        case ".asf"
Response.Write ""
response.write ""
        end select
'==================================读取.ram文件格式===========================
strExt=lcase(right(thing.Name,4))
        select case strExt
        case ".ram"
Response.Write ""
response.write ""
        end select
'==================================读取结束===================================
response.write ""
Next
response.write "
声音文件名称体积大小音频类型
" & thing.Name &  "" & cstr(thing.size) & "" & thing.type &"" & thing.Name &  "" & cstr(thing.size) & "" & thing.type &"" & thing.Name &  "" & cstr(thing.size) & "" & thing.type & "" & thing.Name &  "" & cstr(thing.size) & "" & thing.type & "" & thing.Name &  "" & cstr(thing.size) & "" & thing.type & "" & thing.Name &  "" & cstr(thing.size) & "" & thing.type & "
"
response.write "

已经完成读取该< "&thisdir&" >目录里所有的声音文件,读取结束完毕!
"
set fs=nothing
%>



=========================================

相关阅读 Windows错误代码大全 Windows错误代码查询激活windows有什么用Mac QQ和Windows QQ聊天记录怎么合并 Mac QQ和Windows QQ聊天记录Windows 10自动更新怎么关闭 如何关闭Windows 10自动更新windows 10 rs4快速预览版17017下载错误问题Win10秋季创意者更新16291更新了什么 win10 16291更新内容windows10秋季创意者更新时间 windows10秋季创意者更新内容kb3150513补丁更新了什么 Windows 10补丁kb3150513是什么

文章评论
发表评论

热门文章 电视盒子怎么看百度云迅雷9怎么关闭右侧 迅迅雷99.99下载不完怎么网易云音乐怎么上传歌

最新文章 2022支付宝万能福扫福微信迎新春状态怎么设 微信小老虎头像怎么设置 微信ID后面设置小老抖音压岁钱卡怎么获得2022 抖音压岁钱获取方微博隐私保护怎么设置 微博隐私保护功能完善今日头条2022年集卡活动开启时间 今日头条2

人气排行 智学网怎么登录 智学网怎么查分数 智学网统教你怎么写电子邮箱格式?以163和QQ邮箱为例腾讯大王卡用了后悔怎么办 腾讯大王卡值得办缺少或丢失xinput1_3.dll解决方法,xinput1应用程序无法正常启动0xc000007b解决方法快播关闭怎么办?快播不能用了怎么看片将pdf文件转换为word文件的最简单方法如何破解QQ空间密码和权限