本篇文章的代码灵感来自于 mcitp 的 《万能的访问Sexinsex的方法,会的朋友也支持下》
将以下代码存成后缀名为vbs的文件后双击 即可自动使用默认浏览器轻松的访问本站
使用的是google的DNS做的解析 大家喜欢就顶一下吧 我在WIN7上测试通过了 请大家也尝试在 VISTA 和 XP 上测试一下吧
复制内容到剪贴板
代码:
Set objShell = CreateObject("WScript.Shell")
Set objExecObject = objShell.Exec ("%comspec% /c " & "nslookup www.sexinsex.net 8.8.8.8")
Do While Not objExecObject.StdOut.AtEndOfStream
strText = objExecObject.StdOut.ReadAll()
loop
Set regEx = New RegExp
regEx.Pattern = "(\d{1,3}\.){3}\d{1,3}"
regEx.Global = True
Set Matches = regEx.Execute(strText)
For Each Match In Matches
if Match.Value<>"8.8.8.8" then
GetObject("", "WScript.Shell").Run "http://" & Match.Value
WScript.Quit(0)
end if
Next