-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmanager.py
More file actions
28 lines (27 loc) · 766 Bytes
/
manager.py
File metadata and controls
28 lines (27 loc) · 766 Bytes
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
from connection import *
from counter import *
import time
class Manager:
connection=""
threads=1000
timebetweenconnection=1
counter= Counter()
def __init__(self):
threading.stack_size(756*1024)
def setThreads(self,threads):
self.threads=threads
def newConnection(self, options):
con=Connection()
con.setOptions(options)
con.start()
def setConnection(self,connection):
self.connection=connection
def getClosed():
return counter.getClosed()
def startAttack(self):
for i in range(self.threads):
con=Connection()
con.setOptions(self.connection.getOptions())
con.start()
def getStatus(self):
return "Alive Connections: "+str(self.counter.getConnected()) +"\nClosed_connections: "+str(self.counter.getClosed())