From 028ca8307c513250d1a52e47bacdce80ac18be36 Mon Sep 17 00:00:00 2001 From: Jan-Oliver Wagner Date: Sun, 26 Jan 2020 21:03:09 +0100 Subject: [PATCH] Fill the vt_severities table. --- src/manage_sql_nvts.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/manage_sql_nvts.c b/src/manage_sql_nvts.c index 0168c7e42..91c12fc52 100644 --- a/src/manage_sql_nvts.c +++ b/src/manage_sql_nvts.c @@ -329,6 +329,13 @@ insert_nvt (const nvti_t *nvti) g_free (quoted_text); } + sql ("DELETE FROM vt_severities where vt_oid = '%s';", nvti_oid (nvti)); + + sql ("INSERT into vt_severities (vt_oid, type, origin, date, score, value)" + " VALUES ('%s', '%s', '%s', '%i', '%i', '%s');", + nvti_oid (nvti), "cvss_base_v2", "", nvti_creation_time (nvti), + (int)(atof (nvti_cvss_base (nvti)) * 10), quoted_cvss_base); + g_free (quoted_name); g_free (quoted_summary); g_free (quoted_insight);