Skip to content

TranMinhCuong-Tech/ddos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌐 DDoS Tool - Network Stress Testing Framework

Python Version License Platform

A lightweight network stress testing tool for security research and education


⚠️ DISCLAIMER

FOR EDUCATIONAL PURPOSES ONLY

  • Unauthorized use is ILLEGAL
  • Only use on systems you OWN or have EXPLICIT PERMISSION to test
  • The user assumes ALL RESPONSIBILITY for any misuse
  • The author disclaims ALL LIABILITY

✨ Features

  • πŸ”„ 3 Attack Methods: TCP, UDP, HTTP floods
  • 🧡 Multi-threading: Configurable thread count (default: 50)
  • ⏱️ Time Control: Set duration in seconds or run unlimited
  • πŸ“Š Request Limiting: Exact number of requests
  • πŸ“ˆ Real-time Stats: Live monitoring with success rates
  • 🎯 Progress Tracking: Percentage completion
  • πŸš€ No Dependencies: Uses only Python standard library

πŸ“¦ Requirements

  • Python 3.6+
  • No external dependencies
# Verify Python version
python --version

# Verify all modules available
python -c "import socket, threading, time, sys, random, string, argparse; print('βœ… Ready')"

πŸš€ Installation

# clone repository
git clone https://github.com/TranMinhCuong-Tech/ddos.git
cd ddos

# Make executable (Linux/macOS)
chmod +x ddos.py

πŸ’» Usage

Command Syntax

python ddos_tool.py -u <TARGET> -p <PORT> [OPTIONS]

Arguments

Argument Description Default
-u, --url Target URL or IP Required
-p, --port Target port Required
-t, --threads Number of threads 50
-d, --duration Attack duration (seconds) Unlimited (-1)
-r, --request Number of requests 0 (Unlimited)
-m, --method Attack method tcp
-h, --help Show help -

Attack Methods

Method Protocol Best For
tcp TCP Web servers, databases
udp UDP DNS, gaming servers
http HTTP Web applications, APIs

πŸ“ Examples

Basic Attacks

# TCP attack with 100 threads for 30 seconds
python ddos_tool.py -u 192.168.1.1 -p 80 -t 100 -d 30 -m tcp

# UDP attack (unlimited)
python ddos_tool.py -u 192.168.1.1 -p 53 -t 50 -m udp

# HTTP attack with 5000 requests
python ddos_tool.py -u example.com -p 80 -t 20 -r 5000 -m http

Advanced Scenarios

# Combined time and request limits
python ddos_tool.py -u 192.168.1.1 -p 80 -d 60 -r 5000 -m tcp

# High-thread continuous attack
python ddos_tool.py -u 192.168.1.1 -p 80 -t 200 -m http

# Precision testing with exact count
python ddos_tool.py -u example.com -p 443 -t 10 -r 1000 -m http

πŸ“Š Output Example

Real-time Statistics

Time: 15.3s | Sent: 245/s | Failed: 5/s | Total Success: 3670 | Total Failed: 75 | Success Rate: 98.0% | Progress: 36.7%

Final Statistics

======================================================================
FINAL STATISTICS
======================================================================
Target Requests: 10000
Run Time: 45.2 seconds
Total Requests Sent: 10000
Total Requests Failed: 127
Success Rate: 98.7%
Average Speed: 221.2 requests/second
======================================================================

Output Fields

Field Description
Time Elapsed attack duration
Sent/s Current requests per second
Failed/s Current failures per second
Total Success Cumulative successful requests
Total Failed Cumulative failed requests
Success Rate Percentage of successful requests
Progress Completion percentage (with -r)

βš™οΈ How It Works

Architecture Flow

1. Parse Arguments β†’ 2. Initialize Stats β†’ 3. Start Monitor Thread
4. Spawn Attack Threads β†’ 5. Execute Attacks β†’ 6. Update Stats
7. Stop Conditions Met β†’ 8. Display Final Report

Attack Mechanics

TCP Flood:

Create Socket β†’ Connect to Target β†’ Send Data β†’ Close Connection β†’ Repeat

UDP Flood:

Create Socket β†’ Send Datagram (no connection) β†’ Repeat

HTTP Flood:

Create Socket β†’ Connect to Target β†’ Send HTTP GET β†’ Close Connection β†’ Repeat

πŸ›‘οΈ Safety Guidelines

βœ… DO's

  • βœ“ Get written permission before testing
  • βœ“ Test on your own systems first
  • βœ“ Start with low thread counts (10-20)
  • βœ“ Use request limits for controlled testing
  • βœ“ Monitor system resources during testing

❌ DON'Ts

  • βœ— Never test without authorization
  • βœ— Don't attack production systems
  • βœ— Don't use for malicious purposes
  • βœ— Don't exceed test scope boundaries

Emergency Stop

# Press Ctrl+C to immediately stop all threads
Ctrl+C

πŸ”§ Troubleshooting

Issue Solution
Connection Refused Verify target IP and port are correct
High Failure Rate Reduce thread count or check target availability
System Slow Down Stop attack immediately, reduce threads
Permission Denied Run with administrative/root privileges
No Response Check network connectivity to target

βš–οΈ Legal Notice

WARNING: This tool is for security research and educational purposes only.

  • Using this tool against systems without authorization is illegal
  • Violators may face criminal prosecution
  • Users must comply with all applicable laws
  • The author assumes no responsibility for misuse

πŸ“„ License

MIT License - See LICENSE file for details


πŸ“ž Support

  • πŸ› Report issues on GitHub
  • πŸ’‘ Suggest improvements via Pull Requests
  • πŸ“š Read documentation for more details

Remember: Use responsibly and ethically. With great power comes great responsibility! πŸ”’

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages