Browse Source

Fixed merging more than two attack PCAP files

Stefano Acquaviti 6 years ago
parent
commit
e13b04ed6f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      code/ID2TLib/Controller.py

+ 2 - 1
code/ID2TLib/Controller.py

@@ -61,6 +61,7 @@ class Controller:
                 attacks_pcap = PcapFile(self.written_pcaps[i])
                 attacks_pcap_path = attacks_pcap.merge_attack(self.written_pcaps[i + 1])
                 os.remove(self.written_pcaps[i + 1])  # remove merged pcap
+                self.written_pcaps[i + 1] = attacks_pcap_path
             print("done.")
         else:
             attacks_pcap_path = self.written_pcaps[0]
@@ -127,4 +128,4 @@ class Controller:
             params_dict = dict([z.split("=") for z in params])
             self.statistics.plot_statistics(format=params_dict['format'])
         else:
-            self.statistics.plot_statistics()
+            self.statistics.plot_statistics()