|
OpenVAS Scanner 23.32.3
|
Header file for module plugutils. More...


Go to the source code of this file.
Macros | |
| #define | ARG_STRING 1 |
| #define | ARG_INT 2 |
| #define | post_alarm_tcp post_alarm |
| #define | post_error_tcp post_error |
| #define | post_log_tcp post_log |
Enumerations | |
| enum | msg_t { ERRMSG , HOST_START , HOST_END , LOG , HOST_DETAIL , ALARM , DEADHOST , HOSTS_COUNT } |
Functions | |
| void | init_kb_usage (void) |
| void | scanner_add_port (struct script_infos *, int, char *) |
| void | plug_set_dep (struct script_infos *, const char *) |
| void | plug_set_ssl_cert (struct script_infos *, char *) |
| void | plug_set_ssl_key (struct script_infos *, char *) |
| void | plug_set_ssl_pem_password (struct script_infos *, char *) |
| void | plug_set_ssl_CA_file (struct script_infos *, char *) |
| const char * | plug_current_vhost (void) |
| char * | plug_get_host_fqdn (struct script_infos *) |
| int | plug_add_host_fqdn (struct script_infos *, const char *, const char *) |
| GSList * | plug_get_host_fqdn_list (struct script_infos *) |
| char * | plug_get_host_source (struct script_infos *, const char *) |
| unsigned int | plug_get_host_open_port (struct script_infos *desc) |
| void | plug_set_port_transport (struct script_infos *, int, int) |
| int | plug_get_port_transport (struct script_infos *, int) |
| struct script_infos * | plug_create_from_nvti_and_prefs (const nvti_t *) |
| void | proto_post_alarm (const char *, struct script_infos *, int, const char *, const char *, const char *) |
| void | post_alarm (const char *, struct script_infos *, int, const char *, const char *) |
| void | post_alarm_udp (struct script_infos *, int, const char *, const char *) |
| void | proto_post_error (const char *, struct script_infos *, int, const char *, const char *, const char *) |
| void | post_error (const char *, struct script_infos *, int, const char *, const char *) |
| void | proto_post_log (const char *, struct script_infos *, int, const char *, const char *, const char *) |
| Post a log message. | |
| void | post_log (const char *, struct script_infos *, int, const char *) |
| Post a log message about a tcp port. | |
| void | post_log_with_uri (const char *, struct script_infos *, int, const char *, const char *) |
| Post a log message about a tcp port with a uri. | |
| int | host_get_port_state (struct script_infos *, int) |
| int | host_get_port_state_udp (struct script_infos *, int) |
| int | check_kb_inconsistency (kb_t) |
| Check if the current main kb corresponds to the original scan main kb. @description Compares the scan id in get_scan_id, set at the beginning of the scan, with the one found in the main kb. Therefore it is mandatory that the global main_kb variable to be set. It helps to detect that the kb was not taken by another task/scan, and that the current plugins does not stores results in a wrong kb. | |
| int | kb_item_push_str_with_main_kb_check (kb_t, const char *, const char *) |
| Check if the current kb corresponds to the original scanid, if it matches it kb_item_push_str. @description Compares the scan id in get_scan_id, set at the beginning of the scan, with the one found in the main kb. Therefore it is mandatory that the global main_kb variable to be set. It helps to detect that the kb was not taken by another task/scan, and that the current plugins does not stores results in a wrong kb. | |
| int | kb_item_set_str_with_main_kb_check (kb_t, const char *, const char *, size_t) |
| Check if the current kb corresponds to the original scanid, if it matches it call kb_item_set_str. @description Compares the scan id in get_scan_id, set at the beginning of the scan, with the one found in the main kb. Therefore it is mandatory that the global main_kb variable to be set. It helps to detect that the kb was not taken by another task/scan, and that the current plugins does not stores results in a wrong kb. | |
| int | kb_item_add_str_unique_with_main_kb_check (kb_t, const char *, const char *, size_t, int) |
| Check if the current kb corresponds to the original scanid, if it matches it call kb_item_add_str_unique. @description Compares the scan id in get_scan_id, set at the beginning of the scan, with the one found in the main kb. Therefore it is mandatory that the global main_kb variable to be set. It helps to detect that the kb was not taken by another task/scan, and that the current plugins does not stores results in a wrong kb. | |
| int | kb_item_set_int_with_main_kb_check (kb_t, const char *, int) |
| Check if the current kb corresponds to the original scanid, if it matches it call kb_item_set_int. @description Compares the scan id in get_scan_id, set at the beginning of the scan, with the one found in the main kb. Therefore it is mandatory that the global main_kb variable to be set. It helps to detect that the kb was not taken by another task/scan, and that the current plugins does not stores results in a wrong kb. | |
| int | kb_item_add_int_with_main_kb_check (kb_t, const char *, int) |
| Check if the current kb corresponds to the original scanid, if it matches it call kb_item_add_int. @description Compares the scan id in get_scan_id, add at the beginning of the scan, with the one found in the main kb. Therefore it is mandatory that the global main_kb variable to be set. It helps to detect that the kb was not taken by another task/scan, and that the current plugins does not stores results in a wrong kb. | |
| int | kb_item_add_int_unique_with_main_kb_check (kb_t, const char *, int) |
| Check if the current kb corresponds to the original scanid, if it matches it call kb_item_add_int_unique. @description Compares the scan id in get_scan_id, add at the beginning of the scan, with the one found in the main kb. Therefore it is mandatory that the global main_kb variable to be set. It helps to detect that the kb was not taken by another task/scan, and that the current plugins does not stores results in a wrong kb. | |
| void | plug_set_key (struct script_infos *, char *, int, const void *) |
| void | plug_set_key_len (struct script_infos *, char *, int, const void *, size_t) |
| void | plug_set_key_volatile (struct script_infos *, char *, int, const void *, int) |
| Set volatile key with expire. | |
| void | plug_set_key_len_volatile (struct script_infos *, char *, int, const void *, int, size_t) |
| Set volatile key with expire. | |
| void | plug_replace_key (struct script_infos *, char *, int, void *) |
| void | plug_replace_key_len (struct script_infos *, char *, int, void *, size_t) |
| kb_t | plug_get_kb (struct script_infos *) |
| void * | plug_get_key (struct script_infos *, char *, int *, size_t *, int) |
| Get values from a kb under the given key name. | |
| struct in6_addr * | plug_get_host_ip (struct script_infos *) |
| char * | plug_get_host_ip_str (struct script_infos *) |
| char * | get_plugin_preference (const char *, const char *, int) |
| Get the a plugins preference. | |
| const char * | get_plugin_preference_fname (struct script_infos *, const char *) |
| Get the file name of a plugins preference that is of type "file". | |
| char * | get_plugin_preference_file_content (struct script_infos *, const char *) |
| Get the file contents of a plugins preference that is of type "file". | |
| long | get_plugin_preference_file_size (struct script_infos *, const char *) |
| Get the file size of a plugins preference that is of type "file". | |
| int | kb_get_port_state_proto (kb_t kb, int portnum, char *proto) |
Header file for module plugutils.
Definition in file plugutils.h.
| #define ARG_INT 2 |
Definition at line 20 of file plugutils.h.
Referenced by banner_grab(), host_add_port_proto(), mark_smtp_server(), mark_unknown_svc(), mark_wrapped_svc(), plug_replace_key_len(), plug_set_key_len(), plug_set_key_len_volatile(), plug_set_port_transport(), plugin_do_run(), plugin_run_openvas_tcp_scanner(), plugin_run_synscan(), register_service(), replace_kb_item(), scan(), set_kb_item(), and set_kb_item_volatile().
| #define ARG_STRING 1 |
Definition at line 19 of file plugutils.h.
Referenced by banner_grab(), mark_acap_server(), mark_adsgone(), mark_exchg_routing_server(), mark_ftp_server(), mark_fw1(), mark_http_server(), mark_imap_server(), mark_linuxconf(), mark_locked_adsubtract_server(), mark_mon_server(), mark_ncacn_http_server(), mark_nntp_server(), mark_pop3pw_server(), mark_pop_server(), mark_psybnc(), mark_rmserver(), mark_shoutcast_server(), mark_smtp_server(), mark_snpp_server(), mark_unknown_svc(), mark_uucp_server(), mark_vnc_server(), mark_vtun_server(), mark_whois_plus2_server(), mark_zebra_server(), nasl_update_table_driven_lsc_data(), plug_replace_key_len(), plug_set_key_len(), plug_set_key_len_volatile(), plug_set_ssl_item(), plugin_do_run(), register_service(), replace_kb_item(), set_kb_item(), set_kb_item_volatile(), and simple_register_host_detail().
| #define post_alarm_tcp post_alarm |
Definition at line 101 of file plugutils.h.
| #define post_error_tcp post_error |
Definition at line 110 of file plugutils.h.
| #define post_log_tcp post_log |
Definition at line 123 of file plugutils.h.
| enum msg_t |
| Enumerator | |
|---|---|
| ERRMSG | |
| HOST_START | |
| HOST_END | |
| LOG | |
| HOST_DETAIL | |
| ALARM | |
| DEADHOST | |
| HOSTS_COUNT | |
Definition at line 78 of file plugutils.h.
| int check_kb_inconsistency | ( | kb_t | main_kb | ) |
Check if the current main kb corresponds to the original scan main kb. @description Compares the scan id in get_scan_id, set at the beginning of the scan, with the one found in the main kb. Therefore it is mandatory that the global main_kb variable to be set. It helps to detect that the kb was not taken by another task/scan, and that the current plugins does not stores results in a wrong kb.
| main_kb | Current main kb. |
Definition at line 442 of file plugutils.c.
References get_scan_id(), and main_kb.
Referenced by attack_host(), check_kb_inconsistency_log(), and set_scan_status().


