1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Generalize nmap_mass_rdns to support more than just Targets and PTR requests

This commit is contained in:
dmiller
2024-04-18 19:16:23 +00:00
parent 22ee545f7e
commit e8c7e7ba01
3 changed files with 170 additions and 126 deletions

View File

@@ -122,6 +122,7 @@ typedef enum {
} ERRORS;
typedef enum {
NONE = 0,
A = 1,
CNAME = 5,
PTR = 12,
@@ -244,8 +245,18 @@ public:
std::list<Answer> answers;
};
struct Request
{
RECORD_TYPE type;
struct sockaddr_storage ss;
std::string name;
Request() : type(NONE), name() {}
const char *repr(); // string representation
};
}
void nmap_mass_dns(DNS::Request requests[], int num_requests);
void nmap_mass_rdns(Target ** targets, int num_targets);
std::list<std::string> get_dns_servers();