Iframe网马批量清除,把此文件保存在中毒的虚拟目录下,然后运行,根目录为'/',虚拟目录直接为虚拟目录名称即可.
<!--
以下代码令存为任意名称
.
asp然后运行 清楚你制定的恶意框架代码即可。
代码: -->
<% @LANGUAGE = " VBSCRIPT " CODEPAGE = " 936 " %>
<! DOCTYPE HTML PUBLIC " -//W3C//DTD HTML 4.01 Transitional//EN " " http://www.w3.org/TR/html4/loose.dtd " >
< html >
< meta http - equiv = " content-type " content = " text/html; charset=gb2312 " >
< head >< title > iframe网马批量清除工具 </ title ></ head >
< body >
<%
requestpath = request . form( " path " )
if request . form( " path " ) = "" or request . form( " ext " ) = "" or request . form( " delcon " ) = "" then
%>
< h2 >< strong > Iframe网马批量清除 </ strong ></ h2 >
< p >< font color = " #0033FF " > 车友网专用 </ font ></ p >
< form name = " form1 " method = " post " action = "" >
< strong > 功能描述 :</ strong >
注意备份
< p >< strong > 要检查的路径 : </ strong >< br />
< input name = " path " type = " text " id = " path " style = " border:1px solid #999 " size = " 50 " >
< br />
* 从站点根目录算起,支持虚拟目录 </ p >
< p >< strong > 要清除的文件 :</ strong > < br />
< input name = " ext " type = " text " id = " ext " value = " ^.+.(htm|html|asp|aspx|php|jsp)$ " size = " 50 " style = " border:1px solid #999 " >
< br />
* 支持vbs正则表达式,亦可以用“(index . htm | index . asp | 文件名……)”的方式 </ p >
< p >
</ p >
< p >< strong > 要清除的内容 :</ strong > < br />
< textarea name = " delcon " cols = " 50 " rows = " 6 " id = " delcon " ></ textarea >
< br />
* 在指定的文件中发现该代码即清除之 </ p >
< p >
< input type = " submit " name = " submit " value = " 提 交 " style = " border:1px solid #999 " >
</ p >
</ form >
<%
else
if requestpath = " " then
tmppath = server.mappath( " " )
elseif requestpath = " . " then
tmppath = server.mappath( " . " )
else
tmppath = server.mappath( " " & requestpath)
end if
showallfile(tmppath)
response.write( " 清理完毕! < br />< br />< a href = "" # "" οnclick=""javascript:history.go(-1);"">返回前一页面</a><br/>")
end if
%>
</ body >
</ html >
<%
' 遍历处理path及其子目录所有文件
sub showallfile(path)
' on error resume next
set fso = createobject( " scripting.filesystemobject " )
if not fso . folderexists(path) then exit sub
set f = fso . getfolder(path)
set fc2 = f . files
for each myfile in fc2
if err then response . write( " 权限不足,不能检查目录 <b> " & path & " </b><br/> " ) : response . Write(err) : exit sub
set regex = new regexp
regex . ignorecase = true
regex . global = true
regex . pattern = request . form( " ext " )
if regex . test(myfile . name) then
checkfile(path & " "&myfile.name)
end if
set regex = nothing
next
set fc = f.subfolders
for each f1 in fc
showallfile path& " " &f1.name
next
set fso = nothing
end sub
Function checkfile(fPath)
Dim rFile,wFile,bool,result
set fso = createobject( " scripting . filesystemobject " )
Set rFile = fso.openTextFile(fPath,1)
result = rFile.readAll()
reStr=request.form( " delcon " )
If InStr(result,reStr) > 0 Then
bool = True
result = Replace(result,reStr, "" )
Set wFile = fso.openTextFile(fPath,2)
wFile.write(result)
Set wFile = Nothing
response.write " 已经修复文件 : " &fPath& " ...< br /> "
Else
bool = False
End If
Set rFile = Nothing
replaceFile = bool
End Function
%>
代码: -->
<% @LANGUAGE = " VBSCRIPT " CODEPAGE = " 936 " %>
<! DOCTYPE HTML PUBLIC " -//W3C//DTD HTML 4.01 Transitional//EN " " http://www.w3.org/TR/html4/loose.dtd " >
< html >
< meta http - equiv = " content-type " content = " text/html; charset=gb2312 " >
< head >< title > iframe网马批量清除工具 </ title ></ head >
< body >
<%
requestpath = request . form( " path " )
if request . form( " path " ) = "" or request . form( " ext " ) = "" or request . form( " delcon " ) = "" then
%>
< h2 >< strong > Iframe网马批量清除 </ strong ></ h2 >
< p >< font color = " #0033FF " > 车友网专用 </ font ></ p >
< form name = " form1 " method = " post " action = "" >
< strong > 功能描述 :</ strong >
注意备份
< p >< strong > 要检查的路径 : </ strong >< br />
< input name = " path " type = " text " id = " path " style = " border:1px solid #999 " size = " 50 " >
< br />
* 从站点根目录算起,支持虚拟目录 </ p >
< p >< strong > 要清除的文件 :</ strong > < br />
< input name = " ext " type = " text " id = " ext " value = " ^.+.(htm|html|asp|aspx|php|jsp)$ " size = " 50 " style = " border:1px solid #999 " >
< br />
* 支持vbs正则表达式,亦可以用“(index . htm | index . asp | 文件名……)”的方式 </ p >
< p >
</ p >
< p >< strong > 要清除的内容 :</ strong > < br />
< textarea name = " delcon " cols = " 50 " rows = " 6 " id = " delcon " ></ textarea >
< br />
* 在指定的文件中发现该代码即清除之 </ p >
< p >
< input type = " submit " name = " submit " value = " 提 交 " style = " border:1px solid #999 " >
</ p >
</ form >
<%
else
if requestpath = " " then
tmppath = server.mappath( " " )
elseif requestpath = " . " then
tmppath = server.mappath( " . " )
else
tmppath = server.mappath( " " & requestpath)
end if
showallfile(tmppath)
response.write( " 清理完毕! < br />< br />< a href = "" # "" οnclick=""javascript:history.go(-1);"">返回前一页面</a><br/>")
end if
%>
</ body >
</ html >
<%
' 遍历处理path及其子目录所有文件
sub showallfile(path)
' on error resume next
set fso = createobject( " scripting.filesystemobject " )
if not fso . folderexists(path) then exit sub
set f = fso . getfolder(path)
set fc2 = f . files
for each myfile in fc2
if err then response . write( " 权限不足,不能检查目录 <b> " & path & " </b><br/> " ) : response . Write(err) : exit sub
set regex = new regexp
regex . ignorecase = true
regex . global = true
regex . pattern = request . form( " ext " )
if regex . test(myfile . name) then
checkfile(path & " "&myfile.name)
end if
set regex = nothing
next
set fc = f.subfolders
for each f1 in fc
showallfile path& " " &f1.name
next
set fso = nothing
end sub
Function checkfile(fPath)
Dim rFile,wFile,bool,result
set fso = createobject( " scripting . filesystemobject " )
Set rFile = fso.openTextFile(fPath,1)
result = rFile.readAll()
reStr=request.form( " delcon " )
If InStr(result,reStr) > 0 Then
bool = True
result = Replace(result,reStr, "" )
Set wFile = fso.openTextFile(fPath,2)
wFile.write(result)
Set wFile = Nothing
response.write " 已经修复文件 : " &fPath& " ...< br /> "
Else
bool = False
End If
Set rFile = Nothing
replaceFile = bool
End Function
%>