Browse Source

moved summary to the before the injection, rephrased pdu to unknown pdu

Jonathan Speth 6 years ago
parent
commit
55601c5ef1
2 changed files with 8 additions and 6 deletions
  1. 4 4
      code/Core/AttackController.py
  2. 4 2
      code/Core/Controller.py

+ 4 - 4
code/Core/AttackController.py

@@ -213,11 +213,11 @@ class AttackController:
         timespan = self.statistics.get_capture_duration()
 
         summary = [("Total packet count", total_packet_count, "packets"),
-                   ("Total pdu count", pdu_count, "pdus"),
-                   ("Share of pdus", pdu_share, "%"),
-                   ("Last pdu occurrence", last_pdu_timestamp, ""),
+                   ("Total unknown pdu count", pdu_count, "pdus"),
+                   ("Share of unknown pdus", pdu_share, "%"),
+                   ("Last unknown pdu occurrence", last_pdu_timestamp, ""),
                    ("Capture duration", timespan, "seconds")]
 
         print("\nPCAP FILE STATISTICS SUMMARY  ------------------------------")
-
         self.statistics.write_list(summary, print, "")
+        print("------------------------------------------------------------")

+ 4 - 2
code/Core/Controller.py

@@ -57,6 +57,10 @@ class Controller:
         :param seeds: A list of random seeds for the given attacks.
         :param time: Measure time for packet generation.
         """
+
+        # print summary of src pcap statistics
+        self.attack_controller.stats_summary(self.pcap_dest_path)
+
         # load attacks sequentially
         i = 0
         for attack in attacks_config:
@@ -109,8 +113,6 @@ class Controller:
         # print status message
         print('\nOutput files created: \n', self.pcap_dest_path, '\n', self.label_manager.label_file_path)
 
-        self.attack_controller.stats_summary(self.pcap_dest_path)
-
     def process_db_queries(self, query, print_results=False):
         """
         Processes a statistics database query. This can be a standard SQL query or a named query.