学峰网论坛-查看贴子

发表新贴〗〖查看贴子〗〖关闭本页回主页


 发表新贴  回复贴子

 主题:ASP小偷偷取地址并生成html
99软件站
sz
QQ:000000
发表时间:2005-10-25 4:02:31   IP:218.17.91.212

主题:ASP小偷偷取地址并生成html
 

<%
function getHTTPPage(url)
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set http=nothing
if err.number<>0 then err.Clear
end function

Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function

Dim Url,Html
Url="http://www.dadui.com/index_mb.asp"
Html = getHTTPPage(Url)

dim filename,MDBpath,fso,fout
filename="../index.htm"
MDBpath="./"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath(""&filename&""))
fout.Write html
fout.close
set fout=nothing
set fso=nothing
if err then
response.Write("生成首页失败")
else
response.Write("生成首页成功<a href='../index.htm' target='_blank'>../index.htm</a>")
end if
%>



 

E-mail  Homepage

贴子数:1 页数:1

1


 _ 目前有29人在线|访问统计|总访问次|Powered by学峰网Surfeon.net|联系 _