With threading or asyncio , Python can simulate thousands of simultaneous connections with very few lines of code. Anatomy of a Simple Python DDoS Script (Simulation)
# Close the socket sock.close()