首页 | 业界新闻 | 黑客教程 | 安全漏洞 | 安全文章 | 破解技术 | 技术文摘 | 黑客文化 | 本站原创 | 安全贴吧 | 在线留言 | IP查询 | 软件下载 | 繁体中文 |
您现在的位置: 黑色反击 >> 技术资讯 >> 安全漏洞 >> 其他漏洞 >> 正文
动易上传漏洞分析
时间:2005-2-24 23:41:29 出处:网络 作者:未知 编辑:mervin 点击数:

影响版本: 动易所有版本包括论坛

<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true
Server.ScriptTimeOut=9999999
%>
<!--#include file="../conn.asp"-->
<!--#include file="../inc/function.asp"-->
<!--#include file="../inc/upfile_class.asp"-->
<%
const upload_type=0 '上传方法:0=无惧无组件上传类,1=FSO上传 2=lyfupload,3=aspupload,4=chinaaspupload


dim ChannelID
dim AdminName
dim EnableUploadFile,MaxFileSize,UpFileType,SavePath,SavePath2
dim objUpload,oFile,FormName,strFileName,FileExt
dim ImgWidth,ImgHeight,AlignType
dim EnableUpload
dim arrUpFileType
dim ranNum,i,strJS,msg,dtNow '这些定义上传变量
AdminName=trim(session("AdminName")) '判断seesion值是否正确
UserName=trim(request.Cookies("asp163")("UserName")) '判断cookie
msg=""
FoundErr=false
EnableUpload=false '上面这些定义了,如果seesion和cookie不合法,就出错
dtNow=Now()
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
BODY{
BACKGROUND-COLOR: #E1F4EE;
font-size:9pt
}
-->
</style>
</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<%
if AdminName="" and UserName="" then '如果admin和username为空就出错,如果假的不为空的用户名会怎么样呢,但是上面的要注意
response.Write("请登录后再使用本功能!")
else
select case upload_type
case 0
call upload_0() '使用化境无组件上传类
case else
'response.write "本系统未开放插件功能"
'response.end
end select
end if
call CloseConn()
%>
</body>
</html>
<%
sub upload_0() '使用化境无组件上传类
set objUpload=new upfile_class ''建立上传对象
objUpload.GetData(104857600) '取得上传数据,限制最大上传100M
if objUpload.err > 0 then '如果出错
select case objUpload.err
case 1
response.write "请先选择你要上传的文件!"
case 2
response.write "你上传的文件总大小超出了最大限制(100M)"
end select
response.end
end if


'开始了对ChannelID的判断
ChannelID=trim(objUpload.form("ChannelID"))
if ChannelID="" then '判断了,如果为空就出错


response.write "频道参数丢失!"
exit sub '原来平时丢失的原因是因为ID不合要求
end if
ChannelID=Clng(ChannelID)
sqlChannel="select * from PE_Channel where ChannelID=" & ChannelID
set rsChannel=server.createObject("adodb.recordset")
rsChannel.open sqlChannel,conn,1,1
if rsChannel.bof and rsChannel.eof then
response.write "找不到此频道"
FoundErr=True '变量出错
end if
if rsChannel("Disabled")=True then
response.write "此频道已经被禁用!"
FoundErr=True '上面进行对频道出错的判断和处理
else
EnableUploadFile=rsChannel("EnableUploadFile")
MaxFileSize=rsChannel("MaxFileSize")
SavePath=strInstallDir & rsChannel("ChannelDir") & "/UploadSoftPic/" '保存的路径
UpFileType=rsChannel("UpFileType") '成功上传对大小,路径,类型的处理
end if
rsChannel.close
set rsChannel=nothing
if EnableUploadFile=False then
response.write "本频道未开放文件上传功能"
FoundErr=True

[1] [2] [3] 下一页

精彩推荐
hack菜鸟入门
VB 从零开始编外挂(完
IPC入侵全接触
QQ跨站漏洞巧利用,强
WinXP中CPU占用100%原
黑客新技术 灰鸽子巧妙
实例讲解 黑客入侵论坛
ADSL共享上网方式大总
BMP文件格式分析
十招教你学会破解
热门软件
网 友 评 论
关于我们 - 联系方式 - 招聘信息 - 合作伙伴 - 网站地图 - 广告服务 - 我要投稿 - 设为首页 - 加入收藏
黑色反击 力倡网络安全,崇尚互联共享,欢迎各种媒体转载我们的原创作品 [转载请注明出处]。
EMAIL:hf110.com@gmail.com 备案:苏ICP备05010002号