当前位置:主页 > 查看内容

asp中xmlhttp组件发包

发布时间:2021-07-18 00:00| 位朋友查看

简介:asp中xmlhttp组件发包 写的一个小偷函数,注意红色代码部分,其他的自己添加吧! FunctionPostHttpPageFrom(HttpUrl,stra,FromUrl) DimHttp SetHttp=server.createobject("MSXML2.XMLHTTP") Http.open"POST",HttpUrl,False Http.setrequestheader"content-le……

asp中xmlhttp组件发包
写的一个小偷函数,注意红色代码部分,其他的自己添加吧!
Function PostHttpPageFrom(HttpUrl,stra,FromUrl)
   Dim Http
Set Http=server.createobject("MSXML2.XMLHTTP")
   Http.open "POST",HttpUrl,False
   Http.setrequestheader "content-length",len(stra)   Http.setrequestheader "content-
type","application/x-www-form-urlencoded"
   Http.setrequestheader "Referer",FromUrl
   Http.send stra 
If Http.Readystate<>4 then
      Set Http=Nothing 
GetHttpPage="$False$"
Exit function
End if
PostHttpPageFrom=bytesToBSTR(Http.responseBody,"gb2312")   Set Http=Nothing
If Err.number<>0 then
      Err.Clear
End If
End Function
Function BytesToBstr(Body,Cset)
   Dim Objstream
Set Objstream = Server.CreateObject("adodb.stream")
   objstream.Type = 1
objstream.Mode =3
objstream.Open1 d)
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
   BytesToBstr = objstream.ReadText
   objstream.Close
   set objstream = nothing
End Function


原文链接:https://m.jb51.net/article/12702.htm
本站部分内容转载于网络,版权归原作者所有,转载之目的在于传播更多优秀技术内容,如有侵权请联系QQ/微信:153890879删除,谢谢!

推荐图文


随机推荐