|
@@ -1,4 +1,5 @@
|
|
|
from random import randint
|
|
|
+from collections import deque
|
|
|
|
|
|
from Attack import BaseAttack
|
|
|
from Attack.AttackParameters import Parameter as Param
|
|
@@ -64,12 +65,11 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
|
|
|
|
|
|
# Setup initial parameters for packet creation
|
|
|
BUFFER_SIZE = 1000
|
|
|
-
|
|
|
id_to_ip_mapper = MappingIPGenerator()
|
|
|
file_timestamp_prv = float(comm_entries[0]["Time"])
|
|
|
pcap_timestamp = self.get_param_value(Param.INJECT_AT_TIMESTAMP)
|
|
|
duration = 0
|
|
|
- packets = []
|
|
|
+ packets = deque(maxlen=BUFFER_SIZE)
|
|
|
total_pkts = 0
|
|
|
limit_packetcount = self.get_param_value(Param.PACKETS_LIMIT)
|
|
|
limit_duration = self.get_param_value(Param.ATTACK_DURATION)
|