| char * get_plugin_preference | ( | const char * | oid, |
| const char * | name, | ||
| int | pref_id ) |
Get the a plugins preference.
Search in the preferences set by the client. If it is not present, search in redis cache for the default.
| [in] | oid | Script OID to get the preference from |
| [in] | name | Name of the preference to get |
| [in] | pref_id | Id of the preferences to get |
Definition at line 832 of file plugutils.c.
References name, oid, and prefix().
Referenced by plugin_do_run(), plugin_run_find_service(), plugin_timeout(), script_get_preference(), script_get_preference_file_content(), script_get_preference_file_location(), and user_agent_create().


| char * get_plugin_preference_file_content | ( | struct script_infos * | desc, |
| const char * | identifier ) |
Get the file contents of a plugins preference that is of type "file".
As files sent to the scanner (e.g. as plugin preference) are stored in a hash table with an identifier supplied by the client as the key, the contents have to be looked up here.
| identifier | Identifier that was supplied by the client when the file was uploaded. |
identifier, NULL if not found or setup broken. Definition at line 975 of file plugutils.c.
References scan_globals::files_translation, and script_infos::globals.
Referenced by get_plugin_preference_fname(), and script_get_preference_file_content().

| long get_plugin_preference_file_size | ( | struct script_infos * | desc, |
| const char * | identifier ) |
Get the file size of a plugins preference that is of type "file".
Files sent to the scanner (e.g. as plugin preference) are stored in a hash table with an identifier supplied by the client as the key. The size of the file is stored in a separate hash table with the same identifier as key, which can be looked up here.
| identifier | Identifier that was supplied by the client when the file was uploaded. |
identifier, -1 if not found or setup broken. Definition at line 1006 of file plugutils.c.
References scan_globals::files_size_translation, and script_infos::globals.
Referenced by get_plugin_preference_fname(), and script_get_preference_file_content().

