On Error Resume Next
Set ys = New YSEP
Tstart=Timer
ys.GetzCode
For i=1 To ys.iCount
newSoc = ys.PostYS
If oldSoc = newSoc Then ys.GetzCode
oldSoc = newSoc
WScript.StdOut.Write newSoc & vbTab
Next
Tend=Timer
ys.Pause "当前人气:" & newSoc & ", 共刷了 " & ys.iCount & " 人气, 耗时: " & Tend-Tstart & " 秒." & vbCrLf & "按回车键结束..."
Class YSEP '永硕E盘 刷人气类 v1.5
Private user, z, cx, wml, RegEx, http
Public iCount
'主要功能:
'无限刷空间流量,失败自动重新连接...
'更新了服务器选择,以及返回数据的提取
'Author: 乱码
'Website: ******(和谐掉好了,不然算违规怎么办。。。)
'Date: 2012-05-03
Private Sub Class_Initialize '类初始化事件
CmdMode "永硕E盘 动作类 V1.5 测试版.","3f"
Set http = CreateObject("Msxml2.ServerXMLHTTP.3.0")
Set RegEx = New RegExp ' 创建正则表达式(用于匹配网页内容)
RegEx.IgnoreCase = False ' 设置是否区分大小写。
RegEx.Global = True ' 设置是否区分搜索全局。
WScript.StdOut.Write "请输入用户名:"
user = WScript.StdIn.ReadLine
RegEx.Pattern="[\r\n]"
user = RegEx.Replace(user,"")
If user = "" Then WScript.Quit
WScript.Echo ""
WScript.StdOut.Write "刷流量的次数:"
iCount = WScript.StdIn.ReadLine
If iCount = "" Then iCount = 1000
WScript.Echo ""
End Sub
Private Sub Class_Terminate '类结束事件
Set RegEx = Nothing
Set http = Nothing
End Sub
Public Function GetzCode() '读取空间特征码,刷访问量用
wml = HttpGET("http://" & user & ".ys168.com")
RegEx.Pattern = "z=([^""]+)"
z = RegEx.Execute(wml).Item(0).Submatches(0)
RegEx.Pattern = "(.\d)\.ys168"
cx= RegEx.Execute(wml).Item(0).Submatches(0)
End Function
Public Function PostYS() '刷访问量函数并返回当前访问量
HttpGET "http://" & cx & ".ys168.com/Ccenter.aspx?z=" & z & "&tp=http://zy.ys168.com/tp"
html = HttpGET("http://" & cx & ".ys168.com/C_zxsj.aspx?dlmc=" & user & "&a=")
regex.Pattern="(.)\d+"
s = regex.Execute(html).Item(0).Submatches(0)
PostYS = Split(html,s)(2)
End Function
Public Function HttpGET(url) '发送GET请求
http.open "GET", url, False
http.send
HttpGET = http.responseText
End Function
Public Function Pause(msg) '暂停函数
WScript.Echo ""
WScript.Echo msg
WScript.StdIn.ReadLine
End Function
Private Function CmdMode(ByVal title,ByVal color) '强制以命令行模式运行
If LCase(Right(WScript.FullName,11))="wscript.exe" Then
With CreateObject("Wscript.Shell")
.Run "cmd /c title "&title&"&color "&color&"&Cscript //Nologo """ & WScript.ScriptFullName & """"
.Run "taskkill /f /im cmd.exe",0
End With
WScript.Quit
End If
End Function
End Class