1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 07:11:37 +00:00

Add a UDP payload (GenericLines) for the echo port.

This commit is contained in:
david
2009-07-06 18:41:06 +00:00
parent 3f8392d974
commit 329ae2fe5c

View File

@@ -109,6 +109,7 @@ extern NmapOps o;
change state on the server. change state on the server.
*/ */
static const char payload_GenericLines[] = "\015\012\015\012";
static const char payload_DNSStatusRequest[] = static const char payload_DNSStatusRequest[] =
"\000\000\020\000\000\000\000\000\000\000\000\000"; "\000\000\020\000\000\000\000\000\000\000\000\000";
static const char payload_NTPRequest[] = static const char payload_NTPRequest[] =
@@ -145,6 +146,9 @@ const char *get_udp_payload(u16 dport, size_t *length) {
#define SET_PAYLOAD(p) do { *length = sizeof(p) - 1; payload = (p); } while (0) #define SET_PAYLOAD(p) do { *length = sizeof(p) - 1; payload = (p); } while (0)
switch (dport) { switch (dport) {
case 7:
SET_PAYLOAD(payload_GenericLines);
break;
case 53: case 53:
SET_PAYLOAD(payload_DNSStatusRequest); SET_PAYLOAD(payload_DNSStatusRequest);
break; break;