第一步:下载 eWebEditor2.8 修正版 下载地址 ewebeditor.webasp.net/download.asp 解压放到项目文件目录下. 为了方便使用我把文件改名为 ewebeditor 第二步:修改相关调用到编辑器的 ASP 文件
第三步:修改 eWebEditor 编辑器 1,使之支持插入分页符 打开 eWebEditor/db/ewebeditor.mdb => 打开 eWebEditor_Button 表=> 在倒数的 21 行 B_Title 字段的值为”显示或隐藏指导方针”修改为”插入
系统分页符” B_Event 字段的值为” showBorders()”修改为” insert('SplitPage')” 打开 WebEditor/Include/Editor.js 在 777 行之前插入 case "SplitPage": // 插入分页符 insertHTML("
"); break; 2,修改编辑器上传文件的保存路径 打开 eWebEditor_Style 表 找到你使用的样式所在的行,我用的是 s_newssystem 修改 S_UploadDir 字段 的值 我是改成../../../UpLoadFiles/ 这样我用编辑器上传的图片等都会在根目录的 UpLoadFiles 文件夹下. 第四步:编辑器的安全性 1、先用 admin 登录到后台,修改密码,然后删除 admin_login.asp 文件,如果 不需要上传的话,最好连 upload.asp 也一起删除掉。
2、删除 Manage/ Library/ ewebeditor 文件夹下所有以 Admin_开头的文件. 删除 Admin 文件夹(里面是对我们无用的图片),删除 Example 文件夹 (eWebEditor 示例). 以下是我的个人总结,只代表个人观点 1.修改 eWebEditor 的数据库名字.
2.删除 eWebEditor 后台管理文件 3.修改 Upload.asp 文件 在 Upload.asp 文件里面,找到这句话 sAllowExt = Replace(UCase(sAllowExt), "ASP", "") 把这句话替换为 Do While InStr(sAllowExt, "ASP") or InStr(sAllowExt, "CER") or InStr(sAllowExt, "ASA") or InStr(sAllowExt, "CDX") or InStr(sAllowExt, "HTR") sAllowExt = Replace(sAllowExt, "ASP", "") sAllowExt = Replace(sAllowExt, "CER", "") sAllowExt = Replace(sAllowExt, "ASA", "") sAllowExt = Replace(sAllowExt, "CDX", "") sAllowExt = Replace(sAllowExt, "HTR", "") sAllowExt = Replace(sAllowExt, "CGI", "") sAllowExt = Replace(sAllowExt, "ASPX", "")' sAllowExt = Replace(sAllowExt, "ASP .JPG", "") sAllowExt = Replace(sAllowExt, "CER .JPG", "") sAllowExt = Replace(sAllowExt, "ASA .JPG", "") sAllowExt = Replace(sAllowExt, "CDX .JPG", "") sAllowExt = Replace(sAllowExt, "HTR .JPG", "") sAllowExt = Replace(sAllowExt, "CGI .JPG", "") sAllowExt = Replace(sAllowExt, "ASPX .JPG", "") Loop EWebEditor 漏洞改进方法: 1.在 EWebEditor 中加入 IP 控制 <% ''建立连接 dim conn,connstr connstr="driver={sql server};server=.;uid=yst06;pwd=yst06;database=yst06" set conn=Server.Createobject("ADODB.Connection") conn.open connstr ''*************************************************** ''功能:实现字符长度的控制 ''参数:cutstr ''*************************************************** function cutstr
(tempstr,tempwid) if len(tempstr)>tempwid then
cutstr=left(tempstr,tempwid)&;"..." else cutstr=tempstr end if end function userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR") If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR") end if userip=cstr(userip) ''Response.write userip&;"
" ''Response.write Instr(userip,"*")-2 ''Response.End() ''ip="210.29.168.123" ''Response.write Instr(ip,"*") ''Response.end() set rs=server.createobject("adodb.recordset")
sql="select * from IP where state=1" rs.open sql,conn,1,1 do while not rs.eof Tru