- If WScript.Arguments.Count <> 1 Then
- WScript.Echo "Example: CScript " & WScript.ScriptName & " www.sohu.com"
- WScript.Quit
- End If
- url="http://www.seologs.com/ip-domains.html?domainname="&WScript.Arguments(0)
- Set oXMLHttpRequest = CreateObject("Msxml2.XMLHTTP")
- oXMLHttpRequest.Open "GET", url, False, False
- oXMLHttpRequest.Send
- str=oXMLHttpRequest.ResponseText
- ipos=instr(str,"<font face="&Chr(34)&"arial"&Chr(34)&">")
- ipend=instr(str,"<!---end loop--->")
- str=mid(str,ipos+19,ipend-ipos-139)
- str=Replace(str,"<b>","")
- str=Replace(str,"</b>","")
- str=Replace(str,"<small>","")
- str=Replace(str,"</small>","")
- str=Replace(str,"</font><font face="&chr(34)&"arial"&chr(34)&" size="&chr(34)&"-1"&chr(34)&">","")
- str=Replace(str,"Found"," Found")
- iposa=instr(str,"with")
- iposb=InStr(str,"1)")
- stra=mid(str,iposa,iposb-iposa)
- str=replace(str,stra,"lcx")
- str=replace(str,"lcx1)","<br>1)")
- 'wscript.echo str
- Set oXMLHttpRequest=Nothing
- Set objExplorer = WScript.CreateObject("InternetExplorer.Application")
- objExplorer.Navigate "about:blank"
- objExplorer.ToolBar = 0
- objExplorer.StatusBar = 0
- objExplorer.Visible = 1
- objExplorer.height=600
- objExplorer.width=500
- objExplorer.left=400
- objExplorer.resizable=0
- objExplorer.Document.Body.InnerHTML = str
- objExplorer.document.parentwindow.clipboardData.SetData "text", str
- Set objExplorer=nothing
- ========================正则:
- msg="请输入你要查询的IP或域名:"
- IP=Inputbox(msg,"域名查询","www.haiyangtop.net")
- If IP = "" Then IP = "www.haiyangtop.net"
- url = "http://www.seologs.com/ip-domains.html?domainname="& IP &""
- Body = getHTTPPage(url)
- Set Re = New RegExp
- Re.Pattern = "(<font face=""arial"">[\s\S]+</font> </td></tr></table>)"
- Set Matches = Re.Execute(Body)
- If Matches.Count>0 Then Body = Matches(0).value
- Set oXMLHttpRequest=Nothing
- Set objExplorer = WScript.CreateObject("InternetExplorer.Application")
- objExplorer.Navigate "about:blank"
- objExplorer.ToolBar = 0
- objExplorer.StatusBar = 0
- objExplorer.Visible = 1
- objExplorer.height=300
- objExplorer.width=400
- objExplorer.left=400
- objExplorer.resizable=0
- objExplorer.Document.Body.InnerHTML =IP & Body
- 'objExplorer.document.parentwindow.clipboardData.SetData "text", IP & Body
- Set objExplorer=nothing
- '函数区
- Function getHTTPPage(Path)
- t = GetBody(Path)
- getHTTPPage = 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 = 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
用vbs实现虚拟主机和域名查询的脚本
2020-07-22 13:48VBS脚本之家 VBS
用vbs实现的可以查询虚拟主机和域名信息的脚本代码,保存为vbs运行即可
延伸 · 阅读
- 2022-03-09Ubuntu 16.04与Apache虚拟主机配置的步骤详解
- 2022-03-03Lamp环境下设置绑定apache域名的方法分析
- 2022-03-02关于Nginx中虚拟主机的一些冷门知识小结
- 2022-02-28虚拟主机中网站备份的几种方法
- 2022-02-25用python实现域名资产监控的详细步骤
- 2022-02-21GoDaddy 域名PUSH图文教程 ACCEPT接受Godaddy域名PUSH的
精彩推荐
- VBS
脚本 MsAgent组件 微软精灵 揪出系统自带的宠物
你知道系统里有一个隐藏的宠物吗? 将以下代码保存为后缀为.vbs的文件,再双击运行,看看出来什么?一个可爱的魔法老人!还会说话、移动、吹喇叭…...
- VBS
提供个可以显示农历的VBS代码
本文主要分享一段可以显示农历的VBS代码,具有一定的参考价值,有需要的朋友可以了解一下...
- VBS
vbs base64 解密脚本代码
解密base64的vbs小函数,支持英文与数字不支持中文。...
- VBS
VBS教程:对象-Folders 集合
VBS教程:对象-Folders 集合...
- VBS
VBS教程:属性-AvailableSpace 属性
VBS教程:属性-AvailableSpace 属性 ...
- VBS
可以定时自动关机的vbs脚本
这篇文章主要分享一段可以定时自动关机的vbs脚本代码,有需要的童鞋可以学习下...
- VBS
VBS教程:属性-VolumeName 属性
VBS教程:属性-VolumeName 属性...
- VBS
VBS教程:正则表达式简介 -建立正则表达式
建立正则表达式 构造正则表达式的方法和创建数学表达式的方法一样。也就是用多种元字符与操作符将小的表达式结合在一起来创建更大的表达式。 可以...