Przeglądaj źródła

Merge branch 'development' of git.tk.informatik.tu-darmstadt.de:SPIN/ID2T-toolkit into development

Patrick Jattke 8 lat temu
rodzic
commit
29d6a99849

+ 2 - 0
code/ID2TLib/Statistics.py

@@ -1,6 +1,8 @@
 import os
 import time
 import ID2TLib.libpcapreader as pr
+import matplotlib
+matplotlib.use('Agg')
 import matplotlib.pyplot as plt
 from ID2TLib.PcapFile import PcapFile
 from ID2TLib.StatsDatabase import StatsDatabase

+ 3 - 3
code_boost/src/cxx/pcap_processor.cpp

@@ -71,7 +71,7 @@ std::string pcap_processor::merge_pcaps(const std::string pcap_path) {
             try {
                 writer.write(*iterator_attack);
             } catch (serialization_error) {
-                std::cout << "Could not serialize attack packet with timestamp " << tstmp_attack << std::endl;
+                std::cout << std::setprecision(15) << "Could not serialize attack packet with timestamp " << tstmp_attack << std::endl;
             }
             iterator_attack++;
             if (iterator_attack == sniffer_attack.end())
@@ -80,7 +80,7 @@ std::string pcap_processor::merge_pcaps(const std::string pcap_path) {
             try {
                 writer.write(*iterator_base);
             } catch (serialization_error) {
-                    std::cout << "Could not serialize base packet with timestamp " << tstmp_attack << std::endl;
+                    std::cout << "Could not serialize base packet with timestamp " << std::setprecision(15) << tstmp_attack << std::endl;
             }
             iterator_base++;
         }
@@ -93,7 +93,7 @@ std::string pcap_processor::merge_pcaps(const std::string pcap_path) {
             writer.write(*iterator_attack);
         } catch (serialization_error) {
             auto tstmp_attack = (iterator_attack->timestamp().seconds()) + (iterator_attack->timestamp().microseconds()*1e-6);
-            std::cout << "Could not serialize attack packet with timestamp " << tstmp_attack << std::endl;
+            std::cout << "Could not serialize attack packet with timestamp " << std::setprecision(15) << tstmp_attack << std::endl;
         }
     }
     return new_filepath;