VB编QQ轰炸机!简单实用的!
发布网友
发布时间:2022-04-22 01:11
我来回答
共3个回答
热心网友
时间:2024-11-16 02:59
'窗口上一个List1,一个Text1,一个Timer1控件 和三个按钮Command1,Command2,Command3,分别命名为"获取","发送","连发",即可。Command1按钮式为了获得和你聊天的窗口,Command2是指你要发送的信息。Command3是开始连发的标志。
不过好像没什么意思!!!
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal Hwnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_GETTEXT = &HD
Private Const EM_REPLACESEL = &HC2
Private Const BM_CLICK = &HF5
Dim Num1 As Long, QQTextHwnd As Long
Dim TempLog As Long
Dim TempMSG As String
Dim ButtonHwd As Long
Private Function GetWinText(ByVal WinHwnd As Long) As String
Dim ILen As Long
GetWinText = String(255, Chr(0))
ILen = SendMessage(WinHwnd, WM_GETTEXT, Len(GetWinText), ByVal GetWinText)
GetWinText = Left(GetWinText, ILen)
End Function
Private Sub Command1_Click()
List1.Clear
Dim hFindWnd As Long
hFindWnd = FindWindowEx(0, 0, "#32770", vbNullString)
Do While hFindWnd <> 0
If InStr(GetWinText(hFindWnd), "聊天中") > 0 Or InStr(GetWinText(hFindWnd), "交谈中") > 0 Then
List1.AddItem GetWinText(hFindWnd)
End If
hFindWnd = FindWindowEx(0, hFindWnd, "#32770", vbNullString)
Loop
If List1.ListCount = 0 Then
MsgBox "QQ消息窗体没有打开", 64, "提示"
End If
End Sub
Private Sub Command2_Click()
Dim QQHwnd As Long, RHwnd As Long
If List1.ListCount = 0 Then
MsgBox "QQ消息窗体没有打开", 64, "提示"
Exit Sub
End If
QQHwnd = FindWindow("#32770", List1.Text)
QQHwnd = FindWindowEx(QQHwnd, 0, "#32770", vbNullString)
QQTextHwnd = FindWindowEx(QQHwnd, 0, "AfxWnd42", vbNullString)
QQTextHwnd = FindWindowEx(QQHwnd, QQTextHwnd, "AfxWnd42", vbNullString)
QQTextHwnd = FindWindowEx(QQTextHwnd, 0, "RichEdit20A", vbNullString)
If QQTextHwnd = 0 Then
MsgBox "没有找到消息文本"
End If
RHwnd = FindWindowEx(QQHwnd, 0, "Button", "发送(S)")
ButtonHwd = RHwnd
TempLog = SendMessage(QQTextHwnd, EM_REPLACESEL, 0, ByVal Text1.Text)
SendMessage RHwnd, BM_CLICK, 0, 0
End Sub
Private Sub Command3_Click()
If Command3.Caption = "连发(&T)" Then
Command3.Caption = "停止(&T)"
Timer1.Enabled = True
Else
Command3.Caption = "连发(&T)"
Timer1.Enabled = False
End If
End Sub
Private Sub Form_Load()
Command1.Caption = "获取(&Q)"
Command2.Caption = "发送(&S)"
Command3.Caption = "连发(&T)"
Text1.Text = ""
Timer1.Interval = 100
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Num1 = Num1 + 1
TempMSG = Text1.Text & vbCrLf & "统计:第" & Num1 & "连发消息"
SendMessage QQTextHwnd, EM_REPLACESEL, 0, ByVal TempMSG
SendMessage ButtonHwd, BM_CLICK, 0, 0
End Sub
热心网友
时间:2024-11-16 03:00
sendkeys……你自己查。
不过对于这种不道德的行为表示鄙视……
热心网友
时间:2024-11-16 03:00
sendkey……你自己查。不错对于这种不道德的行为表示鄙视……