| const char * get_plugin_preference_fname | ( | struct script_infos * | desc, |
| const char * | filename ) |
Get the file name of a plugins preference that is of type "file".
As files sent to the server (e.g. as plugin preference) are stored at pseudo-random locations with different names, the "real" file name has to be looked up in a hashtable.
filename, NULL if not found or setup broken. Definition at line 920 of file plugutils.c.
References get_plugin_preference_file_content(), and get_plugin_preference_file_size().
Referenced by plugin_run_find_service(), and script_get_preference_file_location().


| int host_get_port_state | ( | struct script_infos * | plugdata, |
| int | portnum ) |
Definition at line 193 of file plugutils.c.
References host_get_port_state_proto().
Referenced by get_port_state(), and open_sock_tcp().


| int host_get_port_state_udp | ( | struct script_infos * | plugdata, |
| int | portnum ) |
Definition at line 199 of file plugutils.c.
References host_get_port_state_proto().
Referenced by get_udp_port_state().


| void init_kb_usage | ( | void | ) |
Definition at line 47 of file plugutils.c.
References max_kb_usage.
Referenced by pluginlaunch_init().

| int kb_get_port_state_proto | ( | kb_t | kb, |
| int | portnum, | ||
| char * | proto ) |
| proto | Protocol (udp/tcp). If NULL, "tcp" will be used. |
Definition at line 149 of file plugutils.c.
Referenced by host_get_port_state_proto().

