yilina1012 2011-10-5 23:15
关于直接打开本站的脚本[排版重发]
本篇文章的代码灵感来自于 mcitp 的 《万能的访问Sexinsex的方法,会的朋友也支持下》
将以下代码存成后缀名为vbs的文件后双击 即可自动使用默认浏览器轻松的访问本站
使用的是google的DNS做的解析 大家喜欢就顶一下吧 我在WIN7上测试通过了 请大家也尝试在 VISTA 和 XP 上测试一下吧[code]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[/code]附自我验证图
[img]http://i1101.photobucket.com/albums/g421/yilina1012/QQ20111005225031.png[/img]
另如何将隐藏的扩展名显示出来
请通过资源管理器 工具(组织) -> 文件夹和搜索选项 去掉红框中的勾 并确定
[img]http://i1101.photobucket.com/albums/g421/yilina1012/QQ20111005230353.png[/img]
关于360报警问题。。。 大家应该司空见惯了 忽略吧。。
wubozh 2011-10-6 11:31
有问题。打开的是网站的根目录。而SIS并不在网站的根目录下。需要修改一下
wubozh 2011-10-6 11:36
经测试,改成:[code]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
+"/bbs/index.php"
WScript.Quit(0)
end if
Next[/code]就可以了
yilina1012 2011-10-6 12:33
[quote]原帖由 [i]wubozh[/i] 于 2011-10-6 11:36 发表 [url=http://www.sexinsex.net/bbs/redirect.php?goto=findpost&pid=76262901&ptid=4110589][img]http://www.sexinsex.net/bbs/images/common/back.gif[/img][/url]
经测试,改成:Set objShell = CreateObject("WScript.Shell")
Set objExecObject = objShell.Exec ("%comspec% /c " & "nslookup [url]www.sexinsex.net[/url]
8.8.8.8")
Do While Not objExecObject.StdOut.AtEndOfStre ... [/quote]
-。= 嘛 直接主页也不错啦 这个很容易