If InStr(html,"欢迎您回来") Then
'WScript.Echo "登录成功。。。"
MsgBox "登录成功,即将开始挂机",64+4096,"开始挂机"
html=httpGet("http://www.52pojie.cn/home.php?mod=task&do=apply&id=2")
If InStr(html,"本期您已申请过此任务") Then
MsgBox "抱歉,本期您已申请过此任务,请下期再来",64+4096,"失败"
Else
MsgBox "签到成功!",64+4096,"成功"
End If
Randomize
refresh 2
Else
WScript.Echo "登录失败。。。"
End If
Function refresh(ByVal minutes)
Do
httpGet "http://www.52pojie.cn/thread-" & CStr(Int(Rnd*130335)+1111) & "-1-1.html"
WScript.Sleep minutes*60000
Loop
End Function
Function httpGet(ByVal url)
http.open "GET", url, False
http.send
httpGet = http.responseText
End Function
Function httpPost(ByVal url,ByVal data)
http.open "POST", url, False
http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
http.send data
httpPost = http.responseText
End Function
Function URLEncode(strURL)
Dim I
Dim tempStr
For I = 1 To Len(strURL)
If Asc(Mid(strURL, I, 1)) < 0 Then
tempStr = "%" & Right(CStr(Hex(Asc(Mid(strURL, I, 1)))), 2)
tempStr = "%" & Left(CStr(Hex(Asc(Mid(strURL, I, 1)))), Len(CStr(Hex(Asc(Mid(strURL, I, 1))))) - 2) & tempStr
URLEncode = URLEncode & tempStr
ElseIf (Asc(Mid(strURL, I, 1)) >= 65 And Asc(Mid(strURL, I, 1)) <= 90) Or (Asc(Mid(strURL, I, 1)) >= 97 And Asc(Mid(strURL, I, 1)) <= 122) Or (Asc(Mid(strURL, I, 1)) >= 48 And Asc(Mid(strURL, I, 1)) <= 57) Then
URLEncode = URLEncode & Mid(strURL, I, 1)
Else
URLEncode = URLEncode & "%" & Hex(Asc(Mid(strURL, I, 1)))
End If
Next
End Function