Selaa lähdekoodia

ports that have no service-entry are now unknown

portServices are now only unavailable if the nmap-services file could not be read
Stefano Acquaviti 6 vuotta sitten
vanhempi
commit
abd38a1514
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4 1
      code_boost/src/cxx/statistics_db.cpp

+ 4 - 1
code_boost/src/cxx/statistics_db.cpp

@@ -238,7 +238,10 @@ void statistics_db::writeStatisticsPorts(std::unordered_map<ipAddress_inOut_port
             ipAddress_inOut_port e = it->first;
 
             std::string portService = portServices[e.portNumber];
-            if(portService.empty()) {portService = "unavailable";}
+            if(portService.empty()) {
+                if(portServices[{0}] == "unavailable") {portService = "unavailable";}
+                else {portService = "unknown";}
+            }
 
             query.bind(1, e.ipAddress);
             query.bind(2, e.trafficDirection);