|
OpenVAS Libraries
9.0.3
|
#include <glib.h>#include <errno.h>#include <stdlib.h>#include <string.h>#include <sys/time.h>#include <unistd.h>#include "../misc/ftp_funcs.h"#include "../base/kb.h"#include "../misc/network.h"#include "../misc/plugutils.h"#include "../base/openvas_compress.h"#include "nasl_tree.h"#include "nasl_global_ctxt.h"#include "nasl_func.h"#include "nasl_var.h"#include "nasl_lex_ctxt.h"#include "exec.h"#include "nasl_packet_forgery.h"#include "nasl_debug.h"#include "nasl_misc_funcs.h"#include "byteorder.h"
Go to the source code of this file.
Macros | |
| #define | uint32 unsigned int |
| #define | NASL_EXIT_DEPRECATED 66 |
| #define | NASL_EXIT_NOTVULN 99 |
| #define | iac buffer[0] |
| #define | code buffer[1] |
| #define | option buffer[2] |
| #define | BOGUS "are you dead ?" |
| #define BOGUS "are you dead ?" |
Referenced by nasl_end_denial().
| #define code buffer[1] |
Referenced by get_encaps_name(), get_encaps_through(), insert_ip_options(), insert_ipv6_options(), and nasl_telnet_init().
| #define iac buffer[0] |
Referenced by nasl_telnet_init().
| #define NASL_EXIT_DEPRECATED 66 |
Definition at line 51 of file nasl_misc_funcs.c.
| #define NASL_EXIT_NOTVULN 99 |
Definition at line 52 of file nasl_misc_funcs.c.
Referenced by nasl_do_exit().
| #define option buffer[2] |
Referenced by nasl_send(), and nasl_telnet_init().
| #define uint32 unsigned int |
Definition at line 49 of file nasl_misc_funcs.c.
Referenced by nasl_dec2str().
Definition at line 1007 of file nasl_misc_funcs.c.
References alloc_tree_cell(), CONST_DATA, get_int_local_var_by_name(), nasl_perror(), SIVAL, TC::size, TC::str_val, TC::type, uint32, and TC::x.

Definition at line 608 of file nasl_misc_funcs.c.
References alloc_tree_cell(), CONST_INT, get_func_ref_by_name(), get_str_var_by_num(), TC::i_val, nasl_perror(), TC::type, and TC::x.

Definition at line 331 of file nasl_misc_funcs.c.
References alloc_tree_cell(), CONST_INT, get_int_var_by_num(), TC::i_val, NASL_EXIT_NOTVULN, TC::type, and TC::x.

Definition at line 309 of file nasl_misc_funcs.c.
References dump_ctxt(), FAKE_CELL, and struct_lex_ctxt::up_ctxt.

Definition at line 255 of file nasl_misc_funcs.c.
References alloc_tree_cell(), arg_get_value_int(), BOGUS, close_stream_connection(), CONST_INT, TC::i_val, nasl_tcp_ping(), nsend(), open_stream_connection(), OPENVAS_ENCAPS_IP, struct_lex_ctxt::recv_timeout, struct_lex_ctxt::script_infos, TC::type, and TC::x.

Definition at line 115 of file nasl_misc_funcs.c.
References alloc_tree_cell(), CONST_INT, ftp_get_pasv_address(), and get_int_local_var_by_name().

Definition at line 86 of file nasl_misc_funcs.c.
References alloc_tree_cell(), CONST_INT, ftp_log_in(), get_int_local_var_by_name(), get_str_local_var_by_name(), TC::i_val, TC::type, and TC::x.

Definition at line 698 of file nasl_misc_funcs.c.
References alloc_typed_cell(), st_nasl_func::args_names, CONST_INT, get_func_ref_by_name(), get_int_var_by_num(), get_str_var_by_num(), get_var_type_by_num(), TC::i_val, nasl_perror(), st_nasl_func::nb_named_args, VAR2_DATA, VAR2_INT, VAR2_STRING, and TC::x.

Definition at line 629 of file nasl_misc_funcs.c.
References add_var_to_list(), alloc_typed_cell(), st_nasl_func::args_names, DYN_ARRAY, get_func_ref_by_name(), get_str_var_by_num(), nasl_perror(), st_nasl_func::nb_named_args, TC::ref_val, st_nasl_string::s_siz, st_nasl_string::s_val, st_a_nasl_var::v, st_a_nasl_var::v_str, VAR2_STRING, st_a_nasl_var::var_type, and TC::x.

Definition at line 671 of file nasl_misc_funcs.c.
References alloc_typed_cell(), CONST_INT, get_func_ref_by_name(), get_str_var_by_num(), TC::i_val, nasl_perror(), st_nasl_func::nb_unnamed_args, and TC::x.

This function returns 1 on little-endian systems, 0 otherwise
Definition at line 1030 of file nasl_misc_funcs.c.
References alloc_typed_cell(), CONST_INT, TC::i_val, val, and TC::x.

Definition at line 802 of file nasl_misc_funcs.c.
References alloc_typed_cell(), CONST_DATA, nasl_perror(), TC::size, TC::str_val, timeval(), and TC::x.

Definition at line 954 of file nasl_misc_funcs.c.
References alloc_tree_cell(), CONST_DATA, get_str_local_var_by_name(), get_var_size_by_name(), openvas_uncompress(), TC::size, TC::str_val, TC::type, and TC::x.

