There is a NASL cgibin() function that reads the content of the
cgi_path preference. This function forks and returns one directory to
each child process.
The risk of having several alerts on the same port is very low
(e.g. if /scripts/bad.cgi and /cgi-bin/bad.cgi both exists), however I
don't like this behaviour.
More, I suspect that 99% of users will never change the "preference"
from the defaulkt setting and might miss some bad CGI.
That's where locate_cgi() is suppose to help.
1. It stops as soon as it finds the CGI, so there is no fork.
2. The CGI path is automatically detect (my current code is probably
buggy) and is host & port dependant.
Here is a new version of the beast.
Even if everybody agrees, I'd suggest that we do not use it in 1.2.x
so that we do not change the behaviour of the scanner before a new
release...
cgi_path preference. This function forks and returns one directory to
each child process.
The risk of having several alerts on the same port is very low
(e.g. if /scripts/bad.cgi and /cgi-bin/bad.cgi both exists), however I
don't like this behaviour.
More, I suspect that 99% of users will never change the "preference"
from the defaulkt setting and might miss some bad CGI.
That's where locate_cgi() is suppose to help.
1. It stops as soon as it finds the CGI, so there is no fork.
2. The CGI path is automatically detect (my current code is probably
buggy) and is host & port dependant.
Here is a new version of the beast.
Even if everybody agrees, I'd suggest that we do not use it in 1.2.x
so that we do not change the behaviour of the scanner before a new
release...