-
Notifications
You must be signed in to change notification settings - Fork 9
/
spam_webhooks.py
77 lines (63 loc) · 3.8 KB
/
spam_webhooks.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
from helpers import _clear,_setTitle,_printText,_getRandomProxy,colors
from threading import Thread,active_count
import requests
class SpamWebhooks:
def __init__(self,webhooks) -> None:
_setTitle('[OPENBULLET CONFIG TOOL] ^| [SpamWebhooks]')
_clear()
title = colors['lpurple']+"""
╔═══════════════════════════════════════════════════════════════════════╗
███████╗██████╗ █████╗ ███╗ ███╗
██╔════╝██╔══██╗██╔══██╗████╗ ████║
███████╗██████╔╝███████║██╔████╔██║
╚════██║██╔═══╝ ██╔══██║██║╚██╔╝██║
███████║██║ ██║ ██║██║ ╚═╝ ██║
╚══════╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝
╚═══════════════════════════════════════════════════════════════════════╝
"""
print(title)
self.webhooks = webhooks
self.use_proxy = int(input(f'{colors["lpurple"]}[>] {colors["bcyan"]}[1]Proxy [2]Proxyless:{colors["bcyan"]} '))
self.proxy_type = None
if self.use_proxy == 1:
self.proxy_type = int(input(f'{colors["lpurple"]}[>] {colors["bcyan"]}[1]Https [2]Socks4 [3]Socks5:{colors["lpurple"]} '))
self.threads = int(input(f'{colors["lpurple"]}[>] {colors["bcyan"]}Threads:{colors["lpurple"]} '))
self.message = str(input(f'{colors["lpurple"]}[>] {colors["bcyan"]}Message:{colors["lpurple"]} '))
self.session = requests.session()
print('')
def _spam(self,webhook_url):
headers = {
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko',
'Pragma':'no-cache',
'Accept':'*/*',
'Content-Type':'application/json'
}
payload = {'content':self.message}
proxy = _getRandomProxy(self.use_proxy,self.proxy_type,'proxies.txt')
try:
response = self.session.post(webhook_url,headers=headers,proxies=proxy,json=payload)
webhook_token = webhook_url.split('/')[-1]
if response.status_code == 401:
_printText(colors['red'],colors['lpurple'],'INVALID',webhook_token)
elif response.status_code == 404:
_printText(colors['yellow'],colors['lpurple'],'UNKNOWN',webhook_token)
elif response.status_code == 204:
_printText(colors['bcyan'],colors['lpurple'],'SENT',webhook_token)
else:
self._spam(webhook_url)
except Exception:
self._spam(webhook_url)
def _start(self):
threads = []
for webhook_url in self.webhooks:
run = True
while run:
if active_count()<=self.threads:
thread = Thread(target=self._spam,args=(webhook_url,))
threads.append(thread)
thread.start()
run = False
for x in threads:
x.join()
print('')
_printText(colors['yellow'],colors['lpurple'],'FINISHED','Process done!')