Definition at line 980 of file nasl_misc_funcs.c.
References alloc_tree_cell(), CONST_DATA, get_str_local_var_by_name(), get_var_size_by_name(), openvas_compress(), TC::size, TC::str_val, TC::type, and TC::x.

Definition at line 359 of file nasl_misc_funcs.c.
References alloc_tree_cell(), CONST_INT, get_var_type_by_num(), TC::i_val, TC::type, VAR2_UNDEF, and TC::x.

Definition at line 498 of file nasl_misc_funcs.c.
References add_var_to_list(), alloc_tree_cell(), struct_lex_ctxt::ctx_vars, DYN_ARRAY, st_nasl_array::hash_elt, st_nasl_array::max_idx, nasl_get_var_by_num(), nasl_perror(), st_n_nasl_var::next_var, st_nasl_array::num_elt, TC::ref_val, st_nasl_string::s_siz, st_nasl_string::s_val, TC::type, st_n_nasl_var::u, st_a_nasl_var::v, st_a_nasl_var::v_arr, st_a_nasl_var::v_int, st_a_nasl_var::v_str, VAR2_ARRAY, VAR2_INT, VAR2_STRING, VAR2_UNDEF, st_n_nasl_var::var_name, VAR_NAME_HASH, st_a_nasl_var::var_type, and TC::x.

Definition at line 822 of file nasl_misc_funcs.c.
References add_var_to_array(), alloc_typed_cell(), DYN_ARRAY, get_int_local_var_by_name(), get_int_var_by_num(), nasl_perror(), TC::ref_val, st_a_nasl_var::v, st_a_nasl_var::v_int, VAR2_INT, st_a_nasl_var::var_type, and TC::x.

Definition at line 447 of file nasl_misc_funcs.c.
References add_var_to_array(), add_var_to_list(), alloc_tree_cell(), struct_lex_ctxt::ctx_vars, DYN_ARRAY, nasl_get_var_by_num(), nasl_perror(), TC::ref_val, TC::type, st_a_nasl_var::v, st_a_nasl_var::v_int, VAR2_DATA, VAR2_INT, VAR2_STRING, VAR2_UNDEF, var2str(), st_a_nasl_var::var_type, and TC::x.

This function takes any kind & any number of arguments and makes an array from them. If an argument is an array, its index are lost
Definition at line 377 of file nasl_misc_funcs.c.
References add_var_to_list(), alloc_tree_cell(), struct_lex_ctxt::ctx_vars, DYN_ARRAY, st_nasl_array::hash_elt, st_nasl_array::max_idx, nasl_get_var_by_num(), nasl_perror(), st_n_nasl_var::next_var, st_nasl_array::num_elt, TC::ref_val, TC::type, st_n_nasl_var::u, st_a_nasl_var::v, st_a_nasl_var::v_arr, VAR2_ARRAY, VAR2_DATA, VAR2_INT, VAR2_STRING, VAR2_UNDEF, VAR_NAME_HASH, st_a_nasl_var::var_type, and TC::x.

Definition at line 546 of file nasl_misc_funcs.c.
References alloc_tree_cell(), array_max_index(), CONST_INT, struct_lex_ctxt::ctx_vars, TC::i_val, nasl_get_var_by_num(), TC::type, st_a_nasl_var::v, st_a_nasl_var::v_arr, VAR2_ARRAY, st_a_nasl_var::var_type, and TC::x.

Definition at line 878 of file nasl_misc_funcs.c.
References alloc_typed_cell(), CONST_INT, get_int_local_var_by_name(), and nasl_perror().

Definition at line 912 of file nasl_misc_funcs.c.
References alloc_typed_cell(), CONST_INT, TC::i_val, KB_TYPE_INT, KB_TYPE_STR, open_sock_opt_hn(), plug_get_key(), struct_lex_ctxt::script_infos, arglist::type, and TC::x.

Definition at line 56 of file nasl_misc_funcs.c.
References alloc_tree_cell(), CONST_INT, TC::i_val, TC::type, and TC::x.

Definition at line 75 of file nasl_misc_funcs.c.
References FAKE_CELL, and get_int_var_by_num().

Definition at line 770 of file nasl_misc_funcs.c.
Definition at line 211 of file nasl_misc_funcs.c.
References arg_add_value(), arg_get_value(), ARG_INT, arg_set_value(), close_stream_connection(), deref_cell(), FAKE_CELL, TC::i_val, nasl_tcp_ping(), open_stream_connection(), OPENVAS_ENCAPS_IP, plug_get_host_open_port(), struct_lex_ctxt::recv_timeout, struct_lex_ctxt::script_infos, and TC::x.

Definition at line 137 of file nasl_misc_funcs.c.
References alloc_typed_cell(), code, CONST_DATA, get_int_var_by_num(), iac, nasl_perror(), option, read_stream_connection(), read_stream_connection_min(), TC::size, TC::str_val, write_stream_connection(), and TC::x.

Definition at line 568 of file nasl_misc_funcs.c.
References alloc_tree_cell(), CONST_DATA, struct_lex_ctxt::ctx_vars, nasl_get_var_by_num(), TC::size, TC::str_val, TC::type, VAR2_ARRAY, VAR2_DATA, VAR2_INT, VAR2_STRING, VAR2_UNDEF, st_a_nasl_var::var_type, and TC::x.

Definition at line 792 of file nasl_misc_funcs.c.
References alloc_typed_cell(), CONST_INT, TC::i_val, and TC::x.

Definition at line 67 of file nasl_misc_funcs.c.
References FAKE_CELL, and get_int_var_by_num().
