|
@@ -105,12 +105,12 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
|
|
|
self.attack_start_utime = packets[0].time
|
|
|
elif total_pkts % BUFFER_SIZE == 0: # every 1000 packets write them to the pcap file (append)
|
|
|
last_packet = packets[-1]
|
|
|
- #packets = sorted(packets, key=lambda pkt: pkt.time) # not necessary yet
|
|
|
+ packets = list(packets)
|
|
|
path_attack_pcap = self.write_attack_pcap(packets, True, path_attack_pcap)
|
|
|
- packets = []
|
|
|
+ packets = deque(maxlen=BUFFER_SIZE)
|
|
|
|
|
|
if len(packets) > 0:
|
|
|
- #packets = sorted(packets, key=lambda pkt: pkt.time) # not necessary yet
|
|
|
+ packets = list(packets)
|
|
|
path_attack_pcap = self.write_attack_pcap(packets, True, path_attack_pcap)
|
|
|
last_packet = packets[-1]
|
|
|
|