3
0
Просмотр исходного кода

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 лет назад
Родитель
Сommit
abd38a1514
1 измененных файлов с 4 добавлено и 1 удалено
  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);