1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 17:09:02 +00:00

Allow doing --data-length 0. That's the documented way to turn off UDP

payloads.
This commit is contained in:
david
2009-08-19 17:52:23 +00:00
parent ab09f1974f
commit fec2cc40d0
2 changed files with 5 additions and 6 deletions

View File

@@ -227,15 +227,14 @@ static const char payload_null[] = "";
length is returned through the length pointer. */
const char *get_udp_payload(u16 dport, size_t *length) {
if (o.extra_payload_length > 0) {
if (o.extra_payload != NULL) {
*length = o.extra_payload_length;
return o.extra_payload;
}
else
} else {
return udp_port2payload(dport, length);
}
}
/* Get a payload appropriate for the given UDP port. For certain selected ports
a payload is returned, and for others a zero-length payload is returned. The
length is returned through the length pointer. */