用Asp隱藏檔案路徑,實現防盜煉

2021-03-31 17:28:08 字數 1129 閱讀 7798

示例**:

response.write "非法鏈結!" '防止盜鏈

response.end

end if

if request.cookies("logined")="" then

response.redirect "/login.asp" '需要登陸!

end if

function getfilename(longname)'/folder1/folder2/file.asp=>file.asp

while instr(longname,"/")

longname = right(longname,len(longname)-1)

wend

getfilename = longname

end function

dim stream

dim contents

dim filename

dim truefilename

dim fileext

const adtypebinary = 1

filename = request.querystring("filename")

if filename = "" then

response.write "無效/webpage/asp/041101/24.htm!"

response.end

end if

fileext = mid(filename, instrrev(filename, ".") + 1)

select case ucase(fileext)

case "asp", "asa", "aspx", "asax", "mdb"

response.write "非法操作!"

response.end

end select

用Asp隱藏檔案路徑,實現防盜煉

用asp隱藏檔案路徑,實現防盜煉 示例 response.write 非法鏈結!防止盜鏈 response.end end if if request.cookies logined then response.redirect login.asp 需要登陸!end if function getf...

用Asp隱藏檔案路徑實現防盜煉

示例 response.write 非法鏈結!防止盜鏈 response.end end if if request.cookies logined then response.redirect login.asp 需要登陸!end if function getfilename longname ...

用Asp隱藏檔案路徑實現防盜煉

示例 response.write 非法鏈結!防止盜鏈 response.end end if if request.cookies logined then response.redirect login.asp 需要登陸!end if function getfilename longname ...