OpenVAS Libraries  8.0.3
Functions
nasl_wmi.h File Reference

Protos for NASL WMI API. More...

#include "nasl_lex_ctxt.h"
#include "nasl_tree.h"

Go to the source code of this file.

Functions

tree_cellnasl_wmi_versioninfo (lex_ctxt *lexic)
 Get a version string of the WMI implementation. More...
 
tree_cellnasl_wmi_connect (lex_ctxt *lexic)
 Connect to a WMI service and return a handle for it. More...
 
tree_cellnasl_wmi_close (lex_ctxt *lexic)
 Close WMI service handle. More...
 
tree_cellnasl_wmi_query (lex_ctxt *lexic)
 Perform WQL query. More...
 
tree_cellnasl_wmi_connect_rsop (lex_ctxt *lexic)
 Connect to a WMI RSOP service and return a handle for it. More...
 
tree_cellnasl_wmi_query_rsop (lex_ctxt *lexic)
 WMI RSOP query. More...
 
tree_cellnasl_wmi_connect_reg (lex_ctxt *lexic)
 Connect to a WMI Registry service and return a handle for it. More...
 
tree_cellnasl_wmi_reg_get_sz (lex_ctxt *lexic)
 Get string value from Registry. More...
 
tree_cellnasl_wmi_reg_enum_value (lex_ctxt *lexic)
 Enumerate registry values. More...
 
tree_cellnasl_wmi_reg_enum_key (lex_ctxt *lexic)
 Enumerate registry keys. More...
 
tree_cellnasl_wmi_reg_get_bin_val (lex_ctxt *lexic)
 Get registry binary value. More...
 
tree_cellnasl_wmi_reg_get_dword_val (lex_ctxt *lexic)
 Get registry DWORD value. More...
 
tree_cellnasl_wmi_reg_get_ex_string_val (lex_ctxt *lexic)
 Get registry expanded string value. More...
 
tree_cellnasl_wmi_reg_get_mul_string_val (lex_ctxt *lexic)
 Get registry multi valued strings. More...
 
tree_cellnasl_wmi_reg_get_qword_val (lex_ctxt *lexic)
 Get registry QWORD value. More...
 
tree_cellnasl_wmi_reg_set_dword_val (lex_ctxt *lexic)
 Set Registry DWORD value. More...
 
tree_cellnasl_wmi_reg_set_qword_val (lex_ctxt *lexic)
 Set Registry QWORD value. More...
 
tree_cellnasl_wmi_reg_set_ex_string_val (lex_ctxt *lexic)
 Set Registry Expanded string value. More...
 
tree_cellnasl_wmi_reg_set_string_val (lex_ctxt *lexic)
 Set Registry string value. More...
 
tree_cellnasl_wmi_reg_create_key (lex_ctxt *lexic)
 Create Registry key. More...
 
tree_cellnasl_wmi_reg_delete_key (lex_ctxt *lexic)
 Delete Registry key. More...
 

Detailed Description

Protos for NASL WMI API.

This file contains the protos for nasl_wmi.c

Function Documentation

tree_cell* nasl_wmi_close ( lex_ctxt lexic)

Close WMI service handle.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL in case of a serious problem. Else returns a treecell with integer == 1.

Retrieves local variable "wmi_handle" from the lexical context and closes the respective handle.

tree_cell* nasl_wmi_connect ( lex_ctxt lexic)

Connect to a WMI service and return a handle for it.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL in case the connection could not be established. Else a tree_cell with the handle.

Retrieves local variables "host", "username", "password" and "ns" from the lexical context, performs and connects to this given WMI service returning a handle for the service as integer.

tree_cell* nasl_wmi_connect_reg ( lex_ctxt lexic)

Connect to a WMI Registry service and return a handle for it.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL in case the connection could not be established. Else a tree_cell with the handle.

Retrieves local variables "host", "username", "password" from the lexical context, performs and connects to this given WMI service returning a handle for the service as integer.

tree_cell* nasl_wmi_connect_rsop ( lex_ctxt lexic)

Connect to a WMI RSOP service and return a handle for it.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL in case the connection could not be established. Else a tree_cell with the handle.

Retrieves local variables "host", "username", "password" from the lexical context, performs and connects to this given WMI service returning a handle for the service as integer.

tree_cell* nasl_wmi_query ( lex_ctxt lexic)

Perform WQL query.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL in case the query can not be executed properly. Else a tree_cell with the result of the query as string.

Retrieves local variables "wmi_handle" and "query" from the lexical context, performs a WMI query on the given handle and returns the result as a string.