| int kb_item_add_int_unique_with_main_kb_check | ( | kb_t | kb, |
| const char * | name, | ||
| int | value ) |
Check if the current kb corresponds to the original scanid, if it matches it call kb_item_add_int_unique. @description Compares the scan id in get_scan_id, add at the beginning of the scan, with the one found in the main kb. Therefore it is mandatory that the global main_kb variable to be set. It helps to detect that the kb was not taken by another task/scan, and that the current plugins does not stores results in a wrong kb.
| kb | Kb where to store the item into. |
| name | key for the given value. |
| value | to store under key within kb. |
Definition at line 657 of file plugutils.c.
References check_kb_inconsistency_log(), and name.
Referenced by set_kb_readable().


| int kb_item_add_int_with_main_kb_check | ( | kb_t | kb, |
| const char * | name, | ||
| int | value ) |
Check if the current kb corresponds to the original scanid, if it matches it call kb_item_add_int. @description Compares the scan id in get_scan_id, add at the beginning of the scan, with the one found in the main kb. Therefore it is mandatory that the global main_kb variable to be set. It helps to detect that the kb was not taken by another task/scan, and that the current plugins does not stores results in a wrong kb.
| kb | Kb where to store the item into. |
| name | key for the given value. |
| value | to store under key within kb. |
Definition at line 633 of file plugutils.c.
References check_kb_inconsistency_log(), and name.

| int kb_item_add_str_unique_with_main_kb_check | ( | kb_t | kb, |
| const char * | name, | ||
| const char * | value, | ||
| size_t | len, | ||
| int | pos ) |
Check if the current kb corresponds to the original scanid, if it matches it call kb_item_add_str_unique. @description Compares the scan id in get_scan_id, set at the beginning of the scan, with the one found in the main kb. Therefore it is mandatory that the global main_kb variable to be set. It helps to detect that the kb was not taken by another task/scan, and that the current plugins does not stores results in a wrong kb.
| kb | Kb where to store the item into. |
| name | key for the given value. |
| value | to store under key within kb. |
Definition at line 583 of file plugutils.c.
References check_kb_inconsistency_log(), len, and name.

| int kb_item_push_str_with_main_kb_check | ( | kb_t | kb, |
| const char * | name, | ||
| const char * | value ) |
Check if the current kb corresponds to the original scanid, if it matches it kb_item_push_str. @description Compares the scan id in get_scan_id, set at the beginning of the scan, with the one found in the main kb. Therefore it is mandatory that the global main_kb variable to be set. It helps to detect that the kb was not taken by another task/scan, and that the current plugins does not stores results in a wrong kb.
| kb | Kb where to store the item into. |
| name | key for the given value. |
| value | to store under key within kb. |
Definition at line 533 of file plugutils.c.
References check_kb_inconsistency_log(), and name.
Referenced by attack_host(), call_lsc(), call_rs_notus(), comm_send_status(), comm_send_status_host_dead(), host_set_time(), message_to_client(), open_sock_tcp(), proto_post_wrapped(), security_notus(), and update_running_processes().


