• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • vbs
  • DOS/BAT
  • hta/htc
  • python
  • perl
  • VBA
  • ColdFusion
  • ruby
  • PowerShell
  • Lua
  • Golang
  • linux shell
您的位置:首页 > 脚本语言 >vbs > 用vbs实现虚拟主机和域名查循的脚本

用vbs实现虚拟主机和域名查循的脚本

作者: 字体:[增加 减小] 来源:互联网

通过本文主要向大家介绍了vbs程序代码,vbs播放音乐,vbs,vbs整人代码,vbs教程等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
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

</div>

您可能想查找下面的文章:

  • 使用vbs获得外网ip并发送到邮箱里
  • VBS教程:正则表达式简介 -早期起源
  • VBS教程:正则表达式简介 -优先权顺序
  • vbs得没公开对象
  • VBS 自动登录论坛的实现代码
  • VBS 获取外网IP的实现代码
  • VBS获取外网IP地址并发送到指定邮箱的代码
  • VBS监控CPU的使用率(如占用率一直维持在80%超过30秒则运行某程序)
  • VBS实现的系统服务备份优化代码
  • 一些很恶作剧的vbs程序代码

相关文章

  • VBS教程:正则表达式简介 -特殊字符
  • VBS教程:VBScript 基础-VBScript编码约定
  • 使用 Iisext.vbs 列出Web服务扩展的方法
  • VBS教程:方法-MoveFile 方法
  • 字符ANSI代码查询工具vbs版
  • VBS教程:VBscript属性-Value 属性
  • VBS中通过调用CAPICOM对象实现SHA1&MD5加密
  • VBS教程:函数-CreateObject 函数
  • 几段非常有用的脚本(来自微软网站,由downmoon精心收集)
  • 用vbs操作注册表实例代码

文章分类

  • vbs
  • DOS/BAT
  • hta/htc
  • python
  • perl
  • VBA
  • ColdFusion
  • ruby
  • PowerShell
  • Lua
  • Golang
  • linux shell

最近更新的内容

    • 用vbs实现定时运行web文件的方法
    • 如何通过计划任务调用QuickTest测试脚本
    • VBS脚本也有GUI图形界面 日志清除功能
    • SQLids.vbs 0.7(最终版,以后改成gui界面的)
    • vbs qq自动发信息增强版
    • VBS基础编程教程 (第5篇)
    • VBS教程:正则表达式简介 -特殊字符
    • Windows Script Host之用vbs实现[浏览文件夹]功能
    • 使用vbscript生成36进制自动增长序号的实现代码
    • vbscript include的办法实现代码第1/2页

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有