返回顶部
关闭软件导航
位置:首页 > 资讯 > 其他>同ip反查域名ASP代码分享

  前两天想写一段同ip反查域名的代码,在很多网站上找了半天,最后在一个英文站上看见可以通过live.com的搜索结果提取此类信息,于是写了下面一段:程序只是测试成功,没有进行优化,查询效率有点低!

  <%

  Dim strPage

  Function GetPage2(Path)

  t = GetBody(Path)

  GetPage2=BytesToBstr(t,"GB2312")

  End function

  Function GetBody(url)

  on error resume next

  Set Retrieval = CreateObject("Microsoft.XMLHTTP")

  With Retrieval

  .Open "Get", url, False, "", ""

  .Send

  GetBody = .ResponseBody

邮箱反查域名助手

  End With

  Set Retrieval = Nothing

  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

  Public Function GetDomain(TempStr,matchstr)

  set reg=new Regexp

  reg.Multiline=True

  reg.Global=True

  reg.IgnoreCase=true

  reg.Pattern=matchstr

  Set matches = reg.execute(TempStr)

  For Each match in matches

邮箱反查域名助手

  if not instr(GetDomain,match.Value)>0 then

  GetDomain=GetDomain&match.Value

  end if

  Next

  End Function

  dim i

邮箱反查域名助手

  for i=1 to 15

  strPage=strPage&GetPage2(" http://cnweb.search.live.com/results.aspx?q=ip%3A59.54.54.167&first="&i&"1")

邮箱反查域名助手

  next

  strPage=GetDomain(strPage,"(.*?)\/")

  strPage=replace(strPage,"","

  ")

  strPage=replace(strPage,"strPage=replace(strPage,"/","

  ")

  strPage=replace(strPage,"<<","<")

  strPage=GetDomain(strPage,"<li(.*?)\/li>")

  response.write strPage

  %>

如果您觉得 同ip反查域名ASP代码分享 这篇文章对您有用,请分享给您的好友,谢谢
文章地址:https://www.tianxianmao.com/article/other/tipfcymASPdmfx.html
解放双手无尽可能,有问题添加天线猫微信