我写的是当前一个投票网站的作弊源码,属本人原创,请勿用于商业用途
'增加2个按钮,command1和command2,分别是投票和获取验证码;增加2个textbox,分别是验证码的显示和投票的post结果,再拉一个winsock控件即可
Option Explicit
Dim Vcode As Boolean, code$
Private SubCommand2_Click() '获取验证码按钮
Vcode = True: Text1.Text = ""
If Winsock1.State <> 0 Then Winsock1.Close
Winsock1.RemoteHost = "c-time.citizen.com.cn"
Winsock1.RemotePort = 80
Winsock1.Protocol = sckTCPProtocol
Winsock1.Connect
End Sub
Private Sub Winsock1_Close()
If Winsock1.State <> 0 Then Winsock1.Close
End Sub
Private SubCommand1_Click() '投票按钮
Vcode = False: Text2.Text = ""
If Winsock1.State <> 0 Then Winsock1.Close
Winsock1.RemoteHost = "c-time.citizen.com.cn"
Winsock1.RemotePort = 80
Winsock1.Protocol = sckTCPProtocol
Winsock1.Connect
End Sub
Private Sub Winsock1_Connect()
Dim PostDate$, str$, AAA$, BBB$, CCC$
If Vcode = True Then
str = "GET /Pages/Handler/CheckCode.ashx HTTP/1.1" & vbCrLf
str = str & "Host: XXXXXX" & vbCrLf
str = str & vbCrLf
Else
PostDate = "c=3&Cid=9&UserName=AAA&Email=BBB&Phone=CCC&UserCode=" & code & ""
str = "POST /Pages/Handler/VoteHandler.ashx HTTP/1.1" & vbCrLf
str = str & "x-requested-with: XMLHttpRequest" & vbCrLf
str = str & "Accept-Language: zh-cn" & vbCrLf
str = str & "Referer: YYYYYY" & vbCrLf
str = str & "Accept: */*" & vbCrLf
str = str & "Content-Type: application/x-www-form-urlencoded" & vbCrLf
str = str & "Host: XXXXXX" & vbCrLf
str = str & "Content-Length: " & Len(PostDate) & "" & vbCrLf
str = str & "Connection: Keep-Alive" & vbCrLf
str = str & "Cookie: Code=" & code & "" & vbCrLf
str = str & vbCrLf
str = str & PostDate
End If
Winsock1.SendData str
End Sub
Private Sub winsock1_DataArrival(ByVal bytesTotal As Long)
Dim strResponse$, Webcode$
Webcode = ""
Winsock1.GetData strResponse, vbString, bytesTotal
Webcode = Webcode & strResponse
On Error Resume Next
If Vcode = True Then
Dim a$, b$
a = InStr(Webcode, "Code="): b = InStr(a, Webcode, ";")
code = Mid(Webcode, a + 5, b - a - 5)
Text1.Text = code
Else
Text2.Text = Webcode
End If
End Sub
在这里请允许我臭美下吧
这份源码是研究winsock Get/Post的好资料
这份源码利用了那破网站的cookie漏洞达到了免验证码的效果
这份源码能让你更好的了解到TCP协议中数据包的结构
PS:我想说的是这个rss订阅真的没问题啊