| int kb_item_set_int_with_main_kb_check | ( | kb_t | kb, |
| const char * | name, | ||
| int | value ) |
Check if the current kb corresponds to the original scanid, if it matches it call kb_item_set_int. @description Compares the scan id in get_scan_id, set at the beginning of the scan, with the one found in the main kb. Therefore it is mandatory that the global main_kb variable to be set. It helps to detect that the kb was not taken by another task/scan, and that the current plugins does not stores results in a wrong kb.
| kb | Kb where to store the item into. |
| name | key for the given value. |
| value | to store under key within kb. |
Definition at line 609 of file plugutils.c.
References check_kb_inconsistency_log(), and name.
Referenced by check_host_still_alive(), open_sock_tcp(), and overwrite_openvas_prefs_with_prefs_from_client().


| int kb_item_set_str_with_main_kb_check | ( | kb_t | kb, |
| const char * | name, | ||
| const char * | value, | ||
| size_t | len ) |
Check if the current kb corresponds to the original scanid, if it matches it call kb_item_set_str. @description Compares the scan id in get_scan_id, set at the beginning of the scan, with the one found in the main kb. Therefore it is mandatory that the global main_kb variable to be set. It helps to detect that the kb was not taken by another task/scan, and that the current plugins does not stores results in a wrong kb.
| kb | Kb where to store the item into. |
| name | key for the given value. |
| value | to store under key within kb. |
Definition at line 558 of file plugutils.c.
References check_kb_inconsistency_log(), len, and name.
Referenced by attack_start(), overwrite_openvas_prefs_with_prefs_from_client(), and set_scan_status().


| int plug_add_host_fqdn | ( | struct script_infos * | args, |
| const char * | hostname, | ||
| const char * | source ) |
Definition at line 257 of file plugutils.c.
References check_duplicated_vhost(), hostname, and script_infos::vhosts.
Referenced by add_hostname().


| struct script_infos * plug_create_from_nvti_and_prefs | ( | const nvti_t * | ) |
| const char * plug_current_vhost | ( | void | ) |
Definition at line 93 of file plugutils.c.
References current_vhost.
Referenced by nasl_end_denial(), and open_sock_tcp().

| char * plug_get_host_fqdn | ( | struct script_infos * | args | ) |
Definition at line 291 of file plugutils.c.
References current_vhost, script_infos::ip, script_infos::key, plug_fork_child(), script_infos::standalone, and script_infos::vhosts.
Referenced by _http2_req(), _http_req(), get_hostname(), open_stream_connection_ext(), plug_get_host_source(), plugin_do_run(), retry_stream_connection(), and socket_negotiate_ssl().


| GSList * plug_get_host_fqdn_list | ( | struct script_infos * | args | ) |
Definition at line 325 of file plugutils.c.
References script_infos::ip, and script_infos::vhosts.
Referenced by get_hostnames().

| struct in6_addr * plug_get_host_ip | ( | struct script_infos * | args | ) |
Definition at line 371 of file plugutils.c.
References script_infos::ip.
Referenced by forge_ip_packet(), forge_ip_v6_packet(), get_host_ip(), nasl_get_mtu(), nasl_islocalhost(), nasl_islocalnet(), nasl_open_privileged_socket(), nasl_open_sock_udp(), nasl_pcap_next(), nasl_send(), nasl_send_arp_request(), nasl_send_capture(), nasl_send_frame(), nasl_send_packet(), nasl_send_v6packet(), nasl_smb_connect(), nasl_ssh_connect(), nasl_target_is_ipv6(), nasl_tcp_ping(), nasl_tcp_v6_ping(), nasl_this_host(), nasl_win_cmd_exec(), nasl_wmi_connect(), nasl_wmi_connect_reg(), nasl_wmi_connect_rsop(), open_sock_option(), plug_get_host_ip_str(), plugin_run_synscan(), and proto_post_wrapped().

| char * plug_get_host_ip_str | ( | struct script_infos * | desc | ) |
Definition at line 377 of file plugutils.c.
References plug_get_host_ip().
Referenced by host_reverse_lookup(), nasl_snmpv1v2c_get(), nasl_snmpv3_get_action(), open_sock_tcp(), and socket_negotiate_ssl().


