C#基于QQvoice做的电话轰炸机

前段时间一直接到各种的骚扰电话或者是诈骗电话,郁闷死了,后来打算在网上找个电话轰炸机,教训教训他们,但是着了N久也没有一个合适的,所以就打算自己来实现一个算了,反正网上有那么多的免费电话,经过一些筛选,最后选了QQvoice,其他的没选因为他们的哪些拨号按键根本就不是控件,估计是像QQ那样,直接画出来的。

原理很简单,用C#控制某窗体的组件,就是找到各个号码控件,PostMessage给发送按下指令,然后点击拨号,等待相应时间,再按下挂断键,重复循环这个过程,因为当时手边有一堆电话,所以也不是针对某一个号进行拨打,可以给出一批号码。

使用的时候,需要先自己运行起qqvoice来,还需要在轰炸机里填上qqvoice的id号,填上要轰的手机号码,就可以开始了。

贴点主要代码,文章末尾有整个工程的下载包

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;

namespace AutoCall
{
public partial class Form1 : Form
{
public IntPtr jian = IntPtr.Zero, b_1 = IntPtr.Zero, b_2 = IntPtr.Zero, b_3 = IntPtr.Zero, b_4 = IntPtr.Zero, b_5 = IntPtr.Zero, b_6 = IntPtr.Zero, b_7 = IntPtr.Zero, b_8 = IntPtr.Zero, b_9 = IntPtr.Zero, b_0 = IntPtr.Zero, call = IntPtr.Zero, hangup = IntPtr.Zero;
public Thread SoftBeginThread;
public string phoneNum;
public Form1()
{
InitializeComponent();
this.MaximizeBox = false;
}

private void Form1_Load(object sender, EventArgs e)
{
changeUI(0);
}

private void beginCall() {
this.setHandle();
while (true)
{
Action param1 = s => GetNum(s);
this.Invoke(param1, "");

for (int j = 0; j {
this.click("jian");
}

for (int i = 0; i {
try
{
string s = phoneNum.Substring(i, 1);
this.click(s);
Thread.Sleep(500);
}
catch { }
}
Thread.Sleep(5 * 1000);
this.click("start");
Thread.Sleep(Int32.Parse(this.eachtimes.Text) * 1000);
this.click("end");
Thread.Sleep(5 * 1000);
}
}

private void click(string i) {
const int WM_LBUTTONDOWN = 0x0201;
const int WM_LBUTTONUP = 0x0202;
if (i == "1")
{
Program.PostMessage(b_1, WM_LBUTTONDOWN, 0, 0);
Program.PostMessage(b_1, WM_LBUTTONUP, 0, 0);
}
if (i == "2") {
Program.PostMessage(b_2, WM_LBUTTONDOWN, 0, 0);
Program.PostMessage(b_2, WM_LBUTTONUP, 0, 0);
}
if (i == "3")
{
Program.PostMessage(b_3, WM_LBUTTONDOWN, 0, 0);
Program.PostMessage(b_3, WM_LBUTTONUP, 0, 0);
}
if (i == "4")
{
Program.PostMessage(b_4, WM_LBUTTONDOWN, 0, 0);
Program.PostMessage(b_4, WM_LBUTTONUP, 0, 0);
}
if (i == "5")
{
Program.PostMessage(b_5, WM_LBUTTONDOWN, 0, 0);
Program.PostMessage(b_5, WM_LBUTTONUP, 0, 0);
}
if (i == "6")
{
Program.PostMessage(b_6, WM_LBUTTONDOWN, 0, 0);
Program.PostMessage(b_6, WM_LBUTTONUP, 0, 0);
}
if (i == "7")
{
Program.PostMessage(b_7, WM_LBUTTONDOWN, 0, 0);
Program.PostMessage(b_7, WM_LBUTTONUP, 0, 0);
}
if (i == "8")
{
Program.PostMessage(b_8, WM_LBUTTONDOWN, 0, 0);
Program.PostMessage(b_8, WM_LBUTTONUP, 0, 0);
}
if (i == "9")
{
Program.PostMessage(b_9, WM_LBUTTONDOWN, 0, 0);
Program.PostMessage(b_9, WM_LBUTTONUP, 0, 0);
}
if (i == "0")
{
Program.PostMessage(b_0, WM_LBUTTONDOWN, 0, 0);
Program.PostMessage(b_0, WM_LBUTTONUP, 0, 0);
}
if (i == "jian")
{
Program.PostMessage(jian, WM_LBUTTONDOWN, 0, 0);
Program.PostMessage(jian, WM_LBUTTONUP, 0, 0);
}
if (i == "start")
{
Program.PostMessage(call, WM_LBUTTONDOWN, 0, 0);
Program.PostMessage(call, WM_LBUTTONUP, 0, 0);
}
if (i == "end")
{
Program.PostMessage(hangup, WM_LBUTTONDOWN, 0, 0);
Program.PostMessage(hangup, WM_LBUTTONUP, 0, 0);
}

}

private void setHandle() {
IntPtr hwndCalc = Program.FindWindow(null, "QQVoice");
IntPtr panel = Program.FindWindowEx(hwndCalc, IntPtr.Zero, null, this.uuid.Text);
this.call = Program.FindWindowEx(panel, IntPtr.Zero, "Button", "call");
this.hangup = Program.FindWindowEx(panel, IntPtr.Zero, "Button", "hang up");
IntPtr p = IntPtr.Zero;
do
{
p = Program.FindWindowEx(panel, p, "#32770", null);
if (!p.Equals(IntPtr.Zero))
{
if (!Program.FindWindowEx(p, IntPtr.Zero, "Button", "1").Equals(IntPtr.Zero))
{
this.b_1 = Program.FindWindowEx(p, IntPtr.Zero, "Button", "1");
}
if (!Program.FindWindowEx(p, IntPtr.Zero, "Button", "2").Equals(IntPtr.Zero))
{
this.b_2 = Program.FindWindowEx(p, IntPtr.Zero, "Button", "2");
}
if (!Program.FindWindowEx(p, IntPtr.Zero, "Button", "3").Equals(IntPtr.Zero))
{
this.b_3 = Program.FindWindowEx(p, IntPtr.Zero, "Button", "3");
}
if (!Program.FindWindowEx(p, IntPtr.Zero, "Button", "4").Equals(IntPtr.Zero))
{
this.b_4 = Program.FindWindowEx(p, IntPtr.Zero, "Button", "4");
}
if (!Program.FindWindowEx(p, IntPtr.Zero, "Button", "5").Equals(IntPtr.Zero))
{
this.b_5 = Program.FindWindowEx(p, IntPtr.Zero, "Button", "5");
}
if (!Program.FindWindowEx(p, IntPtr.Zero, "Button", "6").Equals(IntPtr.Zero))
{
this.b_6 = Program.FindWindowEx(p, IntPtr.Zero, "Button", "6");
}
if (!Program.FindWindowEx(p, IntPtr.Zero, "Button", "7").Equals(IntPtr.Zero))
{
this.b_7 = Program.FindWindowEx(p, IntPtr.Zero, "Button", "7");
}
if (!Program.FindWindowEx(p, IntPtr.Zero, "Button", "8").Equals(IntPtr.Zero))
{
this.b_8 = Program.FindWindowEx(p, IntPtr.Zero, "Button", "8");
}
if (!Program.FindWindowEx(p, IntPtr.Zero, "Button", "9").Equals(IntPtr.Zero))
{
this.b_9 = Program.FindWindowEx(p, IntPtr.Zero, "Button", "9");
}
if (!Program.FindWindowEx(p, IntPtr.Zero, "Button", "0").Equals(IntPtr.Zero))
{
this.b_0 = Program.FindWindowEx(p, IntPtr.Zero, "Button", "0");
jian = Program.FindWindowEx(p, IntPtr.Zero, "Button", "-");
}
//MessageBox.Show(this.jian);

}
} while (!p.Equals(IntPtr.Zero));
}

public void GetNum(string s)
{
String cont;

while (true)
{
try
{
Random ros = new Random();
int iR = ros.Next(0, this.phones.Lines.Length);
cont = this.phones.Lines[iR].ToString();
}
catch
{
cont = "";
}
if (cont != "") break;
}
this.phoneNum = cont;
}

private void changeUI(int s){
if(s==1){
this.start_btn.Enabled =false;
this.stop_btn.Enabled = true;
this.eachtimes.Enabled = false;
this.phones.Enabled = false;
this.uuid.Enabled = false;
}
else{
this.start_btn.Enabled =true;
this.stop_btn.Enabled = false;
this.eachtimes.Enabled = true;
this.phones.Enabled = true;
this.uuid.Enabled = true;
}

}

private void start_btn_Click(object sender, EventArgs e)
{
SoftBeginThread = new Thread(this.beginCall);
SoftBeginThread.SetApartmentState(ApartmentState.STA);
SoftBeginThread.Start();
changeUI(1);
}

private void stop_btn_Click(object sender, EventArgs e)
{
this.click("end");
SoftBeginThread.Abort();
changeUI(0);
}
}
}

工程下载:AutoCall