-
Notifications
You must be signed in to change notification settings - Fork 13
/
NGLSpamer.py
125 lines (103 loc) · 4.71 KB
/
NGLSpamer.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
import random
import string
import requests
import os
from pystyle import Colors, Colorate
import time
def ngl():
def deviceId():
characters = string.ascii_lowercase + string.digits
part1 = ''.join(random.choices(characters, k=8))
part2 = ''.join(random.choices(characters, k=4))
part3 = ''.join(random.choices(characters, k=4))
part4 = ''.join(random.choices(characters, k=4))
part5 = ''.join(random.choices(characters, k=12))
device_id = f"{part1}-{part2}-{part3}-{part4}-{part5}"
return device_id
def UserAgent():
with open('user-agents.txt', 'r') as file:
user_agents = file.readlines()
random_user_agent = random.choice(user_agents).strip()
return random_user_agent
def Proxy():
with open('proxies.txt', 'r') as file:
proxies_list = file.readlines()
if not proxies_list:
print(R + "[-]" + W + " Error: proxies.txt is empty. Please add proxies to the file.")
exit(1)
random_proxy = random.choice(proxies_list).strip()
proxies = {
'http': random_proxy,
'https': random_proxy
}
return proxies
R = '\033[31m'
G = '\033[32m'
W = '\033[0m'
os.system('cls' if os.name == 'nt' else 'clear')
print(Colorate.Vertical(Colors.blue_to_purple,"""
░██████╗███╗░░░███╗░█████╗░██╗░░██╗███████╗
██╔════╝████╗░████║██╔══██╗██║░██╔╝██╔════╝
╚█████╗░██╔████╔██║███████║█████═╝░█████╗░░
░╚═══██╗██║╚██╔╝██║██╔══██║██╔═██╗░██╔══╝░░
██████╔╝██║░╚═╝░██║██║░░██║██║░╚██╗███████╗
╚═════╝░╚═╝░░░░░╚═╝╚═╝░░╚═╝╚═╝░░╚═╝╚══════╝
"""))
nglusername = input(Colorate.Vertical(Colors.blue_to_purple,"Username: "))
message = input(Colorate.Vertical(Colors.blue_to_purple,"Message: "))
Count = int(input(Colorate.Vertical(Colors.blue_to_purple,"Count: ")))
delay = float(input(Colorate.Vertical(Colors.blue_to_purple,"Delay between requests (enter 0 if you want the fastest in seconds): ")))
use_proxy = input(Colorate.Vertical(Colors.blue_to_purple, "Use proxy? (y/n): ")).lower()
if use_proxy == "y":
proxies = Proxy()
else:
proxies = None
print(Colorate.Vertical(Colors.green_to_blue,"**********************************************************"))
value = 0
notsend = 0
while value < Count:
headers = {
'Host': 'ngl.link',
'sec-ch-ua': '"Google Chrome";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',
'accept': '*/*',
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
'x-requested-with': 'XMLHttpRequest',
'sec-ch-ua-mobile': '?0',
'user-agent': f'{UserAgent()}',
'sec-ch-ua-platform': '"Windows"',
'origin': 'https://ngl.link',
'sec-fetch-site': 'same-origin',
'sec-fetch-mode': 'cors',
'sec-fetch-dest': 'empty',
'referer': f'https://ngl.link/{nglusername}',
'accept-language': 'tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7',
}
data = {
'username': f'{nglusername}',
'question': f'{message}',
'deviceId': f'{deviceId()}',
'gameSlug': '',
'referrer': '',
}
try:
response = requests.post('https://ngl.link/api/submit', headers=headers, data=data, proxies=proxies)
if response.status_code == 200:
notsend = 0
value += 1
print(G + "[+]" + W + "Send =>" + G + "{}".format(value) + W)
else:
notsend += 1
print(R + "[-]" + W + "Not Send")
if notsend == 4:
print(R + "[!]" + W + "Changing information")
deviceId()
UserAgent()
if use_proxy == "y":
proxies = Proxy()
notsend = 0
time.sleep(delay)
except requests.exceptions.ProxyError as e:
print(R + "[-]" + W + "Bad Proxy!" + W)
if use_proxy == "y":
proxies = Proxy()
ngl()