Hi,

On 12.04.2017 10:26, margaus M. wrote:
>  1. Does this function verifies HTTPS server (that the port 443 is open)? 

this function (any most other HTTP based functions) doesn't care about
HTTP vs. HTTPS. This is internally handled by the scanner via the
find_service.nasl.

>  2. If I want this function to return server behind it and I don't know
>     the port, should I write just "port = get_http_port(default)" and
>     its done? Or should I indicate first of all port 80 and if "if
>     (!get_port_state(port))" then indicate port 443 and so...?
>  3. If I don't have any dependencies of other plugins and at the
>     begining I do a port = get_http_port(default: 80); why is that it
>     works? What is in the KB at this moment if I haven't write in it
>     anything? How does this exactly works?

Those are better explained with examples:

Example 1:
Portlist: All TCP
Webservers at ports 8080, 8443 and 60000 on target
unscanned_closed = yes in your scan config

get_http_port(default:80) will fork and return 8080, 8443 and 60000 to
the NVT calling this function (no matter if they are running on HTTP or
HTTPS)

Example 2:
Portlist: 1-25/tcp
No Webservers, only port 25 open on target
unscanned_closed = yes in your scan config

get_http_port(default:80) will exit the NVT as no webserver was
identified and unscanned_closed is set to yes

Example 3:
Portlist: 1-25/tcp
No Webservers, only port 25 open on target
unscanned_closed = no in your scan config

get_http_port(default:80) will fork and return 80 to the NVT calling
this function

Regards,
_______________________________________________
Openvas-plugins mailing list
[email protected]
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-plugins

Reply via email to