ASP源程序里这是经典的上传漏洞吗?求高手解码
ClassFileInfo_ClassDimFormName,FileName,FilePath,FileSize,FileType,FileStart,FileExt'...
Class FileInfo_ClassDim FormName,FileName,FilePath,FileSize,FileType,FileStart,FileExt'保存文件方法Public Function SaveToFile (Path) if lcase((right(Path,3))<>lcase(FileExt)) then '经典的上传漏洞^_^ response.Write ("<script language=javascript>alert('科技警告:不允许上传这种文件!');</script>") response.end end if On Error Resume Next Dim oFileStream Set oFileStream = CreateObject ("ADODB.Stream") oFileStream.Type = 1 oFileStream.Mode = 3 oFileStream.Open oUpFileStream.Position = FileStart oUpFileStream.CopyTo oFileStream,FileSize oFileStream.SaveToFile Path,2 oFileStream.Close Set oFileStream = Nothing End Function '取得文件数据Public Function FileData oUpFileStream.Position = FileStart FileData = oUpFileStream.Read (FileSize)End FunctionEnd Class%>
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询