请帮我测试一下这个ASP上传程序的安全性

来源:百度知道 编辑:UC知道 时间:2024/05/21 23:50:30
偶是只ASP菜鸟,对文件上传程序一直很不放心,这是我用化境无组件上传改装的,上传文件地址是:
http://wooderhaha.brinkster.net/u1.asp
代码如下:
'文件头部开始,包含文件里的,有省略,可以不看
<%
dim Data_5xsoft

Class upload_5xsoft

dim objForm,objFile

Public function Form(strForm)
strForm=lcase(strForm)
if not objForm.exists(strForm) then
Form=""
else
Form=objForm(strForm)
end if
end function

Public function File(strFile)
strFile=lcase(strFile)
if not objFile.exists(strFile) then
set File=new FileInfo
else
set File=objFile(strFile)
end if
end function

Private Sub Class_Initialize

'... ...

End Sub

Private Sub Class_Terminate
if Request.TotalBytes>0 then
objForm.RemoveAll
objFile.RemoveAll
set o

修改你的程序谈不上,但是我个人的看法是这样的
首先,密码不应该明文出现在页面中,你可以去网上找一个 MD5.asp 的文件(里面是一个把字符串用MD5加密的方法),在
if request.querystring("act")="up" and pwd="abc123" then
处更改为
if request.querystring("act")="up" and pwd=MD5加密后的字符串 then

这样,你的程序肯定是安全的。
另外 破解MD5加密是需要很长时间的。