首页 > 安全资讯 >

VB.NET实现的QQ消息群炸机(全源码)

05-01-15

作者:Dream    文章来源:www.csdn.net 全部代码在Windows Server 2003 + Visual Studio.net 2003中运行并通过,作者开始时写的题目为《QQ消息轰炸机》,但编译后发现并不是轰炸,却可以“群炸”,后来通读一遍代

作者:Dream    文章来源:www.csdn.net

全部代码在Windows Server 2003 + Visual Studio.net 2003中运行并通过,作者开始时写的题目为《QQ消息轰炸机》,但编译后发现并不是轰炸,却可以“群炸”,后来通读一遍代码后发现确实是“群炸”机,至于开头中的注释,应该是作者的本意或者是笔误吧,不管怎么说,这些实实在在的代码可以帮助程序设计爱好者更多更好的学习。

  ***************************************
QQ消息轰炸机源代码(VB.NET)
wgscd 2005-1-1

***************************************
Public Class Form1
    Inherits System.Windows.Forms.Form
    Private Declare Function FindWindowEx Lib "user32.dll" Alias "FindWindowExA" (ByVal hWnd1 As Int32, ByVal hWnd2 As Int32, ByVal lpsz1 As String, ByVal lpsz2 As String) As Int32
    Private Declare Function GetWindowText Lib "user32.dll" Alias "GetWindowTextA" (ByVal hwnd As Int32, ByVal lpString As String, ByVal cch As Int32) As Int32
    Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Int32
    Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Int32
    Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As String) As Int32
    Private Const WM_PASTE As Int32 = &H302
    Private Const WM_SETTEXT As Int32 = &HC
    Private Const WM_KEYDOWN As Int32 = &H100
    Private Const WM_KEYUP As Int32 = &H101
    Private Const WM_LBUTTONDOWN As Int32 = &H201
    Private Const WM_LBUTTONUP As Int32 = &H202

    Private Const WM_SHOWWINDOW As Int32 = &H18
    Private Const SW_NORMAL As Int32 = 1
    Private Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Int32, ByVal nCmdShow As Int32) As Int32
    Private Declare Function GetLastError Lib "kernel32.dll" () As Int32
    Private Const SW_SHOWNOACTIVATE As Int32 = 4
    Private Declare Function SetWindowText Lib "user32.dll" Alias "SetWindowTextA" (ByVal hwnd As Int32, ByVal lpString As String) As Int32
    Private Const SW_HIDE As Int32 = 0
    Private Const SW_SHOW As Int32 = 5

    Dim sMess As String
    Dim hwnd, hwnd2, hwnd3, i, iDelay As Int32
    Dim hWndTalk(20), hWndEdit(20), hWndSend(20) As Int32
    Dim MyThread As Threading.Thread
#Region " Windows 窗体设计器生成的代码 "

    Public Sub New()
        MyBase.New()

        该调用是 Windows 窗体设计器所必需的。
        InitializeComponent()

        在 InitializeComponent() 调用之后添加任何初始化

    End Sub

    窗体重写 dispose 以清理组件列表。
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    Windows 窗体设计器所必需的
    Private components As System.ComponentModel.IContainer

    注意: 以下过程是 Windows 窗体设计器所必需的
    可以使用 Windows 窗体设计器修改此过程。
    不要使用代码编辑器修改它。

    Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents ButtonRefresh As System.Windows.Forms.Button
    Friend WithEvents ButtonStart As System.Windows.Forms.Button
    Friend WithEvents ButtonStop As System.Windows.Forms.Button
    Friend WithEvents RadioButton1 As System.Windows.Forms.RadioButton
    Friend WithEvents RadioButton2 As System.Windows.Forms.RadioButton
    Friend WithEvents ListView1 As System.Windows.Forms.ListView
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.ButtonRefresh = New System.Windows.Forms.Button
        Me.ButtonStart = New System.Windows.Forms.Button
        Me.TextBox1 = New System.Windows.Forms.TextBox
        Me.Label1 = New System.Windows.Forms.Label
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.ListView1 = New System.Windows.Forms.ListView
        Me.RadioButton2 = New System.Windows.Forms.RadioButton
        Me.RadioButton1 = New System.Windows.Forms.RadioButton
        Me.ButtonStop = New System.Windows.Forms.Button
        Me.Label3 = New System.Windows.Forms.Label
        Me.GroupBox1.SuspendLayout()
        Me.SuspendLayout()
       
        ButtonRefresh
       
        Me.ButtonRefresh.Location = New System.Drawing.Point(16, 80)
        Me.ButtonRefresh.Name = "ButtonRefresh"
        Me.ButtonRefresh.Size = New System.Drawing.Size(56, 24)
        Me.ButtonRefresh.TabIndex = 0
        Me.ButtonRefresh.Text = "刷新"
       
        ButtonStart
       
        Me.ButtonStart.Location = New System.Drawing.Point(16, 116)
        Me.ButtonStart.Name = "ButtonStart"
        Me.ButtonStart.Size = New System.Drawing.Size(56, 24)
        Me.ButtonStart.TabIndex = 1
        Me.ButtonStart.Text = "开始"
       
        TextBox1
       
        Me.TextBox1.AutoSize = False
        Me.TextBox1.Location = New System.Drawing.Point(16, 21

相关文章
最新文章
热点推荐