When version detection changes the state of a port, the reason field is now updated as well (to udp-response or tcp-response as applicable). Thanks to Thomas Buchanan for the patch.

This commit is contained in:
fyodor 2007-11-15 23:41:12 +00:00
parent c5244fb05f
commit 5e67f7db4c
2 changed files with 8 additions and 0 deletions

View file

@ -9,6 +9,10 @@ o When an NSE script changes the state of a port (e.g. from
scripts through a "reason" element in the port-table. Thanks to
Matthew Boyle for the patch.
o When version detection changes the state of a port, the reason field
is now updated as well (to udp-response or tcp-response as
applicable). Thanks to Thomas Buchanan for the patch.
o Reworded an error message after a woman reported that it was "highly
offensive and sexist". She also noted that "times have changed and
many women now use your software" and "a sexist remark like the one

View file

@ -1694,6 +1694,10 @@ static void adjustPortStateIfNeccessary(ServiceNFO *svc) {
if (svc->port->state == PORT_OPENFILTERED) {
svc->target->ports.addPort(svc->portno, svc->proto, NULL, PORT_OPEN);
if (svc->proto == IPPROTO_TCP)
svc->target->ports.setStateReason(svc->portno, svc->proto, ER_TCPRESPONSE, 0, 0);
if (svc->proto == IPPROTO_UDP)
svc->target->ports.setStateReason(svc->portno, svc->proto, ER_UDPRESPONSE, 0, 0);
if (o.verbose || o.debugging > 1) {
svc->target->NameIP(host, sizeof(host));