OpenVAS Scanner 23.30.1
table_driven_lsc.h File Reference
#include <glib.h>
#include <gvm/util/kb.h>

Go to the source code of this file.

Data Structures

struct  fixed_version
 Fixed version. More...
struct  version_range
 Specify a version range. More...
struct  vulnerable_pkg
 Define a vulnerable package. More...
struct  advisory
struct  advisories

Typedefs

typedef struct fixed_version fixed_version_t
typedef struct version_range version_range_t
typedef struct vulnerable_pkg vuln_pkg_t
typedef struct advisory advisory_t
typedef struct advisories advisories_t

Enumerations

enum  fixed_type { UNKNOWN , RANGE , SINGLE }
 Fixed version format. More...

Functions

void advisories_free (advisories_t *advisories)
 Free()'s an advisories.
void set_lsc_flag (void)
 Set lsc_flag to 1.
int lsc_has_run (void)
 Get lsc_flag value.
int run_table_driven_lsc (const char *, const char *, const char *, const char *, const char *)
 Publish the necessary data to start a Table driven LSC scan.
char * notus_get_response (const char *pkg_list, const char *os)
 Sent the installed package list and OS to notus.
advisories_tprocess_notus_response (const gchar *resp, const size_t len)
 Process a json object which contains advisories and vulnerable packages.

Typedef Documentation

◆ advisories_t

typedef struct advisories advisories_t

◆ advisory_t

typedef struct advisory advisory_t

◆ fixed_version_t

◆ version_range_t

◆ vuln_pkg_t

typedef struct vulnerable_pkg vuln_pkg_t

Enumeration Type Documentation

◆ fixed_type

enum fixed_type

Fixed version format.

Enumerator
UNKNOWN 
RANGE 
SINGLE 

Function Documentation

◆ advisories_free()

void advisories_free ( advisories_t * advisories)

Free()'s an advisories.

Parameters
advisoryThe advisories holder to be free()'ed. It free()'s all advisories members.

◆ lsc_has_run()

int lsc_has_run ( void )

Get lsc_flag value.

◆ notus_get_response()

char * notus_get_response ( const char * pkg_list,
const char * os )

Sent the installed package list and OS to notus.

Parameters
pkg_listInstalled package list
osThe target's OS
Returns
String containing the server response or NULL Must be free()'ed by the caller.

◆ process_notus_response()

advisories_t * process_notus_response ( const gchar * resp,
const size_t len )

Process a json object which contains advisories and vulnerable packages.

@description This is the body string in response get from an openvasd server

Parameters
respString containing the json object to be processed.
lenString length.
Returns
a advisories_t struct containing all advisories and vulnerable packages. After usage must be free()'ed with advisories_free().

◆ run_table_driven_lsc()

int run_table_driven_lsc ( const char * scan_id,
const char * ip_str,
const char * hostname,
const char * package_list,
const char * os_release )

Publish the necessary data to start a Table driven LSC scan.

If the gather-package-list.nasl plugin was launched, and it generated a valid package list for a supported OS, the table driven LSC scan which is subscribed to the topic will perform a scan an publish the the results to be handle by the sensor/client.

Parameters
scan_idScan Id.
kb
ip_strIP string of host.
hostnameName of host.
Returns
0 on success, less than 0 on error.

◆ set_lsc_flag()

void set_lsc_flag ( void )

Set lsc_flag to 1.