Form5.frm
资源名称:qq.rar [点击查看]
上传用户:luoweizhao
上传日期:2022-08-01
资源大小:1290k
文件大小:12k
源码类别:
外挂编程
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
- Object = "{D05C3AD7-7EF1-4749-885E-A2006408FC13}#1.0#0"; "VSListview.ocx"
- Begin VB.Form Form5
- BorderStyle = 1 'Fixed Single
- Caption = "我的背包"
- ClientHeight = 5160
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 5925
- Icon = "Form5.frx":0000
- LinkTopic = "Form5"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 5160
- ScaleWidth = 5925
- StartUpPosition = 1 '所有者中心
- Begin VB.OptionButton Option1
- Caption = "商店"
- Height = 375
- Left = 120
- Style = 1 'Graphical
- TabIndex = 5
- Top = 120
- Width = 1335
- End
- Begin VB.OptionButton Option2
- Caption = "背包"
- Height = 375
- Left = 1440
- Style = 1 'Graphical
- TabIndex = 4
- Top = 120
- Value = -1 'True
- Width = 1335
- End
- Begin VB.OptionButton Option3
- Caption = "仓库"
- Height = 375
- Left = 2760
- Style = 1 'Graphical
- TabIndex = 3
- Top = 120
- Width = 1335
- End
- Begin VB.CommandButton Command1
- Cancel = -1 'True
- Caption = "Command1"
- Height = 255
- Left = 2160
- TabIndex = 2
- Top = 6840
- Width = 495
- End
- Begin VB.Frame Frame1
- Caption = "我的背包"
- Height = 4455
- Left = 120
- TabIndex = 0
- Top = 600
- Width = 5675
- Begin MSWinsockLib.Winsock Winsock2
- Left = 4200
- Top = 1800
- _ExtentX = 741
- _ExtentY = 741
- _Version = 393216
- RemotePort = 10
- End
- Begin VB.Timer Timer1
- Enabled = 0 'False
- Interval = 10
- Left = 3840
- Top = 3360
- End
- Begin MSWinsockLib.Winsock Winsock1
- Left = 3600
- Top = 1800
- _ExtentX = 741
- _ExtentY = 741
- _Version = 393216
- RemotePort = 10
- End
- Begin vsListViewXP.vsListView vsListView1
- Height = 4095
- Left = 120
- TabIndex = 1
- Top = 240
- Width = 5430
- _ExtentX = 9578
- _ExtentY = 7223
- End
- End
- End
- Attribute VB_Name = "Form5"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim liebiao As String, maichu As String
- Private Sub Form_Load()
- With vsListView1
- '初始化
- Call .Initialize
- '初始化小图标
- Call .InitializeImageListSmall
- '加载资源文件中的Icon
- Call .ImageListSmall_AddIcon(LoadResPicture(101, 1))
- '设置列头
- Call .ColumnAdd(0, "", 0, [caLeft])
- Call .ColumnAdd(1, "ID", 30, [caLeft])
- Call .ColumnAdd(2, "名称", 100, [caLeft])
- Call .ColumnAdd(3, "数量", 70, [caLeft])
- Call .ColumnAdd(4, "等级", 70, [caLeft])
- Call .ColumnAdd(5, "周期/时", 70, [caLeft])
- '是否支持重画列表
- .RaiseSubItemPrePaint = False
- '是否隐藏列头
- .HeaderHide = False
- '是否支持调整边距
- .HeaderFixedWidth = False
- '是否支持拖动列头
- .HeaderFixedWidth = True
- '是否启用复选框
- vsListView1.CheckBoxes = 0
- '边框风格
- ' cbBorderStyle.ListIndex = 1
- .BorderStyle = bsThick
- '视图
- .ViewMode = vmDetails
- '显示网格
- .GridLines = True
- '整行选择
- .FullRowSelect = True
- '颜色
- .BackColor = &HFFFFFF
- End With
- Timer1.Enabled = True
- End Sub
- Private Sub Option1_Click()
- On Error Resume Next
- Form1.Timer24.Enabled = True
- qhform = 1
- Unload Form5
- End Sub
- Private Sub Option3_Click()
- On Error Resume Next
- Form1.Timer24.Enabled = True
- qhform = 3
- Unload Form5
- End Sub
- 'Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
- ' On Error Resume Next
- ' Cancel = True
- ' Form5.Visible = False
- ' Exit Sub
- 'End Sub
- Private Sub Timer1_Timer()
- Timer1.Enabled = False
- With vsListView1
- Call .Clear '清空
- Call .ItemAdd(vsListView1.Count, "", 0, 0)
- Call .SubItemSet(vsListView1.Count - 1, 1, "", 0)
- Call .SubItemSet(vsListView1.Count - 1, 2, "加载中...", 0)
- End With
- liebiao = ""
- If Proxy = 1 Then '使用代理
- Winsock1.Close
- Winsock1.RemoteHost = Proxy_IP
- Winsock1.RemotePort = Proxy_DK
- Winsock1.Connect
- Else
- Winsock1.Close
- If Farmqk = True Then
- Winsock1.RemoteHost = "happyfarm.xiaoyou.qq.com"
- Else
- Winsock1.RemoteHost = "happyfarm.qzone.qq.com"
- End If
- Winsock1.RemotePort = 80
- Winsock1.Connect
- End If
- End Sub
- Private Sub Winsock1_Connect()
- On Error Resume Next
- Dim strCommand As String
- Dim proxytemp As String
- Dim posttem As String
- Randomize Timer
- If Proxy = 1 Then '使用代理
- If Farmqk = True Then
- proxytemp = "http://happyfarm.xiaoyou.qq.com"
- Else
- proxytemp = "http://happyfarm.qzone.qq.com"
- End If
- End If
- posttem = "farmTime=" & time_cx & "&farmKey=" & Farmkey_cx
- strCommand = "POST " & proxytemp & "/api.php?mod=repertory&act=getUserSeed HTTP/1.1" & vbCrLf
- strCommand = strCommand + "Accept: */*" + vbCrLf
- strCommand = strCommand + "Accept-Language: zh-cn" + vbCrLf
- strCommand = strCommand + "Accept-Encoding: gzip, deflate" + vbCrLf
- If Proxy = 1 And Len(Basic) > 0 Then strCommand = strCommand & "Proxy-Authorization: Basic " & Basic & vbCrLf
- If Farmqk = True Then
- strCommand = strCommand & "Host: happyfarm.xiaoyou.qq.com" & vbCrLf
- Else
- strCommand = strCommand & "Host: happyfarm.qzone.qq.com" & vbCrLf
- End If
- strCommand = strCommand & "Content-Type: application/x-www-form-urlencoded" & vbCrLf
- strCommand = strCommand & "Referer: http://appimg.qq.com/happyfarm/module/Main_v_" & flashbb & ".swf" & vbCrLf
- strCommand = strCommand + "x-flash-version: " & flash + vbCrLf
- strCommand = strCommand & "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" & vbCrLf
- strCommand = strCommand & "Connection: close" & vbCrLf
- strCommand = strCommand & "Content-Length: " & Len(posttem) & vbCrLf
- strCommand = strCommand & "Cookie: " & FarmCookies & vbCrLf
- ' strCommand = strCommand & "Cookie: uin=" & login_uid & "; skey=" & login_skey & "; pst=" & pst - 5 & ";" & vbCrLf
- strCommand = strCommand & vbCrLf
- strCommand = strCommand & posttem
- Winsock1.SendData strCommand
- End Sub
- Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
- On Error Resume Next
- ReDim str(bytesTotal - 1) As Byte
- Winsock1.GetData str, vbArray + vbByte
- liebiao = liebiao & UTF8_Decode(str)
- End Sub
- Private Sub Winsock1_Close()
- On Error Resume Next
- Dim temp() As String, tem1 As String, tem2 As String, ListI As Integer
- Dim cName As String, amount As Long, sum As Long, level As String, cId As String
- Winsock1.Close
- If Len(liebiao) > 0 Then
- vsListView1.Clear
- Label3.Caption = 0
- mybox = ""
- If InStr(liebiao, """cId""") > 0 Or InStr(liebiao, """tId""") > 0 Then
- If InStr(liebiao, "},{") > 0 Then
- temp = Split(liebiao, "},{")
- For i = 0 To UBound(temp())
- If InStr(temp(i), "cName") > 0 Then
- cName = vbUnEscape(split_m(3, temp(i), "cName"))
- cId = split_m(1, temp(i), "cId")
- amount = split_m(1, temp(i), "amount")
- level = split_m(2, temp(i), "level")
- lifecycle = split_m(1, temp(i), "lifecycle")
- If InStr(mybox, "/" & cId & "|" & amount & "|") = 0 Then
- mybox = mybox & "/" & cId & "|" & amount & "//"
- End If
- ElseIf InStr(temp(i), "tName") > 0 Then
- cName = vbUnEscape(split_m(3, temp(i), "tName"))
- amount = split_m(1, temp(i), "amount")
- cId = split_m(1, temp(i), "tId")
- level = "不限"
- If cId = 1 Then
- lifecycle = 1
- ElseIf cId = 2 Then
- lifecycle = 2.5
- Else
- lifecycle = 5.5
- End If
- End If
- With vsListView1
- ListI = ListI + 1
- Call .ItemAdd(vsListView1.Count, "", 0, 0)
- Call .SubItemSet(vsListView1.Count - 1, 1, ListI, 0)
- Call .SubItemSet(vsListView1.Count - 1, 2, cName, 0)
- Call .SubItemSet(vsListView1.Count - 1, 3, amount, 0)
- Call .SubItemSet(vsListView1.Count - 1, 4, level, 0)
- Call .SubItemSet(vsListView1.Count - 1, 5, lifecycle, 0)
- End With
- Next i
- Else
- If InStr(liebiao, "cName") > 0 Then
- cName = vbUnEscape(split_m(3, liebiao, "cName"))
- cId = split_m(1, liebiao, "cId")
- amount = split_m(1, liebiao, "amount")
- level = split_m(1, liebiao, "level")
- lifecycle = split_m(1, liebiao, "lifecycle")
- If InStr(mybox, "/" & cId & "|" & amount & "|") = 0 Then
- mybox = mybox & "/" & cId & "|" & amount & "//"
- End If
- ElseIf InStr(liebiao, "tName") > 0 Then
- cName = vbUnEscape(split_m(3, liebiao, "tName"))
- amount = split_m(1, liebiao, "amount")
- cId = split_m(1, liebiao, "tId")
- level = "不限"
- If cId = 1 Then
- lifecycle = 1
- ElseIf cId = 2 Then
- lifecycle = 2.5
- Else
- lifecycle = 5.5
- End If
- End If
- With vsListView1
- ListI = ListI + 1
- Call .ItemAdd(vsListView1.Count, "", 0, 0)
- Call .SubItemSet(vsListView1.Count - 1, 1, ListI, 0)
- Call .SubItemSet(vsListView1.Count - 1, 2, cName, 0)
- Call .SubItemSet(vsListView1.Count - 1, 3, amount, 0)
- Call .SubItemSet(vsListView1.Count - 1, 4, level, 0)
- Call .SubItemSet(vsListView1.Count - 1, 5, lifecycle, 0)
- End With
- End If
- 'Label3.Caption = sum
- End If
- End If
- End Sub
- Private Sub XPButton21_Click()
- On Error Resume Next
- If vsListView1.Count > 0 Then
- maichu = ""
- If Proxy = 1 Then '使用代理
- Winsock2.Close
- Winsock2.RemoteHost = Proxy_IP
- Winsock2.RemotePort = Proxy_DK
- Winsock2.Connect
- Else
- Winsock2.Close
- If Farmqk = True Then
- Winsock2.RemoteHost = "happyfarm.xiaoyou.qq.com"
- Else
- Winsock2.RemoteHost = "happyfarm.qzone.qq.com"
- End If
- Winsock2.RemotePort = 80
- Winsock2.Connect
- End If
- Else
- MsgBox "你的仓库空空的,没什么可以出售!", 48, "卖出失败"
- End If
- End Sub
- Private Sub Command1_Click()
- Form5.Visible = False
- End Sub