-
Notifications
You must be signed in to change notification settings - Fork 2
/
NGL_Spammer.py
553 lines (531 loc) · 19.3 KB
/
NGL_Spammer.py
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
# ╔╗╔╔═╗╦ ╔═╗╔═╗╔═╗╔╦╗╔╦╗╔═╗╦═╗
# ║║║║ ╦║ ╚═╗╠═╝╠═╣║║║║║║║╣ ╠╦╝
# ╝╚╝╚═╝╩═╝ ╚═╝╩ ╩ ╩╩ ╩╩ ╩╚═╝╩╚═ v4.3
# added account check
# The program was made for automation.
# This program violates NGL's terms of service, use it at your own risk!
# Also, I don't support using it for harassment.
# If you found a error, or you want a new feature please dm me on Telegram! t.me/bencewashere
import time
import requests
from random import *
from datetime import datetime
import uuid
import argparse
import hashlib
import sys
import os
parser = argparse.ArgumentParser(prog = 'NGL-Spammer', description='Flooding NGL accounts with questions.')
parser.add_argument("-a", "--account", help="Accounts separated with ','")
parser.add_argument("-q", "--question", help="Separate question(s) with ',' ('hi','what are you doing?')", type=str)
parser.add_argument("-r", "--repeat", help="Number of repetitions (0 = infinite)", type=int)
args = parser.parse_args()
global fiokokszama, jelenlegi, i, hossz, ismetles, kerdesekszama, holtartakerdesben, kerdesekpot, mennyitkuldott, kerdesek, fiokok, neverhave, haromwords, nevek, tbh, kissmarryblocklist, tizperde, rizzme, confessions, fiok, eszkozid, szavak, mit, gameslugkuld, kerdesarg, fiokarg, utolso, nemsikerult
fiokokszama = 0
jelenlegi = 0
i = 0
x = 0
hossz = 0
ismetles = 0
kerdesekszama = 0
holtartakerdesben = 0
kerdesekpot = ""
mennyitkuldott = []
kerdesek = []
fiokok = []
neverhave = []
haromwords = []
nevek = []
tbh = []
kissmarryblocklist = []
tizperde = []
rizzme = []
confessions = []
fiok = ""
eszkozid = ""
szavak = ""
mit = ""
gameslugkuld = ""
kerdesarg = ""
fiokarg = ""
utolso = ""
nemsikerult = 0
request = requests.Session()
def clear():
if os.name == "nt":
os.system("cls")
else:
os.system("clear")
def fiokokBeolvas():
global fiokok, mennyitkuldott, fiokokszama
with open("accounts.txt", "r") as olvas:
fiokok = [sorok.strip() for sorok in olvas]
mennyitkuldott = [1 for _ in range(len(fiokok))]
fiokokszama = len(fiokok)
def ellenorzes():
global fiokokszama, fiokok
hibak = 0
hibas = []
for o in range(fiokokszama):
time.sleep(3)
valasz = requests.get("https://ngl.link/{}".format(fiokok[o]))
if valasz.status_code == 200:
print("[OK] -> {} ".format(fiokok[o]))
else:
hibak = hibak + 1
hibas.append(fiokok[o])
print("[!] -> {} ".format(fiokok[o]))
clear()
fiokokStringx = ','.join(fiokok)
eredmenyx = hashlib.md5(fiokokStringx.encode())
with open("MD5.md5", mode='r+') as md5:
md5.seek(0)
md5.write(eredmenyx.hexdigest())
if hibak > 0:
print("There's {} accounts that does not exist.".format(hibak))
print("The accounts are:")
for g in range (len(hibas)):
print(hibas[g])
valasztas = ""
while valasztas not in ["Y", "N"]:
valasztas = input("The displayed accounts does not exist. Do you want to remove these? (Y/N): ")
valasztas = valasztas.upper()
if valasztas == "Y":
for g in range (len(hibas)):
fiokok.remove(hibas[g])
with open("accounts.txt", "w") as iras:
iras.write('\n'.join(fiokok))
print("Deleted!")
clear()
fiokokStringx = ','.join(fiokok)
eredmenyx = hashlib.md5(fiokokStringx.encode())
with open("MD5.md5", mode='r+') as md5:
md5.seek(0)
md5.write(eredmenyx.hexdigest())
elif valasztas == "N":
print("Your answer is NO, and it is possible that the program returns with a 404 error.")
fiokokStringx = ','.join(fiokok)
eredmenyx = hashlib.md5(fiokokStringx.encode())
with open("MD5.md5", mode='r+') as md5:
md5.seek(0)
md5.write(eredmenyx.hexdigest())
time.sleep(5)
clear()
def eszkozidgeneralas():
eszkozid = uuid.uuid4().hex
return "-".join([eszkozid[i:i+8] for i in range(0, 32, 8)])
def haromnevgeneralas():
for k in range(3):
szavak = (choice(nevek))
kissmarryblocklist.append(szavak.replace('\n', ''))
eszkozidgeneralas()
eszkozid = eszkozidgeneralas()
def kerdesekBeolvas():
global kerdesek, kerdesekpot, neverhave, haromwords, nevek, tbh, tizperde, rizzme, confessions
with open("src/questions.txt", "r", encoding="UTF-8") as olvas:
kerdesek = [sorok.strip() for sorok in olvas]
with open("src/questions.txt", "r", encoding="UTF-8") as olvas:
kerdesekpot = [sorok.strip() for sorok in olvas]
with open("src/neverhave.txt", "r", encoding="UTF-8") as olvas:
neverhave = [sorok.strip() for sorok in olvas]
with open("src/3words.txt", "r", encoding="UTF-8") as olvas:
haromwords = [sorok.strip() for sorok in olvas]
with open("src/names.txt", "r", encoding="UTF-8") as olvas:
nevek = [sorok.strip() for sorok in olvas]
with open("src/tbh.txt", "r", encoding="UTF-8") as olvas:
tbh = [sorok.strip() for sorok in olvas]
with open("src/dealbreaker.txt", "r", encoding="UTF-8") as olvas:
tizperde = [sorok.strip() for sorok in olvas]
with open("src/rizzme.txt", "r", encoding="UTF-8") as olvas:
rizzme = [sorok.strip() for sorok in olvas]
with open("src/confessions.txt", "r", encoding="UTF-8") as olvas:
confessions = [sorok.strip() for sorok in olvas]
def ellenorzesMD():
global fiokok
fiokokString = ','.join(fiokok)
eredmeny = hashlib.md5(fiokokString.encode())
if eredmeny.hexdigest() == "346c0131861b4b0811559318a7954187":
print("The accounts.txt file only contains the example accounts. Please enter the accounts!")
input("Press enter to exit...")
sys.exit()
else:
with open("MD5.md5", mode='r+') as md5:
adat = md5.read()
if adat != eredmeny.hexdigest():
if adat!= "0":
print("Checking the accounts.")
print("If the accounts.txt file has not been changed, this step will be skipped.")
print("If you want to ensure that the step is always skipped, you can modify the MD5.md5 file to contain the value 0. This will effectively bypass the step regardless if the accounts.txt file has changed.")
ellenorzes()
if args.account is None:
hossz = 0
fiokokBeolvas()
ellenorzesMD()
kerdesekBeolvas()
else:
hossz = 1
fiokokBeolvas()
fiokarg = args.account
kerdesarg = args.question
if args.question is None:
kerdesarg = " "
kerdesekBeolvas()
ismetles = args.repeat
if ismetles is None:
ismetles = -1
if ismetles == 0:
ismetles = -1
else:
ismetles = args.repeat
datum = datetime.now()
ido = datum.strftime("%H:%M:%S")
print("NGL Spammer by: BXn4")
print("\n[{}] >> Starting\n".format(ido))
if hossz > 0:
fiokok = []
kerdesek = []
fiokok_split = fiokarg.split(',')
fiokok.extend(fiokok_split)
utolso = fiokok[-1]
kerdesek_split = kerdesarg.split(',')
kerdesek.extend(kerdesek_split)
fiokokszama = len(fiokok)
kerdesekszama = len(kerdesek)
mennyitkuldott = [1 for _ in range(len(fiokok))]
fiokokszama = len(fiokok)
while x != ismetles:
if i < 10:
time.sleep(1)
fiok = fiokok[jelenlegi]
if '/' in fiok:
if "rizzme" in fiok:
fiok_split = fiok.split("/")[0]
fiok = fiok_split
mit = "Rizzme"
gameslugkuld = "rizzme"
if kerdesarg == " ":
kerdes = (choice(rizzme))
else:
kerdes = kerdesek[holtartakerdesben]
if "confessions" in fiok:
fiok_split = fiok.split("/")[0]
fiok = fiok_split
mit = "Confessions"
gameslugkuld = "confessions"
if kerdesarg == " ":
kerdes = (choice(confessions))
else:
kerdes = kerdesek[holtartakerdesben]
if "neverhave" in fiok:
fiok_split = fiok.split("/")[0]
fiok = fiok_split
mit = "Neverhave"
gameslugkuld = "neverhave"
if kerdesarg == " ":
szavak = ("I've never " + choice(neverhave))
neverHave = szavak.replace('\n', '')
kerdes = neverHave
szavak = ""
else:
kerdes = kerdesek[holtartakerdesben]
if "crush" in fiok:
fiok_split = fiok.split("/")[0]
fiok = fiok_split
mit = "Crush"
gameslugkuld = "yourcrush"
if kerdesarg == " ":
szavak += (choice(nevek))
crush = szavak.replace('\n', '')
kerdes = crush
szavak = ""
else:
kerdes = kerdesek[holtartakerdesben]
if "wfriendship" in fiok:
fiok_split = fiok.split("/")[0]
fiok = fiok_split
mit = "Friendship"
gameslugkuld = "wfriendship"
if kerdesarg == " ":
szavak += (choice(nevek))
friendship = szavak.replace('\n', '')
kerdes = friendship
szavak = ""
else:
kerdes = kerdesek[holtartakerdesben]
if "shipme" in fiok:
fiok_split = fiok.split("/")[0]
fiok = fiok_split
mit = "Shipme"
gameslugkuld = "shipme"
if kerdesarg == " ":
szavak += (choice(nevek))
shipme = szavak.replace('\n', '')
kerdes = shipme
szavak = ""
else:
kerdes = kerdesek[holtartakerdesben]
if "tbh" in fiok:
fiok_split = fiok.split("/")[0]
fiok = fiok_split
mit = "TBH"
gameslugkuld = "tbh"
if kerdesarg == " ":
szavak = choice(tbh)
tbhKuld = szavak.replace('\n', '')
kerdes = tbhKuld
szavak = ""
else:
kerdes = kerdesek[holtartakerdesben]
if "dealbreaker" in fiok:
fiok_split = fiok.split("/")[0]
fiok = fiok_split
mit = "10/10"
gameslugkuld = "dealbreaker"
if kerdesarg == " ":
szavak = choice(tizperde)
tizperdeKuld = szavak.replace('\n', '')
kerdes = tizperdeKuld
szavak = ""
else:
kerdes = kerdesek[holtartakerdesben]
if "kissmarryblock" in fiok:
fiok_split = fiok.split("/")[0]
fiok = fiok_split
mit = "KMB"
gameslugkuld = "kissmarryblock"
if kerdesarg == " ":
haromnevgeneralas()
while any(kissmarryblocklist.count(i) > 1 for i in kissmarryblocklist):
szavak = ""
kissmarryblocklist = []
haromnevgeneralas()
haromnevgeneralas()
for k in range(3):
if k == 2:
szavak += f"{kissmarryblocklist[k]}"
else:
szavak += f"{kissmarryblocklist[k]}, "
kerdes = szavak
kissmarryblocklist = []
szavak = ""
else:
kerdes = kerdesek[holtartakerdesben]
if "3words" in fiok:
fiok_split = fiok.split("/")[0]
fiok = fiok_split
gameslugkuld = "3words"
mit = "3 Words"
if kerdesarg == " ":
szavak += (choice(haromwords) + ", " + choice(haromwords) + ", " + choice(haromwords))
haromszo = szavak.replace('\n', '')
kerdes = haromszo
szavak = ""
else:
kerdes = kerdesek[holtartakerdesben]
else:
gameslugkuld = ""
mit = "Question"
if kerdesarg == " ":
kerdes = (choice(kerdesekpot))
else:
kerdes = kerdesek[holtartakerdesben]
if holtartakerdesben == kerdesekszama - 1:
holtartakerdesben = -1
url = f"https://ngl.link/{fiok}"
holtartakerdesben += 1
fejresz = {
"Referer": url,
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"user-agent": "Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0"
}
adat = {
"username": fiok,
"question": kerdes,
"deviceId": eszkozid,
"gameSlug": gameslugkuld,
"referrer": ""
}
elkuld = request.post("https://ngl.link/api/submit", headers=fejresz, data=adat)
eszkozid = eszkozidgeneralas()
if elkuld.status_code == 200:
nemsikerult = 0;
print("-> %s (%s) \n[%s] %s" % (fiokok[jelenlegi],mennyitkuldott[jelenlegi],mit,kerdes) + "\n")
mennyitkuldott[jelenlegi] += 1
i = i + 1
else:
nemsikerult = nemsikerult + 1
if nemsikerult < 4:
print("[{} ({}/3)] Failed! I'll try again after 20 seconds.\n".format(elkuld.status_code,nemsikerult))
time.sleep(20)
else:
datum = datetime.now()
datumido = datum.strftime("%Y-%m-%d")
ido = datum.strftime("%H:%M")
with open("logs/{}.txt".format(datumido), mode='a') as logfile:
logfile.write("{}\nAccount: {}\nError: {} https://www.abstractapi.com/http-status-codes/{}\nNGL: https://ngl.link/{}\n\n".format(ido,fiok,elkuld.status_code,elkuld.status_code,fiok))
print("[!!!] Failed! I continue with the next account.\nThe account is in the: logs/{}.txt file!\n".format(datumido))
nemsikerult = 0;
i = 10
if (i == 10):
eszkozid = eszkozidgeneralas()
jelenlegi += 1
if jelenlegi == fiokokszama:
jelenlegi = 0
datum = datetime.now()
print("Next: -> " + fiokok[jelenlegi])
ido = datum.strftime("%H:%M:%S")
print("[{}] >> Intermission (2 mins)\n".format(ido))
time.sleep(120)
i = 0
if ismetles != -1:
if fiok == utolso:
x += 1
datum = datetime.now()
ido = datum.strftime("%H:%M:%S")
print("[%s] Number of repeats: %s/%s\n" % (ido,x,ismetles))
else:
while True:
if (i < 10):
time.sleep(1)
fiok = fiokok[jelenlegi].strip()
if '/' in fiok:
if "rizzme" in fiok:
fiok = fiok.split("/")[0]
mit = "Rizzme"
gameslugkuld = "rizzme"
szavak += (choice(rizzme))
rizzmeKuld = szavak.replace('\n', '')
kerdes = rizzmeKuld
szavak = ""
if "confessions" in fiok:
fiok = fiok.split("/")[0]
mit = "Confessions"
gameslugkuld = "confessions"
szavak += (choice(confessions))
confessionsKuld = szavak.replace('\n', '')
kerdes = confessionsKuld
szavak = ""
if "neverhave" in fiok:
fiok = fiok.split("/")[0]
mit = "Neverhave"
gameslugkuld = "neverhave"
szavak = ("I've never " + choice(neverhave))
neverHave = szavak.replace('\n', '')
kerdes = neverHave
szavak = ""
if "crush" in fiok:
fiok = fiok.split("/")[0]
mit = "Crush"
gameslugkuld = "yourcrush"
szavak += (choice(nevek))
crush = szavak.replace('\n', '')
kerdes = crush
szavak = ""
if "wfriendship" in fiok:
fiok = fiok.split("/")[0]
mit = "Friendship"
gameslugkuld = "wfriendship"
szavak += (choice(nevek))
friendship = szavak.replace('\n', '')
kerdes = friendship
szavak = ""
if "shipme" in fiok:
fiok = fiok.split("/")[0]
mit = "Shipme"
gameslugkuld = "shipme"
szavak += (choice(nevek))
shipme = szavak.replace('\n', '')
kerdes = shipme
szavak = ""
if "tbh" in fiok:
fiok = fiok.split("/")[0]
mit = "TBH"
gameslugkuld = "tbh"
szavak = choice(tbh)
tbhKuld = szavak.replace('\n', '')
kerdes = tbhKuld
szavak = ""
if "dealbreaker" in fiok:
fiok = fiok.split("/")[0]
mit = "10/10"
gameslugkuld = "dealbreaker"
szavak = choice(tizperde)
tizperdeKuld = szavak.replace('\n', '')
kerdes = tizperdeKuld
szavak = ""
if "kissmarryblock" in fiok:
fiok = fiok.split("/")[0]
haromnevgeneralas()
while any(kissmarryblocklist.count(i) > 1 for i in kissmarryblocklist):
szavak = ""
kissmarryblocklist = []
haromnevgeneralas()
haromnevgeneralas()
mit = "KMB"
gameslugkuld = "kissmarryblock"
for k in range(3):
if k == 2:
szavak += f"{kissmarryblocklist[k]}"
else:
szavak += f"{kissmarryblocklist[k]}, "
kerdes = szavak
kissmarryblocklist = []
szavak = ""
if "3words" in fiok:
gameslugkuld = "3words"
fiok = fiok.split("/")[0]
mit = "3 Words"
szavak += (choice(haromwords) + ", " + choice(haromwords) + ", " + choice(haromwords))
haromszo = szavak.replace('\n', '')
kerdes = haromszo
szavak = ""
else:
gameslugkuld = ""
mit = "Question"
kerdes = choice(kerdesek)
url = f"https://ngl.link/{fiok}"
fejresz = {
"Referer": url,
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"user-agent":
"Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0"
}
adat = {
"username": fiok,
"question": kerdes,
"deviceId": eszkozid,
"gameSlug": gameslugkuld,
"referrer": ""
}
elkuld = request.post("https://ngl.link/api/submit", headers=fejresz, data=adat)
eszkozid = eszkozidgeneralas()
if elkuld.status_code == 200:
nemsikerult = 0;
print("-> %s (%s) \n[%s] %s" % (fiokok[jelenlegi],mennyitkuldott[jelenlegi],mit,kerdes) + "\n")
mennyitkuldott[jelenlegi] += 1
i = i + 1
else:
nemsikerult = nemsikerult + 1
if nemsikerult < 4:
print("[{} ({}/3)] Failed! I'll try again after 20 seconds.\n".format(elkuld.status_code,nemsikerult))
time.sleep(20)
else:
datum = datetime.now()
datumido = datum.strftime("%Y-%m-%d")
ido = datum.strftime("%H:%M")
with open("logs/{}.txt".format(datumido), mode='a') as logfile:
logfile.write("{}\nAccount: {}\nError: {} https://www.abstractapi.com/http-status-codes/{}\nNGL: https://ngl.link/{}\n\n".format(ido,fiok,elkuld.status_code,elkuld.status_code,fiok))
print("[!!!] Failed! I continue with the next account.\nThe account is in the: logs/{}.txt file!\n".format(datumido))
nemsikerult = 0;
i = 10
if (i == 10):
eszkozid = eszkozidgeneralas()
jelenlegi += 1
if jelenlegi == fiokokszama:
jelenlegi = 0
datum = datetime.now()
print("Next: -> " + fiokok[jelenlegi])
ido = datum.strftime("%H:%M:%S")
print("[{}] >> Intermission (2 mins)\n".format(ido))
time.sleep(120)
i = 0