账号通
    

账号  

密码  

8138

查看

18

回复
主题:闲来无事写了一个程序,清除恶意代码的程序 [收藏主题] 转到:  
fengya1999 当前离线

432

主题

1

广播

0

粉丝
添加关注
级别:四年级

用户积分:4604 分
登录次数:495 次
注册时间:2007/7/18
最后登录:2015/6/15
fengya1999 发表于:2009/10/3 15:49:00   | 只看该作者 查看该作者主题 11楼 
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
ryj1213 当前离线

39

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:275 分
登录次数:40 次
注册时间:2009/8/15
最后登录:2012/4/24
ryj1213 发表于:2009/10/3 9:23:00   | 只看该作者 查看该作者主题 12楼 
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
nomark 当前离线

662

主题

0

广播

0

粉丝
添加关注
级别:六年级

用户积分:5138 分
登录次数:113 次
注册时间:2009/3/16
最后登录:2012/2/22
nomark 发表于:2009/10/2 20:10:00   | 只看该作者 查看该作者主题 13楼 

该文件存在代码但没有权限

 

怎么回事??》?

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
zsptt 当前离线

8

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:280 分
登录次数:9 次
注册时间:2009/5/14
最后登录:2009/10/4
zsptt 发表于:2009/10/2 19:26:00   | 只看该作者 查看该作者主题 14楼 
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
zsptt 当前离线

8

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:280 分
登录次数:9 次
注册时间:2009/5/14
最后登录:2009/10/4
zsptt 发表于:2009/10/2 19:20:00   | 只看该作者 查看该作者主题 15楼 

Active Server Pages 错误 'ASP 0113'

脚本超时

/asp.asp

超过了脚本运行的最长时间。可以为 Server.ScriptTimeOut 属性指定新值或更改 IIS 管理工具中的相应值来更改此限制。

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
zsptt 当前离线

8

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:280 分
登录次数:9 次
注册时间:2009/5/14
最后登录:2009/10/4
zsptt 发表于:2009/10/2 19:17:00   | 只看该作者 查看该作者主题 16楼 
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
nomark 当前离线

662

主题

0

广播

0

粉丝
添加关注
级别:六年级

用户积分:5138 分
登录次数:113 次
注册时间:2009/3/16
最后登录:2012/2/22
nomark 发表于:2009/10/2 19:13:00   | 只看该作者 查看该作者主题 17楼 
科汛在线考试系统(NET)
能把另一种输出的替换吗?docment那种
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
kkwd 当前离线

40

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:446 分
登录次数:15 次
注册时间:2007/9/15
最后登录:2009/10/3
kkwd 发表于:2009/10/2 18:59:00   | 只看该作者 查看该作者主题 18楼 
科汛智能建站系统
这个文件很好,批量替换成功.谢谢!
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
海之魄 当前离线

21

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:173 分
登录次数:6 次
注册时间:2009/9/13
最后登录:2009/10/28
海之魄 发表于:2009/10/2 18:38:00   | 只看该作者 查看该作者主题 19楼 


<%
response.charset="gb2312"
response.buffer=true

pathStr="/"   '路径
code="id=""scr7ipt"            '特征码
content=""                     '要替换的内容
set fso=server.createobject("scripting.filesystemobject")
temp_path=server.mappath(pathStr) '要遍历的文件夹路径
p_path=server.mappath(pathStr)
call getcount(temp_path)

Function getcount(path)
t_path=path
set fod=fso.getfolder(t_path)
o_c=o_c+fod.subfolders.count
f_c=f_c+fod.files.count
'遍历文件夹中的文件
if fod.files.count>0 then
   for each fi in fod.files
       response.write replace(t_path,p_path,"")&"\"&fi.name&"<br />"&vbcrlf
    FileRewrite t_path&"\"&fi.name,code,content
   next
end if
'遍历文件夹中的子文件夹,并回归调用
if fod.subfolders.count>0 then
   for each ff in fod.subfolders
       response.write "<font color=green>"&replace(t_path,p_path,"")&"\"&ff.name&" 目录</font><br />"&vbcrlf
       response.flush '输出
       c_fod=t_path&"\"&ff.name
       call getcount(c_fod)
   next
end if
end function
%>
<%
function FileRewrite(fileName,feaCode,content)

 set f1=fso.OpenTextFile(fileName,1,false)
 If Not f1.AtEndofStream Then
  tempcnt=f1.readall
  f1.close
  if instr(tempcnt,feaCode)>0 then
   temparray = Split(tempcnt,Chr(13)&Chr(10))
   for i=0 to ubound(temparray)
   tmpstr=""
   tmpstr=temparray(i)
    if instr(tmpstr,feaCode)>0 then
     temparray(i)=content
    end if
   next
   tempcnt = join(temparray,Chr(13)&Chr(10))
   tempcnt=replace(tempcnt,Chr(13)&Chr(10)&Chr(13)&Chr(10),Chr(13)&Chr(10))
   on error resume next
   set f2=fso.OpenTextFile(fileName,2,false)
   f2.write(tempcnt)
   if err.number>0 then
      response.write replace(filename,p_path,"")&" <font color=red>该文件存在代码但没有权限</font><br />"&vbcrlf
   else
    response.Write(replace(filename,p_path,"")&"<font color=red>替换完毕</font><br>"&vbcrlf)
   end if
   err.clear
   f2.close
  end if
 End If
End Function
%>
<%

Function URLDecode(enStr)
 dim deStr
 dim c,i,v
 deStr=""
 for i=1 to len(enStr)
 c=Mid(enStr,i,1)
 if c="%" then
 v=eval("&h"+Mid(enStr,i+1,2))
 if v<128 then
 deStr=deStr&chr(v)
 i=i+2
 else
 if isvalidhex(mid(enstr,i,3)) then
 if isvalidhex(mid(enstr,i+3,3)) then
 v=eval("&h"+Mid(enStr,i+1,2)+Mid(enStr,i+4,2))
 deStr=deStr&chr(v)
 i=i+5
 else
 v=eval("&h"+Mid(enStr,i+1,2)+cstr(hex(asc(Mid(enStr,i+3,1)))))
 deStr=deStr&chr(v)
 i=i+3
 end if
 else
 destr=destr&c
 end if
 end if
 else
 if c="+" then
 deStr=deStr&" "
 else
 deStr=deStr&c
 end if
 end if
 next
 URLDecode=deStr
 end function

 function isvalidhex(str)
 isvalidhex=true
 str=ucase(str)
 if len(str)<>3 then isvalidhex=false:exit function
 if left(str,1)<>"%" then isvalidhex=false:exit function
 c=mid(str,2,1)
 if not (((c>="0") and (c<="9")) or ((c>="A") and (c<="Z"))) then isvalidhex=false:exit function
 c=mid(str,3,1)
 if not (((c>="0") and (c<="9")) or ((c>="A") and (c<="Z"))) then isvalidhex=false:exit function
 end function

%>

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.31250秒 powered by KesionCMS 9.0