| unsigned int plug_get_host_open_port | ( | struct script_infos * | desc | ) |
Don't always return the first open port, otherwise we might get bitten by OSes doing active SYN flood countermeasures. Also, avoid returning 80 and 21 as open ports, as many transparent proxies are acting for these...
Definition at line 1323 of file plugutils.c.
References MAX_CANDIDATES, and plug_get_kb().
Referenced by get_host_open_port(), nasl_start_denial(), nasl_tcp_ping(), and nasl_tcp_v6_ping().


| char * plug_get_host_source | ( | struct script_infos * | args, |
| const char * | hostname ) |
Definition at line 343 of file plugutils.c.
References current_vhost, hostname, plug_get_host_fqdn(), and script_infos::vhosts.
Referenced by get_hostname_source().


| kb_t plug_get_kb | ( | struct script_infos * | args | ) |
Definition at line 1152 of file plugutils.c.
References script_infos::key.
Referenced by _http_req(), exec_nasl_script(), get_kb_list(), nasl_end_denial(), nasl_ssh_set_login(), nasl_ssh_userauth(), open_sock_tcp(), open_stream_connection_ext(), plug_get_host_open_port(), plug_get_port_transport(), plug_replace_key_len(), plug_set_key_len(), plug_set_key_len_volatile(), plugin_run_find_service(), and socket_negotiate_ssl().

| void * plug_get_key | ( | struct script_infos * | args, |
| char * | name, | ||
| int * | type, | ||
| size_t * | len, | ||
| int | single ) |
Get values from a kb under the given key name.
| [in] | args | The script infos where to get the kb from. |
| [in] | name | Key name to search in the kb. |
| [in/out] | type If 1 is given, the answer is forced to be KB_TYPE_INT type. Otherwise it returns the fetched type. | |
| [in] | len | Desired string length to be returned. |
| [in] | single | In case of a list, fetch only the last element |
Definition at line 1226 of file plugutils.c.
References script_infos::key, len, name, plug_fork_child(), plug_get_key_sigchld(), sig_n(), and script_infos::standalone.
Referenced by banner_grab(), get_kb_item(), get_ssh_port(), nasl_open_sock_kdc(), and plugin_do_run().


| int plug_get_port_transport | ( | struct script_infos * | args, |
| int | port ) |
Definition at line 1391 of file plugutils.c.
References OPENVAS_ENCAPS_IP, and plug_get_kb().
Referenced by get_port_transport(), and open_stream_auto_encaps_ext().


| void plug_replace_key | ( | struct script_infos * | args, |
| char * | name, | ||
| int | type, | ||
| void * | value ) |
Definition at line 1140 of file plugutils.c.
References name, and plug_replace_key_len().
Referenced by mark_acap_server(), mark_adsgone(), mark_exchg_routing_server(), mark_ftp_server(), mark_fw1(), mark_http_server(), mark_imap_server(), mark_linuxconf(), mark_locked_adsubtract_server(), mark_mon_server(), mark_ncacn_http_server(), mark_nntp_server(), mark_pop3pw_server(), mark_pop_server(), mark_psybnc(), mark_rmserver(), mark_shoutcast_server(), mark_smtp_server(), mark_snpp_server(), mark_unknown_svc(), mark_uucp_server(), mark_vnc_server(), mark_vtun_server(), mark_whois_plus2_server(), mark_zebra_server(), plugin_do_run(), register_service(), and replace_kb_item().


| void plug_replace_key_len | ( | struct script_infos * | args, |
| char * | name, | ||
| int | type, | ||
| void * | value, | ||
| size_t | len ) |
Definition at line 1113 of file plugutils.c.
References add_kb_usage(), ARG_INT, ARG_STRING, global_nasl_debug, len, name, and plug_get_kb().
Referenced by plug_replace_key(), and replace_kb_item().


| void plug_set_dep | ( | struct script_infos * | args, |
| const char * | depname ) |
Definition at line 104 of file plugutils.c.
References script_infos::nvti.
Referenced by script_dependencies().

