VERSION 5.00 Begin VB.Form Frm_Main BorderStyle = 0 'None Caption = "Form1" ClientHeight = 3000 ClientLeft = 0 ClientTop = 0 ClientWidth = 4995 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 3000 ScaleWidth = 4995 ShowInTaskbar = 0 'False StartUpPosition = 2 '屏幕中心 Begin 手机说说发表工具.XmlHttp XmlHttp Height = 240 Left = 3630 Top = 105 Visible = 0 'False Width = 240 _ExtentX = 423 _ExtentY = 423 End Begin 手机说说发表工具.Frm_Tols Frm Height = 240 Left = 3885 Top = 90 Visible = 0 'False Width = 240 _ExtentX = 423 _ExtentY = 423 End Begin 手机说说发表工具.TzTab TzTab Height = 3000 Left = 0 Top = 0 Width = 4995 _ExtentX = 8811 _ExtentY = 5292 TabBt = "$登录||$验证||$发表||#||#手机说说发表工具" Begin 手机说说发表工具.TzButton clear Height = 360 Left = 2.00000e5 Tag = "3" Top = 510 Visible = 0 'False WhatsThisHelpID = 2940 Width = 1500 _ExtentX = 2646 _ExtentY = 635 Caption = "清空数据" BackColor = 255 StartColor = 255 FinshColor = 8421631 BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "宋体" Size = 9 Charset = 134 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin VB.TextBox suffix Appearance = 0 'Flat BorderStyle = 0 'None Height = 270 Left = 2.00000e5 TabIndex = 8 Tag = "3" Top = 2640 Visible = 0 'False WhatsThisHelpID = 915 Width = 2865 End Begin 手机说说发表工具.TzButton send Height = 270 Left = 2.00000e5 Tag = "3" Top = 2640 Visible = 0 'False WhatsThisHelpID = 3885 Width = 930 _ExtentX = 1640 _ExtentY = 476 Caption = "发表" BackColor = 33023 StartColor = 33023 FinshColor = 8438015 BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "宋体" Size = 9 Charset = 134 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin VB.TextBox content Appearance = 0 'Flat BorderStyle = 0 'None Height = 1455 Left = 2.00000e5 TabIndex = 7 Tag = "3" Top = 1095 Visible = 0 'False WhatsThisHelpID = 150 Width = 4680 End Begin VB.TextBox vc Appearance = 0 'Flat BorderStyle = 0 'None Height = 250 Left = 2.00000e5 TabIndex = 4 Tag = "2" Top = 975 Visible = 0 'False WhatsThisHelpID = 1425 Width = 975 End Begin 手机说说发表工具.TzButton submit Height = 585 Left = 2.00000e5 Tag = "2" Top = 1710 Visible = 0 'False WhatsThisHelpID = 1192 Width = 2610 _ExtentX = 4604 _ExtentY = 1032 Caption = "提交" BackColor = 49344 StartColor = 49344 FinshColor = 65535 BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "微软雅黑" Size = 14.25 Charset = 134 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin VB.TextBox password Appearance = 0 'Flat BorderStyle = 0 'None Height = 250 IMEMode = 3 'DISABLE Left = 1684 PasswordChar = "*" TabIndex = 2 Tag = "1" Top = 1410 WhatsThisHelpID = 1684 Width = 2500 End Begin VB.TextBox username Appearance = 0 'Flat BorderStyle = 0 'None Height = 250 Left = 1684 TabIndex = 1 Tag = "1" Top = 990 WhatsThisHelpID = 1684 Width = 2500 End Begin 手机说说发表工具.TzButton close Height = 345 Left = 4650 Tag = "-1" Top = 0 WhatsThisHelpID = 4650 Width = 345 _ExtentX = 609 _ExtentY = 609 Caption = "r" BackColor = 192 StartColor = 192 FinshColor = 255 BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "Webdings" Size = 9 Charset = 2 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin 手机说说发表工具.TzButton Login Height = 405 Left = 1605 Tag = "1" Top = 1950 WhatsThisHelpID = 1605 Width = 1785 _ExtentX = 3149 _ExtentY = 714 Caption = "登录手机QQ" BackColor = 49152 StartColor = 49152 FinshColor = 65280 BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "宋体" Size = 9 Charset = 134 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin VB.Label Label4 Appearance = 0 'Flat AutoSize = -1 'True BackColor = &H80000005& BackStyle = 0 'Transparent Caption = "小尾巴" BeginProperty Font Name = "微软雅黑" Size = 10.5 Charset = 134 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000008& Height = 300 Left = 2.00000e5 TabIndex = 9 Tag = "3" Top = 2610 Visible = 0 'False WhatsThisHelpID = 165 Width = 630 End Begin VB.Label prefix AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "加载中..." BeginProperty Font Name = "微软雅黑" Size = 12 Charset = 134 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = 2.00000e5 TabIndex = 6 Tag = "3" Top = 540 Visible = 0 'False WhatsThisHelpID = 1140 Width = 960 End Begin VB.Image headimg Height = 600 Left = 2.00000e5 Tag = "3" Top = 420 Visible = 0 'False WhatsThisHelpID = 375 Width = 600 End Begin VB.Label Label3 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "验证码" BeginProperty Font Name = "微软雅黑" Size = 10.5 Charset = 134 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 300 Left = 2.00000e5 TabIndex = 5 Tag = "2" Top = 945 Visible = 0 'False WhatsThisHelpID = 705 Width = 630 End Begin VB.Image vcimg Height = 600 Left = 2.00000e5 Tag = "2" Top = 810 Visible = 0 'False WhatsThisHelpID = 2520 Width = 1485 End Begin VB.Label Label2 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "QQ密码" BeginProperty Font Name = "微软雅黑" Size = 10.5 Charset = 134 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 300 Left = 811 TabIndex = 3 Tag = "1" Top = 1380 WhatsThisHelpID = 811 Width = 750 End Begin VB.Label Label1 AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "QQ账号" BeginProperty Font Name = "微软雅黑" Size = 10.5 Charset = 134 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 300 Left = 811 TabIndex = 0 Tag = "1" Top = 960 WhatsThisHelpID = 811 Width = 750 End End End Attribute VB_Name = "Frm_Main" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Dim qq As String Dim pwd As String Dim sid As String Dim r_sid As String Dim nike As String Dim headpic As String Dim vcpic As String Private Sub clear_Click() content = "" suffix = "" End Sub Private Sub close_Click() Unload Me End End Sub Private Function mids(str As String) As String mids = Mid(str, 2, Len(str) - 2) End Function Private Sub Login_Click() If Len(username) = 0 Then MsgBox "请输入QQ账号!", 0, "提示": Exit Sub If Len(password) = 0 Then MsgBox "请输入QQ密码!", 0, "提示": Exit Sub TzTab.TabID = 2 Call Analysis(flogin(username, password)) End Sub Private Sub username_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Login_Click End Sub Private Sub password_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Login_Click End Sub Private Sub send_Click() Dim tmp As String tmp = content.Text If Len(tmp) = 0 Then MsgBox "请填写内容!", 0, "提示": Exit Sub Dim PostData, PostUrl As String PostUrl = "http://m.qzone.com/mood/publish_mood" PostData = "opr_type=publish_shuoshuo&res_uin=" & qq & "&content=" & tmp & "&richval=&lat=0&lon=0&lbsid=&issyncweibo=0&format=json&sid=" & sid & "&is_winphone=2&source_name=" & suffix Dim strAlbum As String strAlbum = XmlHttp.PostData(PostUrl, PostData, ResponseBodyToText, , False) If InStr(1, strAlbum, "请先登录") Then MsgBox strAlbum, 0, "发表说说失败!" TzTab.TabID = 1 Else MsgBox "发表说说成功!", 0, "提示" End If End Sub Private Sub submit_Click() If Len(vc) = 0 Then MsgBox "请输入验证码!", 0, "提示": Exit Sub TzTab.TabID = 3 Call Analysis(slogin(username, r_sid, vc)) End Sub Public Function Analysis(ByVal strAlbum As String) Debug.Print strAlbum Dim arr() As String arr = Split(strAlbum, ",") Select Case arr(2) Case 0 '登陆成功 qq = arr(1) sid = mids(arr(4)) nike = mids(arr(5)) headpic = mids(arr(6)) headimg.Picture = XmlHttp.LoadPicture(headpic) prefix = nike Exit Function Case 40001 '验证码错误或需要验证码 r_sid = mids(arr(4)) vcpic = mids(arr(5)) & ".gif" vcimg.Picture = XmlHttp.LoadPicture(vcpic) TzTab.TabID = 2 Exit Function Case 40010 '账号密码错误 TzTab.TabID = 1 End Select TzTab.TabID = 1 MsgBox arr(3), vbCritical, "登陆错误!" End Function Public Function flogin(ByVal qq As String, ByVal pwd As String) As String Dim PostData, PostUrl, pmd5 As String Dim MD5 As New clsMD5 pmd5 = MD5.DigestStrToHexStr(password) PostUrl = "http://pt.3g.qq.com/login?act=json&format=3" PostData = "bid_code=qqchatLogin&qq=" + qq + "&pmd5=" + pmd5 + "&go_url=undefined" flogin = mids(XmlHttp.PostData(PostUrl, PostData, ResponseBodyToText)) End Function Public Function slogin(ByVal qq As String, ByVal r_sid As String, ByVal vcode As String) Dim PostData, PostUrl PostUrl = "http://pt.3g.qq.com/login?act=json&format=3" PostData = "bid_code=qqchatLogin&r_sid=" + r_sid + "&verify=" + vcode + "&u_token=" + qq + "&qq=" + qq + "&go_url=undefined" slogin = mids(XmlHttp.PostData(PostUrl, PostData, ResponseBodyToText)) End Function Private Sub TzTab_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) Frm.hMove (Me.hWnd) End Sub Private Sub vc_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then submit_Click End Sub Private Sub vcimg_Click() vcimg.Picture = XmlHttp.LoadPicture(vcpic) End Sub