Browse Source

update statistics summary

only print statistics summary at the end if more than one attack was injected
add default value for the non-verbose param in controller
Jens Keim 6 years ago
parent
commit
473a18f4ef
1 changed files with 2 additions and 2 deletions
  1. 2 2
      code/Core/Controller.py

+ 2 - 2
code/Core/Controller.py

@@ -12,7 +12,7 @@ import Core.StatsDatabase as StatsDB
 
 
 class Controller:
-    def __init__(self, pcap_file_path: str, do_extra_tests: bool, non_verbose: bool):
+    def __init__(self, pcap_file_path: str, do_extra_tests: bool, non_verbose: bool=True):
         """
         Creates a new Controller, acting as a central coordinator for the whole application.
 
@@ -123,7 +123,7 @@ class Controller:
         print('\nOutput files created: \n', self.pcap_dest_path, '\n', self.label_manager.label_file_path)
 
         # print summary statistics
-        if not self.non_verbose:
+        if not self.non_verbose and len(attacks_config) is not 1:
             self.statistics.stats_summary_post_attack(self.added_packets)
 
     def process_db_queries(self, query, print_results=False):