| void plug_set_key | ( | struct script_infos * | args, |
| char * | name, | ||
| int | type, | ||
| const void * | value ) |
Definition at line 1055 of file plugutils.c.
References name, and plug_set_key_len().
Referenced by banner_grab(), host_add_port_proto(), mark_unknown_svc(), mark_wrapped_svc(), nasl_update_table_driven_lsc_data(), plug_set_port_transport(), plug_set_ssl_item(), plugin_do_run(), plugin_run_openvas_tcp_scanner(), plugin_run_synscan(), register_service(), scan(), set_kb_item(), and simple_register_host_detail().


| void plug_set_key_len | ( | struct script_infos * | args, |
| char * | name, | ||
| int | type, | ||
| const void * | value, | ||
| size_t | len ) |
Definition at line 1028 of file plugutils.c.
References add_kb_usage(), ARG_INT, ARG_STRING, global_nasl_debug, len, name, and plug_get_kb().
Referenced by plug_set_key(), and set_kb_item().


| void plug_set_key_len_volatile | ( | struct script_infos * | args, |
| char * | name, | ||
| int | type, | ||
| const void * | value, | ||
| int | expire, | ||
| size_t | len ) |
Set volatile key with expire.
| args | Script infos. |
| name | Key name. |
| type | Key type. |
| value | Key value. |
| expire | Key expire in seconds. |
| len | Len of value. |
Definition at line 1072 of file plugutils.c.
References ARG_INT, ARG_STRING, global_nasl_debug, len, name, and plug_get_kb().
Referenced by plug_set_key_volatile(), and set_kb_item_volatile().


| void plug_set_key_volatile | ( | struct script_infos * | args, |
| char * | name, | ||
| int | type, | ||
| const void * | value, | ||
| int | expire ) |
Set volatile key with expire.
| args | Script infos. |
| name | Key name. |
| type | Key type. |
| value | Key value. |
| expire | Key expire in seconds. |
Definition at line 1106 of file plugutils.c.
References name, and plug_set_key_len_volatile().
Referenced by set_kb_item_volatile().


| void plug_set_port_transport | ( | struct script_infos * | args, |
| int | port, | ||
| int | tr ) |
Definition at line 1378 of file plugutils.c.
References ARG_INT, and plug_set_key().
Referenced by open_stream_auto_encaps_ext(), and plugin_do_run().


| void plug_set_ssl_CA_file | ( | struct script_infos * | args, |
| char * | key ) |
Definition at line 1437 of file plugutils.c.
References plug_set_ssl_item().
Referenced by plugin_run_find_service().


| void plug_set_ssl_cert | ( | struct script_infos * | args, |
| char * | cert ) |
Definition at line 1415 of file plugutils.c.
References plug_set_ssl_item().
Referenced by plugin_run_find_service().


| void plug_set_ssl_key | ( | struct script_infos * | args, |
| char * | key ) |
Definition at line 1421 of file plugutils.c.
References plug_set_ssl_item().
Referenced by plugin_run_find_service().


| void plug_set_ssl_pem_password | ( | struct script_infos * | args, |
| char * | key ) |
Definition at line 1427 of file plugutils.c.
References plug_set_ssl_item().
Referenced by plugin_run_find_service().


| void post_alarm | ( | const char * | oid, |
| struct script_infos * | desc, | ||
| int | port, | ||
| const char * | action, | ||
| const char * | uri ) |
Definition at line 769 of file plugutils.c.
References oid, and proto_post_alarm().
Referenced by mark_fssniffer(), mark_netbus_server(), mark_sub7_server(), mark_wild_shell(), and security_message().


| void post_alarm_udp | ( | struct script_infos * | , |
| int | , | ||
| const char * | , | ||
| const char * | ) |
| void post_error | ( | const char * | oid, |
| struct script_infos * | desc, | ||
| int | port, | ||
| const char * | action, | ||
| const char * | uri ) |
Definition at line 813 of file plugutils.c.
References oid, and proto_post_error().
Referenced by error_message2().


