Simple JSON reader.
More...
#include "../base/cvss.h"
#include "../util/jsonpull.h"
#include "openvasd.h"
#include <cjson/cJSON.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
Go to the source code of this file.
|
enum | nvt_category {
ACT_INIT = 0
, ACT_SCANNER
, ACT_SETTINGS
, ACT_GATHER_INFO
,
ACT_ATTACK
, ACT_MIXED_ATTACK
, ACT_DESTRUCTIVE_ATTACK
, ACT_DENIAL
,
ACT_KILL_HOST
, ACT_FLOOD
, ACT_END
} |
| VT categories. More...
|
|
◆ _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64 |
◆ _GNU_SOURCE
#define _GNU_SOURCE /* See feature_test_macros(7) */ |
◆ nvt_category
VT categories.
Enumerator |
---|
ACT_INIT | |
ACT_SCANNER | |
ACT_SETTINGS | |
ACT_GATHER_INFO | |
ACT_ATTACK | |
ACT_MIXED_ATTACK | |
ACT_DESTRUCTIVE_ATTACK | |
ACT_DENIAL | |
ACT_KILL_HOST | |
ACT_FLOOD | |
ACT_END | |
◆ add_preferences_to_nvt()
static void add_preferences_to_nvt |
( |
nvti_t * | nvt, |
|
|
cJSON * | vt_obj ) |
|
static |
◆ add_tags_to_nvt()
static void add_tags_to_nvt |
( |
nvti_t * | nvt, |
|
|
cJSON * | tag_obj ) |
|
static |
◆ get_category_from_name()
static int get_category_from_name |
( |
const gchar * | cat | ) |
|
|
static |
Get the VT category type given the category as string.
- Parameters
-
cat | The category as string. |
- Returns
- Integer representing the category type.
◆ openvasd_parse_vt()
Parse a VT element given in json format.
- Parameters
-
parser | Json pull parser. |
event | Json pull event. |
- Returns
- nvti structure containing the VT metadata, NULL otherwise. The nvti struct must be freed with nvti_free() by the caller.
◆ parse_references()
static void parse_references |
( |
nvti_t * | nvt, |
|
|
cJSON * | vt_obj ) |
|
static |