[Openvas-commits] r779 - in trunk/openvas-client: . nessus

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Apr 2 10:43:00 CEST 2008


Author: jan
Date: 2008-04-02 10:42:59 +0200 (Wed, 02 Apr 2008)
New Revision: 779

Modified:
   trunk/openvas-client/ChangeLog
   trunk/openvas-client/nessus/pdf_output.c
   trunk/openvas-client/nessus/preferences.c
Log:
* nessus/preferences.c (prefs_get_default): NEW URL defaults for
OpenVAS NVT ID, BID and CVE. Previous were directed towards nessus.org.

* nessus/pdf_output.c (print_appendix, print_plugin_information): Made
strings translatable.
(fprint_link, print_data_with_links, print_plugin_information): Adapted
OpenVAS ID referencing to the new OID scheme as specified with
OpenVAS Change Request #1.



Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog	2008-04-01 10:24:43 UTC (rev 778)
+++ trunk/openvas-client/ChangeLog	2008-04-02 08:42:59 UTC (rev 779)
@@ -1,3 +1,14 @@
+2008-04-02  Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
+
+	* nessus/preferences.c (prefs_get_default): NEW URL defaults for
+	OpenVAS NVT ID, BID and CVE. Previous were directed towards nessus.org.
+
+	* nessus/pdf_output.c (print_appendix, print_plugin_information): Made
+	strings translatable.
+	(fprint_link, print_data_with_links, print_plugin_information): Adapted
+	OpenVAS ID referencing to the new OID scheme as specified with
+	OpenVAS Change Request #1.
+
 2008-02-29  Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
 
 	* nessus/nessus.c (connect_to_nessusd): Only write plugin cache

Modified: trunk/openvas-client/nessus/pdf_output.c
===================================================================
--- trunk/openvas-client/nessus/pdf_output.c	2008-04-01 10:24:43 UTC (rev 778)
+++ trunk/openvas-client/nessus/pdf_output.c	2008-04-02 08:42:59 UTC (rev 779)
@@ -125,7 +125,7 @@
  */
 
 /*
- * print URL linking to CVE/BID/Nessus database to file.
+ * print URL linking to CVE/BID/OpenVAS database to file.
  * '%s' in urlfmt (from preferences) will be replaced by
  * item IDs (or their parts split at minus characters).
  * '%%' will insert a percent character.
@@ -177,7 +177,8 @@
   efree(&itemparts);
   efree(&urlfmt);
   if(*url)
-    fprintf(file, "<a href=\"%s\">%s</a>", url, item);
+    fprintf(file, "<a href=\"%s\">%s%s</a>", url,
+            strcmp("url_nessus", key) ? "" : "1.3.6.1.4.1.25623.1.0.", item);
   else
     fprintf(file, "%s", item);
   efree(&url);
@@ -265,9 +266,9 @@
     str++;
  }
  
- fprintf(file, "Nessus ID : ");
+ fprintf(file, "OpenVAS ID : ");
  if (internal_link)
-   fprintf(file, "<a href=\"#plugin%s\">%s</a>", plugin_id, plugin_id);
+   fprintf(file, "<a href=\"#nvt1.3.6.1.4.1.25623.1.0.%s\">1.3.6.1.4.1.25623.1.0.%s</a>", plugin_id, plugin_id);
  else
    fprint_link(file, "url_nessus", plugin_id);
 }
@@ -892,22 +893,22 @@
     return;
   }
 
-  fprintf(file, "<H3><a name=\"plugin%s\">Plugin %d: %s</a></H3>\n\n",
+  fprintf(file, "<H3><a name=\"nvt1.3.6.1.4.1.25623.1.0.%s\">NVT 1.3.6.1.4.1.25623.1.0.%d: %s</a></H3>\n\n",
       plugin_id_str, plugin_id, plugin->name);
 
   fprintf(file, "<table>\n");
-  print_plugin_table_row(file, "Summary", plugin->summary);
-  print_plugin_table_row(file, "Category", plugin->category);
-  print_plugin_table_row(file, "Family", plugin->family);
-  print_plugin_table_row(file, "Version", plugin->version);
-  print_plugin_table_row(file, "CVE", plugin->cve);
-  print_plugin_table_row(file, "BID", plugin->bid);
-  print_plugin_table_row(file, "XRefs", plugin->xrefs);
+  print_plugin_table_row(file, _("Summary"), plugin->summary);
+  print_plugin_table_row(file, _("Category"), plugin->category);
+  print_plugin_table_row(file, _("Family"), plugin->family);
+  print_plugin_table_row(file, _("Version"), plugin->version);
+  print_plugin_table_row(file, _("CVE"), plugin->cve);
+  print_plugin_table_row(file, _("BID"), plugin->bid);
+  print_plugin_table_row(file, _("XRefs"), plugin->xrefs);
   fprintf(file, "</table>");
 
   description = nessus_plugin_get_description(plugin);
   html_description = convert_cr_to_html(description);
-  fputs("<p></p>\n<h4>Description</h4>\n", file);
+  PRINT1(file, "<p></p>\n<h4>%s</h4>\n", _("Description"));
   fputs(html_description, file);
   efree(&html_description);
 
@@ -917,7 +918,7 @@
   {
     struct arglist *prefs = plugin->plugin_prefs;
 
-    fputs("<p></p>\n<h4>Parameters</h4>\n<table>\n", file);
+    PRINT1(file, "<p></p>\n<h4>%s</h4>\n<table>\n", _("Parameters"));
 
     while (prefs && prefs->next)
     {
@@ -940,7 +941,7 @@
 static void
 print_appendix(FILE *file, GHashTable *hash)
 {
-  fprintf(file, "<H2>Appendix: Plugin Information</H2>\n\n");
+  PRINT1(file, "<H2>%s</H2>\n\n", _("Appendix: NVT Information"));
 
   g_hash_table_foreach(hash, print_plugin_information, file);
 }

Modified: trunk/openvas-client/nessus/preferences.c
===================================================================
--- trunk/openvas-client/nessus/preferences.c	2008-04-01 10:24:43 UTC (rev 778)
+++ trunk/openvas-client/nessus/preferences.c	2008-04-02 08:42:59 UTC (rev 779)
@@ -702,11 +702,11 @@
   }
 #endif /* USE_GTK */
   else if(!strcmp(name, "url_cve"))
-    return "http://cgi.nessus.org/cve.php3?cve=%s-%s-%s";
+    return "http://cve.mitre.org/cgi-bin/cvename.cgi?name=%s-%s-%s";
   else if(!strcmp(name, "url_bid"))
-    return "http://cgi.nessus.org/bid.php3?bid=%s";
+    return "http://www.securityfocus.com/bid/%s";
   else if(!strcmp(name, "url_nessus"))
-    return "http://cgi.nessus.org/nessus_id.php3?id=%s";
+    return "http://www.openvas.org/?oid=1.3.6.1.4.1.25623.1.0.%s";
   else if(!strcmp(name, "targets"))
     return "localhost";
   else if(!strcmp(name, "tree_autoexpand"))



More information about the Openvas-commits mailing list