Skip to content

Commit

Permalink
Fill the vt_severities table.
Browse files Browse the repository at this point in the history
  • Loading branch information
janowagner committed Feb 9, 2020
1 parent 442b79c commit 028ca83
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/manage_sql_nvts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 028ca83

Please sign in to comment.