mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Fix #2293: assertion failed probe->tryno == maxtries
When tying UDP payloads to tryno, we were exceeding the maxtries in order to send all available payloads, leading to assertion failures. Currently there are not more than 4 payloads for any given port; most have none, many have 1, very few have more. So we will send them all at the same time with the same source port/tryno.
This commit is contained in:
10
payload.h
10
payload.h
@@ -66,9 +66,13 @@
|
||||
|
||||
#define PAYLOAD_FILENAME "nmap-payloads"
|
||||
|
||||
const char *get_udp_payload(u16 dport, size_t *length, u8 tryno);
|
||||
const char *udp_port2payload(u16 dport, size_t *length, u8 tryno);
|
||||
size_t udp_payload_count(u16 dport);
|
||||
// Semi-arbitrary limit, but we use u8 for indexing/retrieval
|
||||
// and we send all payloads at once and need to not overwhelm.
|
||||
#define MAX_PAYLOADS_PER_PORT 0xff
|
||||
|
||||
const char *get_udp_payload(u16 dport, size_t *length, u8 index);
|
||||
const char *udp_port2payload(u16 dport, size_t *length, u8 index);
|
||||
u8 udp_payload_count(u16 dport);
|
||||
int init_payloads(void);
|
||||
|
||||
#endif /* PAYLOAD_H */
|
||||
|
||||
Reference in New Issue
Block a user