[Openvas-devel] OMP GET_REPORTS 'Family' enhanced

Sebastien Aucouturier s.aucouturier at itrust.fr
Fri Jun 22 21:40:33 CEST 2012


Hi Team,
as i need the plugin's Family in each result in report, i do 
modification in openvasmd code.
Is it a enhanced that can be put in next release ?

src/manage_sql.c  : line 13277
/**
  * @brief Get the NVT Family from a result iterator.
  *
  * @param[in]  iterator  Iterator.
  *
  * @return The Family of the NVT that produced the result, or NULL on 
error.
  */
const char*
result_iterator_nvt_family (iterator_t *iterator)
{
   nvti_t *nvti;
   if (iterator->done) return NULL;
   nvti = nvtis_lookup (nvti_cache, result_iterator_nvt_oid (iterator));
   if (nvti)
     return nvti_family (nvti);
   return NULL;
}

src/omp.c  : line 7105
const char *family = result_iterator_nvt_family(results);

src/omp.c  : line 7136
   buffer_xml_append_printf
    (buffer,
     "<subnet>%s</subnet>"
     "<host>%s</host>"
     "<port>%s</port>"
     "<nvt oid=\"%s\">"
     "<name>%s</name>"
     "<family>%s</family>"
     "<cvss_base>%s</cvss_base>"
     "<risk_factor>%s</risk_factor>"
     "<cve>%s</cve>"
     "<bid>%s</bid>"
     "<xref>%s</xref>"
     "</nvt>"
     "<threat>%s</threat>"
     "<description>%s</description>",
     result_iterator_subnet (results),
     result_iterator_host (results),
     family ? family : "",
     result_iterator_port (results),
     result_iterator_nvt_oid (results),
     name ? name : "",
     cvss_base ? cvss_base : "",
     risk_factor ? risk_factor : "",
     cve ? cve : "",
     bid ? bid : "",
     xref ? xref : "",
     manage_result_type_threat (result_iterator_type (results)),
     descr ? nl_descr : "");

src/manage.h : line 805
const char*
result_iterator_nvt_family (iterator_t *);

-- 
     | Sébastien AUCOUTURIER | Software Design Engineer Lead
     | ITrust | 55 rue l'Occitane BP 67303 31673 LABEGE CEDEX
     | Email: s.aucouturier at itrust.fr
     | Fixe Sdt. 05.67.34.67.80 | Fax. 09.80.08.37.23
     | IT Security Services & SaaS Editor


More information about the Openvas-devel mailing list