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:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user