| void post_log | ( | const char * | oid, |
| struct script_infos * | desc, | ||
| int | port, | ||
| const char * | action ) |
Post a log message about a tcp port.
Definition at line 789 of file plugutils.c.
References oid, and proto_post_log().
Referenced by mark_acap_server(), mark_adsgone(), mark_auth_server(), mark_avotus_mm_server(), mark_BitTorrent_server(), mark_chargen_server(), mark_citrix_server(), mark_cvslockserver(), mark_cvspserver(), mark_cvsupserver(), mark_dameware_server(), mark_dictd_server(), mark_direct_connect_hub(), mark_echo_server(), mark_eggdrop_server(), mark_ens_server(), mark_exchg_routing_server(), mark_finger_server(), mark_ftp_server(), mark_fw1(), mark_giop_server(), mark_gnocatan_server(), mark_gnome14_server(), mark_gnuserv(), mark_gopher_server(), mark_http_proxy(), mark_http_server(), mark_imap_server(), mark_interscan_viruswall(), mark_ircxpro_admin_server(), mark_iss_realsecure(), mark_jabber_server(), mark_linuxconf(), mark_LISa_server(), mark_listserv_server(), mark_locked_adsubtract_server(), mark_lpd_server(), mark_lyskom_server(), mark_mldonkey(), mark_mon_server(), mark_mongodb(), mark_msdtc_server(), mark_mysql(), mark_nagiosd_server(), mark_nntp_server(), mark_ofa_express_server(), mark_pblocald_server(), mark_pbmaster_server(), mark_ph_server(), mark_pnsclient(), mark_pop3pw_server(), mark_pop_server(), mark_postgresql(), mark_ppp_daemon(), mark_psybnc(), mark_quicktime_streaming_server(), mark_remote_nc_server(), mark_rmserver(), mark_rsync(), mark_shoutcast_server(), mark_smppd_server(), mark_smtp_server(), mark_smux_server(), mark_snpp_server(), mark_socks_proxy(), mark_spamd_server(), mark_sphinxql(), mark_ssh_server(), mark_stonegate_auth_server(), mark_tcpmux_server(), mark_teamspeak2_server(), mark_telnet_server(), mark_time_server(), mark_unknown_svc(), mark_upsmon_server(), mark_uucp_server(), mark_veritas_backup(), mark_vmware_auth(), mark_vtun_server(), mark_websm_server(), mark_whois_plus2_server(), mark_wrapped_svc(), mark_zebra_server(), and plugin_do_run().

| void post_log_with_uri | ( | const char * | oid, |
| struct script_infos * | desc, | ||
| int | port, | ||
| const char * | action, | ||
| const char * | uri ) |
Post a log message about a tcp port with a uri.
Definition at line 799 of file plugutils.c.
References oid, and proto_post_log().
Referenced by log_message().


| void proto_post_alarm | ( | const char * | oid, |
| struct script_infos * | desc, | ||
| int | port, | ||
| const char * | proto, | ||
| const char * | action, | ||
| const char * | uri ) |
Definition at line 762 of file plugutils.c.
References ALARM, oid, and proto_post_wrapped().
Referenced by post_alarm(), and security_message().


| void proto_post_error | ( | const char * | oid, |
| struct script_infos * | desc, | ||
| int | port, | ||
| const char * | proto, | ||
| const char * | action, | ||
| const char * | uri ) |
Definition at line 806 of file plugutils.c.
References ERRMSG, oid, and proto_post_wrapped().
Referenced by error_message2(), and post_error().


| void proto_post_log | ( | const char * | oid, |
| struct script_infos * | desc, | ||
| int | port, | ||
| const char * | proto, | ||
| const char * | action, | ||
| const char * | uri ) |
Post a log message.
Definition at line 779 of file plugutils.c.
References LOG, oid, and proto_post_wrapped().
Referenced by log_message(), post_log(), and post_log_with_uri().


| void scanner_add_port | ( | struct script_infos * | args, |
| int | port, | ||
| char * | proto ) |
Definition at line 1146 of file plugutils.c.
References host_add_port_proto().
Referenced by banner_grab(), nasl_scanner_add_port(), sendpacket(), and v6_sendpacket().