tree_cell* nasl_wmi_query_rsop ( lex_ctxt lexic)

WMI RSOP query.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL on failure, 1 on success

Retrieves local variables "wmi_handle", "query" from the lexical context, performs the RSOP query returning results in string format.

tree_cell* nasl_wmi_reg_create_key ( lex_ctxt lexic)

Create Registry key.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL on failure

Retrieves local variables "wmi_handle", "key" from the lexical context, performs the registry create operation for the key.

tree_cell* nasl_wmi_reg_delete_key ( lex_ctxt lexic)

Delete Registry key.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL on failure

Retrieves local variables "wmi_handle", "key" from the lexical context, performs the registry delete operation for the key.

It will work only if the key exist

tree_cell* nasl_wmi_reg_enum_key ( lex_ctxt lexic)

Enumerate registry keys.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL if the query fails. Else a tree_cell with the Registry keys.

Retrieves local variables "wmi_handle", "hive", "key" from the lexical context, performs the registry query returning a string value.

tree_cell* nasl_wmi_reg_enum_value ( lex_ctxt lexic)

Enumerate registry values.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL if the query fails. Else a tree_cell with the Registry values.

Retrieves local variables "wmi_handle", "hive", "key" from the lexical context, performs the registry query returning a string value.

tree_cell* nasl_wmi_reg_get_bin_val ( lex_ctxt lexic)

Get registry binary value.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL on failure, else tree_cell containing string representation of binary value

Retrieves local variables "wmi_handle", "hive", "key", "val_name" from the lexical context, performs the registry operation querying binary value.

tree_cell* nasl_wmi_reg_get_dword_val ( lex_ctxt lexic)

Get registry DWORD value.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL on failure, else tree_cell containing string representation of DWORD value

Retrieves local variables "wmi_handle", "hive", "key", "val_name" from the lexical context, performs the registry operation querying DWORD value.

tree_cell* nasl_wmi_reg_get_ex_string_val ( lex_ctxt lexic)

Get registry expanded string value.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL on failure, else tree_cell containing string representation of Expanded String value

Retrieves local variables "wmi_handle", "hive", "key", "val_name" from the lexical context, performs the registry operation querying Expanded string value.

tree_cell* nasl_wmi_reg_get_mul_string_val ( lex_ctxt lexic)

Get registry multi valued strings.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL on failure, else tree_cell containing string representation of multi valued strings

Retrieves local variables "wmi_handle", "hive", "key", "val_name" from the lexical context, performs the registry operation querying Expanded string value.

tree_cell* nasl_wmi_reg_get_qword_val ( lex_ctxt lexic)

Get registry QWORD value.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL on failure, else tree_cell containing string representation of QWORD value

Retrieves local variables "wmi_handle", "hive", "key", "val_name" from the lexical context, performs the registry operation querying 64-bit unsigned integer.

tree_cell* nasl_wmi_reg_get_sz ( lex_ctxt lexic)

Get string value from Registry.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL if the query fails. Else a tree_cell with the Registry value.

Retrieves local variables "wmi_handle", "hive", "key", "key_name" from the lexical context, performs the registry query returning a string value.

tree_cell* nasl_wmi_reg_set_dword_val ( lex_ctxt lexic)

Set Registry DWORD value.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL on failure

Retrieves local variables "wmi_handle", "key", "val_name", "val" from the lexical context, performs the registry set/create operation for double word data type.

It will work only if the key exist

tree_cell* nasl_wmi_reg_set_ex_string_val ( lex_ctxt lexic)

Set Registry Expanded string value.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL on failure

Retrieves local variables "wmi_handle", "key", "val_name", "val" from the lexical context, performs the registry set/create operation for string value.

It will work only if the key exist

tree_cell* nasl_wmi_reg_set_qword_val ( lex_ctxt lexic)

Set Registry QWORD value.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL on failure

Retrieves local variables "wmi_handle", "key", "val_name", "val" from the lexical context, performs the registry set/create operation for 64-bit unsigned integer.

It will work only if the key exist

tree_cell* nasl_wmi_reg_set_string_val ( lex_ctxt lexic)

Set Registry string value.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL on failure

Retrieves local variables "wmi_handle", "key", "val_name", "val" from the lexical context, performs the registry set/create operation for string value.

It will work only if the key exist

tree_cell* nasl_wmi_versioninfo ( lex_ctxt lexic)

Get a version string of the WMI implementation.

Parameters
[in]lexicLexical context of NASL interpreter.
Returns
NULL in case no implementation is present. Else a tree_cell with the version as string.