Make gathered CPE codes available to NSE.

CPEs are available at host.os (for the ones from OS fingerprinting) and
port.version.cpe (for the version detection ones).

This patch also fix a memory leak that David noticed in
PortList::setServiceProbeResults().
This commit is contained in:
henri 2012-01-13 10:24:19 +00:00
parent b6b2b21e2f
commit 487c08ff63
6 changed files with 86 additions and 24 deletions

View file

@ -178,7 +178,7 @@ class Port {
public:
Port();
void freeService();
void freeService(bool del_service);
void getNmapServiceName(char *namebuf, int buflen, const char *rpcinfo) const;
u16 portno;
@ -267,7 +267,7 @@ class PortList {
const char *version, const char *hostname,
const char *ostype, const char *devicetype,
const char *extrainfo,
const char *cpe_a, const char *cpe_h, const char *cpe_o,
const std::vector<const char *> *cpe,
const char *fingerprint);
// pass in an allocated struct serviceDeductions (don't worry about initializing, and