Am Mittwoch, 9. März 2016, 13:25:17 schrieb Míkel Rodríguez: > Hello. We are trying to develop a set of NVTs which have to count open > ports on the target machine and compare the result to a defined threshold, > so if the result is higher than the threshold we throw a security alert > telling that there are too many open ports on the target system. > > We have tried to use get_port_state() function to know if a port may be > open or not and open_sock_tcp() to fully determine if port is open, but > it's necessary to scan thousands of ports and our script is taking a too > much long time to execute. > > How can we get the number of open ports on the target host on a quick way?
I am not quire sure whether I got your question right. But the most reliable answer about open ports is to scan the portrange. -- Dr. Jan-Oliver Wagner | +49-541-335084-0 | http://www.greenbone.net/ Greenbone Networks GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 202460 Geschäftsführer: Lukas Grunwald, Dr. Jan-Oliver Wagner _______________________________________________ Openvas-plugins mailing list [email protected] https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-plugins
