-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSpammer.cs
666 lines (556 loc) · 19.6 KB
/
Spammer.cs
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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using LithiumSpammer.Utilities;
using System.Threading.Tasks;
using System.Windows.Forms;
using Leaf.xNet;
using LithiumSpammer.raidlib;
using System.Threading;
using System.Web.Profile;
using static LithiumSpammer.raidlib.Client;
using Newtonsoft.Json;
using System.Xml.Linq;
using System.Web.UI;
using Guna.UI2.WinForms;
using Newtonsoft.Json.Linq;
namespace LithiumSpammer
{
public partial class Spammer : Form
{
public string[] tokens = new string[0];
Client[] clients = new Client[0];
public string[] socks5proxies = new string[0];
public string[] socks4proxies = new string[0];
public string[] httpproxies = new string[0];
Token_Generator TokenGenerator = new Token_Generator();
Token_Checker TokenChecker = new Token_Checker();
public Spammer()
{
InitializeComponent();
proxytype_dd.SelectedIndex = 0;
guna2ComboBox1.SelectedIndex = 0;
tokens = File.Exists("tokens.txt") ? File.ReadAllText("tokens.txt").Split('\n') : new string[0];
if (tokens.Length == 1 && tokens[0] == "") tokens = new string[0];
tokens_label.Text = "Tokens: " + tokens.Length;
updateClients();
socks5proxies = File.Exists("socks5.txt") ? File.ReadAllLines("socks5.txt") : new string[0];
socks5_label.Text = "Socks5: " + socks5proxies.Length;
socks4proxies = File.Exists("socks4.txt") ? File.ReadAllLines("socks4.txt") : new string[0];
socks4_label.Text = "Socks4: " + socks4proxies.Length;
httpproxies = File.Exists("http.txt") ? File.ReadAllLines("http.txt") : new string[0];
http_label.Text = "Http: " + httpproxies.Length;
if (!File.Exists("accounts.txt")) File.Create("accounts.txt");
}
public void updateClients()
{
clients = new Client[tokens.Length];
for (int i = 0; i < tokens.Length; i++)
{
clients[i] = new Client(tokens[i]);
clients[i].GotUID += Client_GotUID;
}
}
private void Client_GotUID(object sender, object profile)
{
string profileJson = profile.ToString();
var profileData = JsonConvert.DeserializeObject<ProfileData>(profileJson);
clientsDataGridView.Invoke((MethodInvoker)delegate
{
clientsDataGridView.Rows.Add(profileData?.user?.Id, profileData?.user?.Name, profileData?.user?.Email);
});
}
private class UserData
{
public string Id { get; set; }
public string Name { get; set; }
public string Email { get; set; }
}
private class ProfileData
{
public UserData user { get; set; }
}
public ProxyClient getProxy()
{
Random random = new Random();
if (proxytype_dd.SelectedText == "Socks5")
{
return Socks5ProxyClient.Parse(socks5proxies[random.Next(0, socks5proxies.Length - 1)]);
}
if (proxytype_dd.SelectedText == "Socks4")
{
return Socks4ProxyClient.Parse(socks4proxies[random.Next(0, socks4proxies.Length - 1)]);
}
return HttpProxyClient.Parse(httpproxies[random.Next(0, httpproxies.Length - 1)]);
}
public string getProxyType()
{
return proxytype_dd.SelectedText;
}
private void exit_btn_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void minimalize_btn_Click(object sender, EventArgs e)
{
base.WindowState = FormWindowState.Minimized;
}
private void cleartokens_btn_Click(object sender, EventArgs e)
{
File.WriteAllText("tokens.txt", "");
Array.Clear(tokens, 0, tokens.Length);
tokens_label.Text = "Tokens: 0";
updateClients();
}
private void clearproxies_btn_Click(object sender, EventArgs e)
{
File.WriteAllText("http.txt", "");
File.WriteAllText("socks4.txt", "");
File.WriteAllText("socks5.txt", "");
Array.Clear(socks4proxies, 0, socks4proxies.Length);
Array.Clear(socks5proxies, 0, socks5proxies.Length);
Array.Clear(httpproxies, 0, httpproxies.Length);
socks4_label.Text = "Socks4: 0";
socks5_label.Text = "Socks5: 0";
http_label.Text = "Http: 0";
}
public void scrapproxies_btn_Click(object sender, EventArgs e)
{
WebClient webClient = new WebClient();
string text = webClient.DownloadString("https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/http.txt");
string text2 = webClient.DownloadString("https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/socks4.txt");
string text3 = webClient.DownloadString("https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/socks5.txt");
socks4_label.Text = "Socks4: " + text2.Length;
socks5_label.Text = "Socks5: " + text3.Length;
http_label.Text = "Http: " + text.Length;
File.WriteAllText("http.txt", text);
File.WriteAllText("socks4.txt", text2);
File.WriteAllText("socks5.txt", text3);
}
private void UpdateTokensLabel(string text)
{
if (tokens_label.InvokeRequired)
{
tokens_label.BeginInvoke(new Action<string>(UpdateTokensLabel), text);
}
else
{
tokens_label.Text = text;
}
}
private void UpdateGeneratedTokensMtb(string text)
{
if (generatedtokens_mtb.InvokeRequired)
{
generatedtokens_mtb.BeginInvoke(new Action<string>(UpdateGeneratedTokensMtb), text);
}
else
{
generatedtokens_mtb.Text += text + "\n";
}
}
private async void generate_btn_ClickAsync(object sender, EventArgs e)
{
string element = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
Random random = new Random();
int waitMS = guna2TrackBar1.Value;
await Task.Run(() =>
{
Parallel.For(0, (int)amountgen_numud.Value, i =>
{
string username = usernamegen_tb.Text;
if (randomusername_cb.Checked)
{
username = new string((from s in Enumerable.Repeat(element, decimal.ToInt32(randlength_numud.Value))
select s[random.Next(s.Length)]).ToArray());
}
string password = new string((from s in Enumerable.Repeat(element, 12)
select s[random.Next(s.Length)]).ToArray());
string email = new string((from s in Enumerable.Repeat(element, decimal.ToInt32(randlength_numud.Value))
select s[random.Next(s.Length)]).ToArray()) + "@gmail.com";
string token = TokenGenerator.GenerateToken(username, password, email, autojoingen_cb.Checked, invitecodegen_tb.Text);
Invoke((MethodInvoker)delegate
{
if (token != "" && !token.StartsWith("{"))
{
tokens.Append(token);
UpdateTokensLabel("Tokens: " + (tokens.Length + 1));
UpdateGeneratedTokensMtb(token);
File.AppendAllText("tokens.txt", token + "\n");
File.AppendAllText("accounts.txt", email + ":" + password + "\n");
updateClients();
}
else
{
UpdateGeneratedTokensMtb(token);
}
});
});
});
}
private async void create_btn_Click(object sender, EventArgs e)
{
await Task.Run(() =>
{
string username = guna2TextBox3.Text;
string password = guna2TextBox4.Text;
string email = guna2TextBox5.Text;
string element = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
Random random = new Random();
if (randusername_cb.Checked)
{
username = new string((from s in Enumerable.Repeat(element, decimal.ToInt32(randlength_numud.Value))
select s[random.Next(s.Length)]).ToArray());
}
if (randpswd_cb.Checked)
{
password = new string((from s in Enumerable.Repeat(element, 12)
select s[random.Next(s.Length)]).ToArray());
}
if (randemail_cb.Checked)
{
email = new string((from s in Enumerable.Repeat(element, decimal.ToInt32(randlength_numud.Value))
select s[random.Next(s.Length)]).ToArray()) + "@gmail.com";
}
string token = TokenGenerator.GenerateToken(username, password, email, autojoincreate_cb.Checked, invitecodecreate_tb.Text);
if (token != "" && !token.StartsWith("{"))
{
tokens.Append(token);
UpdateTokensLabel("Tokens: " + (tokens.Length + 1));
UpdateGeneratedTokensMtb(token);
File.AppendAllText("tokens.txt", token + "\n");
File.AppendAllText("accounts.txt", email + ":" + password + "\n");
updateClients();
}
else
{
UpdateGeneratedTokensMtb(token);
}
});
}
private void loadtokens_btn_Click(object sender, EventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "Text files (*.txt)|*.txt";
openFileDialog.Multiselect = false;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
string[] lines = File.ReadAllLines(openFileDialog.FileName);
tokens = lines;
tokens_label.Text = "Tokens: " + tokens.Length;
generatedtokens_mtb.Lines = tokens;
}
updateClients();
}
private void topmost_cb_CheckedChanged(object sender, EventArgs e)
{
base.TopMost = topmost_cb.Checked;
}
//private async void friend_btn_Click(object sender, EventArgs e)
//{
// foreach (string token in tokens)
// {
// await Task.Run(() =>
// {
// try
// {
// Client bot = new Client(token);
// bot.addfriend(guna2TextBox1.Text);
// }
// catch (Exception ex)
// {
// }
// });
// }
//}
//private async void unfriend_btn_Click(object sender, EventArgs e)
//{
// foreach (string token in tokens)
// {
// await Task.Run(() =>
// {
// try
// {
// Client bot = new Client(token);
// bot.unfriend(guna2TextBox1.Text);
// }
// catch (Exception ex)
// {
// }
// });
// }
//}
private async void friend_btn_Click(object sender, EventArgs e)
{
List<Task> tasks = new List<Task>();
foreach (Client bot in clients)
{
Task task = Task.Run(() =>
{
bot.addFriend(guna2TextBox1.Text);
});
tasks.Add(task);
}
await Task.WhenAll(tasks);
}
private async void unfriend_btn_Click(object sender, EventArgs e)
{
List<Task> tasks = new List<Task>();
foreach (Client bot in clients)
{
Task task = Task.Run(() =>
{
bot.unFriend(guna2TextBox1.Text);
});
tasks.Add(task);
}
await Task.WhenAll(tasks);
}
private async void guna2Button2_ClickAsync(object sender, EventArgs e)
{
List<Task> tasks = new List<Task>();
foreach (Client bot in clients)
{
Task task = Task.Run(() =>
{
bot.joinGuild(guna2TextBox2.Text);
});
tasks.Add(task);
}
await Task.WhenAll(tasks);
}
private async void guna2Button1_Click(object sender, EventArgs e)
{
List<Task> tasks = new List<Task>();
foreach (Client bot in clients)
{
Task task = Task.Run(() =>
{
bot.leaveGuild(guna2TextBox14.Text);
});
tasks.Add(task);
}
await Task.WhenAll(tasks);
}
private async void guna2Button6_Click(object sender, EventArgs e)
{
List<Task> tasks = new List<Task>();
foreach (Client bot in clients)
{
Task task = Task.Run(() =>
{
bot.clearStatus();
});
tasks.Add(task);
}
await Task.WhenAll(tasks);
}
private async void guna2Button7_Click(object sender, EventArgs e)
{
List<Task> tasks = new List<Task>();
string element = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
Random random = new Random();
for (int i = 0; i < clients.Length; i++)
{
Client bot = clients[i];
string username = guna2TextBox8.Text;
if (guna2CheckBox1.Checked)
{
username = new string((from s in Enumerable.Repeat(element, decimal.ToInt32(guna2NumericUpDown1.Value))
select s[random.Next(s.Length)]).ToArray());
}
Task task = Task.Run(() =>
{
bot.setUsername(username);
});
tasks.Add(task);
}
await Task.WhenAll(tasks);
}
private async void guna2Button3_Click(object sender, EventArgs e)
{
List<Task> tasks = new List<Task>();
foreach (Client bot in clients)
{
string statusText = guna2TextBox6.Text;
int emoji = int.Parse(guna2TextBox6.Text);
if (guna2TextBox6.Text == "") emoji = 0;
if (statusText != null)
{
Task task = Task.Run(() =>
{
bot.setStatus(statusText, emoji);
});
tasks.Add(task);
}
}
await Task.WhenAll(tasks);
}
private async void guna2Button12_Click(object sender, EventArgs e)
{
List<Task> tasks = new List<Task>();
foreach (Client bot in clients)
{
string sid = guna2TextBox14.Text;
if (sid != null)
{
Task task = Task.Run(() =>
{
bot.joinVC(sid);
});
tasks.Add(task);
}
}
await Task.WhenAll(tasks);
}
private async void guna2Button13_Click(object sender, EventArgs e)
{
List<Task> tasks = new List<Task>();
foreach (Client bot in clients)
{
string sid = guna2TextBox14.Text;
if (sid != null)
{
Task task = Task.Run(() =>
{
bot.leaveVC(sid);
});
tasks.Add(task);
}
}
await Task.WhenAll(tasks);
}
private async void guna2Button10_Click(object sender, EventArgs e)
{
List<Task> tasks = new List<Task>();
foreach (Client bot in clients)
{
string sid = guna2TextBox11.Text;
string mid = guna2TextBox12.Text;
string rid = guna2TextBox13.Text;
if (sid != null && mid != null && rid != null)
{
Task task = Task.Run(() =>
{
bot.addReaction(sid, mid, rid);
});
tasks.Add(task);
}
}
await Task.WhenAll(tasks);
}
private async void guna2Button11_Click(object sender, EventArgs e)
{
List<Task> tasks = new List<Task>();
foreach (Client bot in clients)
{
string sid = guna2TextBox11.Text;
string mid = guna2TextBox12.Text;
string rid = guna2TextBox13.Text;
if (sid != null && mid != null && rid != null)
{
Task task = Task.Run(() =>
{
bot.removeReaction(sid, mid, rid);
});
tasks.Add(task);
}
}
await Task.WhenAll(tasks);
}
private async void guna2Button4_Click(object sender, EventArgs e)
{
List<Task> tasks = new List<Task>();
foreach (Client bot in clients)
{
string presence = guna2ComboBox1.Text;
Task task = Task.Run(() =>
{
bot.setPresence(presence);
});
tasks.Add(task);
}
await Task.WhenAll(tasks);
}
private bool stopSendingMessages = false;
private async void guna2Button9_Click(object sender, EventArgs e)
{
stopSendingMessages = false;
guna2Button9.Enabled = false;
guna2Button8.Enabled = true;
while (!stopSendingMessages)
{
double WaitMS = guna2TrackBar2.Value;
List<Task> tasks = new List<Task>();
foreach (Client bot in clients)
{
string text = guna2TextBox10.Text;
string cid = guna2TextBox9.Text;
double time = guna2TrackBar2.Value;
Task task = Task.Run(() =>
{
bot.sendMessage(text, cid);
});
tasks.Add(task);
}
await Task.WhenAll(tasks);
await Task.Delay(TimeSpan.FromMilliseconds(WaitMS));
}
guna2Button9.Enabled = true;
guna2Button8.Enabled = false;
}
private void guna2Button8_Click(object sender, EventArgs e)
{
stopSendingMessages = true;
}
private void guna2TrackBar1_ValueChanged(object sender, EventArgs e)
{
label8.Text = guna2TrackBar1.Value.ToString();
}
private void guna2Button5_Click(object sender, EventArgs e)
{
if (!File.Exists("tokens.txt"))
{
File.Create("tokens.txt");
}
else
{
string text = File.ReadAllText("tokens.txt");
string[] array = text.Split('\n');
tokens = array;
tokens_label.Text = "Tokens: " + array.Length;
updateClients();
}
}
private void guna2TrackBar2_ValueChanged(object sender, EventArgs e)
{
label11.Text = guna2TrackBar2.Value.ToString();
}
private void friender_Click(object sender, EventArgs e)
{
}
private void guna2Button14_Click(object sender, EventArgs e)
{
string[] lines = File.ReadAllLines("accounts.txt");
foreach (string line in lines)
{
string[] accountParts = line.Split(':');
string email = accountParts[0].Trim();
string password = accountParts[1].Trim();
bool isValid = TokenChecker.isValidAccount(email, password);
Console.WriteLine(isValid);
if (isValid)
{
string token = TokenChecker.getAccountToken(email, password);
Console.WriteLine(token);
Array.Resize(ref tokens, tokens.Length + 1);
tokens[tokens.Length - 1] = token;
UpdateTokensLabel("Tokens: " + (tokens.Length + 1));
File.AppendAllText("tokens.txt", token + "\n");
}
}
}
}
}