OpenVAS Libraries
9.0.3
|
Go to the source code of this file.
Data Structures | |
struct | struct_lex_ctxt |
Macros | |
#define | NASL_COMPAT_LEX_CTXT "NASL compat lex context" |
Typedefs | |
typedef struct struct_lex_ctxt | lex_ctxt |
#define NASL_COMPAT_LEX_CTXT "NASL compat lex context" |
Definition at line 49 of file nasl_lex_ctxt.h.
typedef struct struct_lex_ctxt lex_ctxt |
named_nasl_var* add_named_var_to_ctxt | ( | lex_ctxt * | , |
const char * | , | ||
tree_cell * | |||
) |
Definition at line 908 of file nasl_var.c.
Referenced by decl_local_variables(), and exec_nasl_script().
anon_nasl_var* add_numbered_var_to_ctxt | ( | lex_ctxt * | , |
int | , | ||
tree_cell * | |||
) |
Definition at line 876 of file nasl_var.c.
References struct_lex_ctxt::ctx_vars, st_nasl_array::max_idx, nasl_perror(), st_nasl_array::num_elt, val, VAR2_UNDEF, and st_a_nasl_var::var_type.
Definition at line 216 of file exec.c.
References cell2atom(), CONST_DATA, CONST_INT, CONST_STR, deref_cell(), DYN_ARRAY, FAKE_CELL, nasl_exec(), REF_ARRAY, ref_cell(), and TC::type.
Referenced by cell2atom(), cell_cmp(), and nasl_return().
Definition at line 866 of file nasl_var.c.
References decl_local_variables(), and struct_lex_ctxt::up_ctxt.
Definition at line 853 of file nasl_var.c.
References add_named_var_to_ctxt(), FAKE_CELL, TC::link, nasl_perror(), TC::str_val, and TC::x.
Referenced by decl_global_variables().
Definition at line 111 of file nasl_func.c.
References FAKE_CELL, insert_nasl_func(), nasl_perror(), TC::str_val, and TC::x.
Referenced by nasl_lint().
void dump_ctxt | ( | lex_ctxt * | ) |
Definition at line 64 of file nasl_lex_ctxt.c.
References struct_lex_ctxt::ctx_vars, struct_lex_ctxt::fct_ctxt, st_nasl_func::func_name, FUNC_NAME_HASH, struct_lex_ctxt::functions, st_nasl_array::hash_elt, nasl_dump_tree(), st_nasl_func::next_func, st_n_nasl_var::next_var, struct_lex_ctxt::ret_val, struct_lex_ctxt::up_ctxt, st_n_nasl_var::var_name, and VAR_NAME_HASH.
Referenced by nasl_dump_ctxt().
void free_lex_ctxt | ( | lex_ctxt * | ) |
Definition at line 46 of file nasl_lex_ctxt.c.
References struct_lex_ctxt::ctx_vars, deref_cell(), free_array(), free_func_chain(), FUNC_NAME_HASH, struct_lex_ctxt::functions, struct_lex_ctxt::ret_val, and struct_lex_ctxt::up_ctxt.
Referenced by exec_nasl_script().
Definition at line 238 of file nasl_var.c.
References struct_lex_ctxt::ctx_vars, struct_lex_ctxt::fct_ctxt, st_nasl_array::hash_elt, name, struct_lex_ctxt::up_ctxt, st_a_nasl_var::v, st_a_nasl_var::v_arr, VAR2_ARRAY, and st_a_nasl_var::var_type.
Definition at line 126 of file nasl_func.c.
Referenced by exec_nasl_script(), nasl_defined_func(), nasl_func_has_arg(), nasl_func_named_args(), nasl_func_unnamed_args(), and nasl_lint().
long int get_int_local_var_by_name | ( | lex_ctxt * | , |
const char * | , | ||
int | |||
) |
Definition at line 1240 of file nasl_var.c.
Referenced by forge_icmp_packet(), forge_icmp_v6_packet(), forge_igmp_packet(), forge_igmp_v6_packet(), forge_ip_packet(), forge_ipv6_packet(), forge_tcp_packet(), forge_tcp_v6_packet(), forge_udp_packet(), forge_udp_v6_packet(), get_port_transport(), insert_ip_options(), insert_ipv6_options(), nasl_bn_random(), nasl_crap(), nasl_dec2str(), nasl_egrep(), nasl_ereg(), nasl_ereg_replace(), nasl_eregmatch(), nasl_file_read(), nasl_file_seek(), nasl_file_write(), nasl_ftp_get_pasv_address(), nasl_ftp_log_in(), nasl_get_sock_info(), nasl_localtime(), nasl_match(), nasl_mktime(), nasl_open_sock_tcp_bufsz(), nasl_pcap_next(), nasl_recv(), nasl_recv_line(), nasl_same_host(), nasl_scanner_add_port(), nasl_send(), nasl_send_capture(), nasl_send_packet(), nasl_send_v6packet(), nasl_smb_close(), nasl_smb_file_group_sid(), nasl_smb_file_owner_sid(), nasl_smb_file_SDDL(), nasl_smb_file_trustee_rights(), nasl_socket_get_cert(), nasl_socket_get_ssl_ciphersuite(), nasl_socket_get_ssl_compression(), nasl_socket_get_ssl_session_id(), nasl_socket_get_ssl_version(), nasl_socket_negotiate_ssl(), nasl_split(), nasl_ssh_connect(), nasl_str_replace(), nasl_tcp_ping(), nasl_tcp_v6_ping(), nasl_wmi_close(), nasl_wmi_query(), nasl_wmi_query_rsop(), nasl_wmi_reg_create_key(), nasl_wmi_reg_delete_key(), nasl_wmi_reg_enum_key(), nasl_wmi_reg_enum_value(), nasl_wmi_reg_get_bin_val(), nasl_wmi_reg_get_dword_val(), nasl_wmi_reg_get_ex_string_val(), nasl_wmi_reg_get_mul_string_val(), nasl_wmi_reg_get_qword_val(), nasl_wmi_reg_get_sz(), nasl_wmi_reg_set_dword_val(), nasl_wmi_reg_set_ex_string_val(), nasl_wmi_reg_set_qword_val(), nasl_wmi_reg_set_string_val(), replace_kb_item(), set_ip_elements(), set_ipv6_elements(), set_kb_item(), set_tcp_elements(), set_tcp_v6_elements(), and set_udp_v6_elements().
long int get_int_var_by_name | ( | lex_ctxt * | , |
const char * | , | ||
int | |||
) |
Definition at line 1233 of file nasl_var.c.
Referenced by nasl_get_sign(), nasl_ntlm_response(), nasl_ntlmv2_hash(), and nasl_ntlmv2_response().
long int get_int_var_by_num | ( | lex_ctxt * | , |
int | , | ||
int | |||
) |
Definition at line 1226 of file nasl_var.c.
Referenced by get_kb_item(), get_port_state(), get_port_transport(), get_udp_port_state(), nasl_cert_close(), nasl_cert_query(), nasl_close_socket(), nasl_crap(), nasl_do_exit(), nasl_file_close(), nasl_func_has_arg(), nasl_get_sock_info(), nasl_get_source_port(), nasl_hex(), nasl_insstr(), nasl_int(), nasl_localtime(), nasl_open_sock_tcp_bufsz(), nasl_open_sock_udp(), nasl_rawstring(), nasl_scanner_get_port(), nasl_sleep(), nasl_socket_get_error(), nasl_ssh_disconnect(), nasl_ssh_get_auth_methods(), nasl_ssh_get_host_key(), nasl_ssh_get_issue_banner(), nasl_ssh_get_server_banner(), nasl_ssh_get_sock(), nasl_ssh_login_interactive(), nasl_ssh_login_interactive_pass(), nasl_ssh_request_exec(), nasl_ssh_session_id_from_sock(), nasl_ssh_set_login(), nasl_ssh_shell_close(), nasl_ssh_shell_open(), nasl_ssh_shell_read(), nasl_ssh_shell_write(), nasl_ssh_userauth(), nasl_stridx(), nasl_substr(), nasl_telnet_init(), nasl_usleep(), script_category(), script_id(), and script_timeout().
int get_local_var_size_by_name | ( | lex_ctxt * | , |
const char * | |||
) |
Definition at line 1298 of file nasl_var.c.
Referenced by forge_icmp_packet(), forge_icmp_v6_packet(), forge_igmp_packet(), forge_igmp_v6_packet(), forge_ip_packet(), forge_ipv6_packet(), forge_tcp_packet(), forge_tcp_v6_packet(), forge_udp_packet(), forge_udp_v6_packet(), get_tcp_element(), get_tcp_v6_element(), get_udp_element(), get_udp_v6_element(), nasl_hmac_sha256(), nasl_str_replace(), set_tcp_elements(), set_tcp_v6_elements(), set_udp_elements(), and set_udp_v6_elements().
int get_local_var_type_by_name | ( | lex_ctxt * | , |
const char * | |||
) |
Definition at line 1322 of file nasl_var.c.
Referenced by nasl_open_sock_tcp_bufsz(), replace_kb_item(), and set_kb_item().
char* get_str_local_var_by_name | ( | lex_ctxt * | , |
const char * | |||
) |
Definition at line 1262 of file nasl_var.c.
Referenced by forge_icmp_packet(), forge_icmp_v6_packet(), forge_igmp_packet(), forge_igmp_v6_packet(), forge_ip_packet(), forge_ipv6_packet(), forge_tcp_packet(), forge_tcp_v6_packet(), forge_udp_packet(), forge_udp_v6_packet(), get_icmp_element(), get_icmp_v6_element(), get_ip_element(), get_ipv6_element(), get_tcp_element(), get_tcp_v6_element(), get_udp_element(), get_udp_v6_element(), insert_ip_options(), insert_ipv6_options(), nasl_bf_cbc(), nasl_crap(), nasl_egrep(), nasl_ereg(), nasl_ereg_replace(), nasl_eregmatch(), nasl_file_open(), nasl_file_write(), nasl_ftp_log_in(), nasl_fwrite(), nasl_gunzip(), nasl_gzip(), nasl_match(), nasl_open_sock_tcp_bufsz(), nasl_pcap_next(), nasl_rsa_sign(), nasl_scanner_add_port(), nasl_send(), nasl_send_capture(), nasl_send_packet(), nasl_send_v6packet(), nasl_smb_connect(), nasl_smb_file_group_sid(), nasl_smb_file_owner_sid(), nasl_smb_file_SDDL(), nasl_smb_file_trustee_rights(), nasl_split(), nasl_str_replace(), nasl_wmi_query(), nasl_wmi_query_rsop(), nasl_wmi_reg_create_key(), nasl_wmi_reg_delete_key(), nasl_wmi_reg_enum_key(), nasl_wmi_reg_enum_value(), nasl_wmi_reg_get_bin_val(), nasl_wmi_reg_get_dword_val(), nasl_wmi_reg_get_ex_string_val(), nasl_wmi_reg_get_mul_string_val(), nasl_wmi_reg_get_qword_val(), nasl_wmi_reg_get_sz(), nasl_wmi_reg_set_dword_val(), nasl_wmi_reg_set_ex_string_val(), nasl_wmi_reg_set_qword_val(), nasl_wmi_reg_set_string_val(), replace_kb_item(), script_add_preference(), set_ip_elements(), set_ipv6_elements(), set_kb_item(), set_tcp_elements(), set_tcp_v6_elements(), set_udp_elements(), and set_udp_v6_elements().
char* get_str_var_by_name | ( | lex_ctxt * | , |
const char * | |||
) |
Definition at line 1255 of file nasl_var.c.
Referenced by nasl_get_sign(), nasl_get_smb2_sign(), nasl_hmac_sha256(), nasl_insert_hexzeros(), nasl_keyexchg(), nasl_ntlm2_response(), nasl_ntlm_response(), nasl_ntlmv1_hash(), nasl_ntlmv2_hash(), nasl_ntlmv2_response(), nasl_ntv2_owf_gen(), nasl_rsa_private_decrypt(), nasl_rsa_public_encrypt(), script_mandatory_keys(), script_tag(), and script_xref().
char* get_str_var_by_num | ( | lex_ctxt * | , |
int | |||
) |
Definition at line 1248 of file nasl_var.c.
Referenced by dump_ip_packet(), dump_ipv6_packet(), dump_tcp_packet(), dump_tcp_v6_packet(), dump_udp_packet(), dump_udp_v6_packet(), get_kb_item(), get_kb_list(), nasl_cert_open(), nasl_chomp(), nasl_cipher_des(), nasl_defined_func(), nasl_file_stat(), nasl_find_in_path(), nasl_fread(), nasl_func_has_arg(), nasl_func_named_args(), nasl_func_unnamed_args(), nasl_get_preference(), nasl_get_sock_info(), nasl_hexstr(), nasl_insstr(), nasl_isotime_add(), nasl_isotime_is_valid(), nasl_isotime_print(), nasl_isotime_scan(), nasl_join_multicast_group(), nasl_leave_multicast_group(), nasl_lm_owf_gen(), nasl_nt_owf_gen(), nasl_ord(), nasl_rawstring(), nasl_same_host(), nasl_send_packet(), nasl_send_v6packet(), nasl_split(), nasl_strcat(), nasl_stridx(), nasl_string(), nasl_strstr(), nasl_substr(), nasl_tolower(), nasl_toupper(), nasl_unlink(), script_bugtraq_id(), script_copyright(), script_cve_id(), script_dependencies(), script_exclude_keys(), script_family(), script_get_preference(), script_get_preference_file_content(), script_get_preference_file_location(), script_mandatory_keys(), script_name(), script_oid(), script_require_keys(), script_require_ports(), script_require_udp_ports(), and script_version().
int get_var_size_by_name | ( | lex_ctxt * | , |
const char * | |||
) |
Definition at line 1291 of file nasl_var.c.
Referenced by forge_icmp_packet(), forge_icmp_v6_packet(), forge_tcp_packet(), forge_tcp_v6_packet(), get_icmp_element(), get_icmp_v6_element(), insert_ip_options(), insert_ipv6_options(), nasl_bf_cbc(), nasl_crap(), nasl_egrep(), nasl_file_write(), nasl_fwrite(), nasl_get_smb2_sign(), nasl_gunzip(), nasl_gzip(), nasl_insert_hexzeros(), nasl_ntlm2_response(), nasl_ntlm_response(), nasl_ntlmv1_hash(), nasl_ntlmv2_hash(), nasl_ntv2_owf_gen(), nasl_rsa_sign(), nasl_send(), nasl_split(), set_ip_elements(), and set_ipv6_elements().
int get_var_size_by_num | ( | lex_ctxt * | , |
int | |||
) |
Definition at line 1305 of file nasl_var.c.
Referenced by dump_tcp_packet(), dump_tcp_v6_packet(), dump_udp_packet(), dump_udp_v6_packet(), nasl_cert_open(), nasl_chomp(), nasl_cipher_des(), nasl_hexstr(), nasl_insstr(), nasl_isotime_add(), nasl_isotime_is_valid(), nasl_isotime_print(), nasl_isotime_scan(), nasl_lm_owf_gen(), nasl_rawstring(), nasl_send_packet(), nasl_send_v6packet(), nasl_split(), nasl_strcat(), nasl_stridx(), nasl_string(), nasl_strlen(), nasl_strstr(), nasl_substr(), nasl_tolower(), and nasl_toupper().
int get_var_type_by_num | ( | lex_ctxt * | , |
int | |||
) |
Returns NASL variable/cell type, VAR2_UNDEF if value is NULL.
Definition at line 1315 of file nasl_var.c.
Referenced by nasl_func_has_arg(), nasl_get_sock_info(), nasl_isnull(), nasl_isotime_is_valid(), nasl_isotime_scan(), nasl_rawstring(), nasl_string(), and nasl_substr().
Definition at line 206 of file nasl_var.c.
References alloc_typed_cell(), DYN_ARRAY, name, TC::ref_val, and TC::x.
lex_ctxt* init_empty_lex_ctxt | ( | void | ) |
Definition at line 29 of file nasl_lex_ctxt.c.
References struct_lex_ctxt::ctx_vars, struct_lex_ctxt::fct_ctxt, FUNC_NAME_HASH, struct_lex_ctxt::functions, st_nasl_array::hash_elt, st_nasl_array::max_idx, st_nasl_array::num_elt, struct_lex_ctxt::oid, struct_lex_ctxt::ret_val, and VAR_NAME_HASH.
Referenced by exec_nasl_script(), and nasl_func_call().
Definition at line 65 of file nasl_func.c.
Referenced by decl_nasl_func().
Definition at line 147 of file nasl_func.c.
References st_nasl_func::args_names, FAKE_CELL, struct_lex_ctxt::fct_ctxt, st_nasl_func::flags, FUNC_FLAG_COMPAT, st_nasl_func::func_name, init_empty_lex_ctxt(), TC::link, nasl_dump_tree(), nasl_trace_fp, st_nasl_func::nb_named_args, struct_lex_ctxt::oid, struct_lex_ctxt::recv_timeout, struct_lex_ctxt::script_infos, TC::str_val, TRACE_BUF_SZ, and TC::x.
Referenced by exec_nasl_script().
Definition at line 1034 of file nasl_var.c.
References alloc_tree_cell(), clear_anon_var(), CONST_INT, get_line_nb(), TC::i_val, nasl_perror(), TC::ref_val, REF_VAR, st_nasl_string::s_val, TC::type, st_a_nasl_var::v, st_a_nasl_var::v_int, st_a_nasl_var::v_str, val, VAR2_DATA, VAR2_INT, VAR2_STRING, VAR2_UNDEF, st_a_nasl_var::var_type, and TC::x.
Definition at line 935 of file nasl_var.c.
References alloc_tree_cell(), CONST_INT, FAKE_CELL, get_line_nb(), TC::i_val, TC::line_nb, name, nasl_perror(), nasl_trace(), nasl_trace_enabled(), TC::ref_val, REF_VAR, TC::type, 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 325 of file nasl_func.c.
References cell2atom(), copy_ref_array(), deref_cell(), FAKE_CELL, struct_lex_ctxt::fct_ctxt, REF_ARRAY, ref_cell(), struct_lex_ctxt::ret_val, TC::type, and struct_lex_ctxt::up_ctxt.