Merge branch '1534-No-se-inicializan-módulos-SNMPv3-con-caracteres-especiales-dev' into 'develop'
Fixed password entities in snmp walk See merge request artica/pandorafms!1014
This commit is contained in:
commit
bbecd1af09
|
@ -35,12 +35,12 @@ $use_agent = get_parameter ('use_agent');
|
||||||
$snmp_community = (string) get_parameter ('snmp_community', 'public');
|
$snmp_community = (string) get_parameter ('snmp_community', 'public');
|
||||||
$snmp_version = get_parameter('snmp_version', '1');
|
$snmp_version = get_parameter('snmp_version', '1');
|
||||||
$server_to_exec = get_parameter('server_to_exec', 0);
|
$server_to_exec = get_parameter('server_to_exec', 0);
|
||||||
$snmp3_auth_user = get_parameter('snmp3_auth_user');
|
$snmp3_auth_user = io_safe_output(get_parameter('snmp3_auth_user'));
|
||||||
$snmp3_security_level = get_parameter('snmp3_security_level');
|
$snmp3_security_level = get_parameter('snmp3_security_level');
|
||||||
$snmp3_auth_method = get_parameter('snmp3_auth_method');
|
$snmp3_auth_method = get_parameter('snmp3_auth_method');
|
||||||
$snmp3_auth_pass = get_parameter('snmp3_auth_pass');
|
$snmp3_auth_pass = io_safe_output(get_parameter('snmp3_auth_pass'));
|
||||||
$snmp3_privacy_method = get_parameter('snmp3_privacy_method');
|
$snmp3_privacy_method = get_parameter('snmp3_privacy_method');
|
||||||
$snmp3_privacy_pass = get_parameter('snmp3_privacy_pass');
|
$snmp3_privacy_pass = io_safe_output(get_parameter('snmp3_privacy_pass'));
|
||||||
$tcp_port = (string) get_parameter ('tcp_port');
|
$tcp_port = (string) get_parameter ('tcp_port');
|
||||||
|
|
||||||
//See if id_agente is set (either POST or GET, otherwise -1
|
//See if id_agente is set (either POST or GET, otherwise -1
|
||||||
|
|
|
@ -32,12 +32,12 @@ $use_agent = get_parameter ('use_agent');
|
||||||
$snmp_community = (string) get_parameter ('snmp_community', 'public');
|
$snmp_community = (string) get_parameter ('snmp_community', 'public');
|
||||||
$server_to_exec = get_parameter('server_to_exec', 0);
|
$server_to_exec = get_parameter('server_to_exec', 0);
|
||||||
$snmp_version = get_parameter('snmp_version', '1');
|
$snmp_version = get_parameter('snmp_version', '1');
|
||||||
$snmp3_auth_user = get_parameter('snmp3_auth_user');
|
$snmp3_auth_user = io_safe_output(get_parameter('snmp3_auth_user'));
|
||||||
$snmp3_security_level = get_parameter('snmp3_security_level');
|
$snmp3_security_level = get_parameter('snmp3_security_level');
|
||||||
$snmp3_auth_method = get_parameter('snmp3_auth_method');
|
$snmp3_auth_method = get_parameter('snmp3_auth_method');
|
||||||
$snmp3_auth_pass = get_parameter('snmp3_auth_pass');
|
$snmp3_auth_pass = io_safe_output(get_parameter('snmp3_auth_pass'));
|
||||||
$snmp3_privacy_method = get_parameter('snmp3_privacy_method');
|
$snmp3_privacy_method = get_parameter('snmp3_privacy_method');
|
||||||
$snmp3_privacy_pass = get_parameter('snmp3_privacy_pass');
|
$snmp3_privacy_pass = io_safe_output(get_parameter('snmp3_privacy_pass'));
|
||||||
$tcp_port = (string) get_parameter ('tcp_port');
|
$tcp_port = (string) get_parameter ('tcp_port');
|
||||||
|
|
||||||
//See if id_agente is set (either POST or GET, otherwise -1
|
//See if id_agente is set (either POST or GET, otherwise -1
|
||||||
|
|
|
@ -111,12 +111,12 @@ if (is_ajax ()) {
|
||||||
else
|
else
|
||||||
$snmp_community = (string) get_parameter ('snmp_community');
|
$snmp_community = (string) get_parameter ('snmp_community');
|
||||||
$snmp_version = get_parameter('snmp_version');
|
$snmp_version = get_parameter('snmp_version');
|
||||||
$snmp3_auth_user = get_parameter('snmp3_auth_user');
|
$snmp3_auth_user = io_safe_output(get_parameter('snmp3_auth_user'));
|
||||||
$snmp3_security_level = get_parameter('snmp3_security_level');
|
$snmp3_security_level = get_parameter('snmp3_security_level');
|
||||||
$snmp3_auth_method = get_parameter('snmp3_auth_method');
|
$snmp3_auth_method = get_parameter('snmp3_auth_method');
|
||||||
$snmp3_auth_pass = get_parameter('snmp3_auth_pass');
|
$snmp3_auth_pass = io_safe_output(get_parameter('snmp3_auth_pass'));
|
||||||
$snmp3_privacy_method = get_parameter('snmp3_privacy_method');
|
$snmp3_privacy_method = get_parameter('snmp3_privacy_method');
|
||||||
$snmp3_privacy_pass = get_parameter('snmp3_privacy_pass');
|
$snmp3_privacy_pass = io_safe_output(get_parameter('snmp3_privacy_pass'));
|
||||||
$snmp_port = get_parameter('snmp_port');
|
$snmp_port = get_parameter('snmp_port');
|
||||||
|
|
||||||
$snmpwalk = get_snmpwalk($ip_target, $snmp_version, $snmp_community,
|
$snmpwalk = get_snmpwalk($ip_target, $snmp_version, $snmp_community,
|
||||||
|
|
|
@ -398,12 +398,12 @@ function snmpBrowserWindow () {
|
||||||
$('#text-target_ip').val($('#text-ip_target').val());
|
$('#text-target_ip').val($('#text-ip_target').val());
|
||||||
$('#text-community').val($('#text-snmp_community').val());
|
$('#text-community').val($('#text-snmp_community').val());
|
||||||
$('#snmp_browser_version').val($('#snmp_version').val());
|
$('#snmp_browser_version').val($('#snmp_version').val());
|
||||||
$('#snmp3_browser_auth_user').val($('#snmp3_auth_user').val());
|
$('#text-snmp3_browser_auth_user').val($('#text-snmp3_auth_user').val());
|
||||||
$('#snmp3_browser_security_level').val($('#snmp3_security_level').val());
|
$('#snmp3_browser_security_level').val($('#snmp3_security_level').val());
|
||||||
$('#snmp3_browser_auth_method').val($('#snmp3_auth_method').val());
|
$('#snmp3_browser_auth_method').val($('#snmp3_auth_method').val());
|
||||||
$('#snmp3_browser_auth_pass').val($('#snmp3_auth_pass').val());
|
$('#password-snmp3_browser_auth_pass').val($('#password-snmp3_auth_pass').val());
|
||||||
$('#snmp3_browser_privacy_method').val($('#snmp3_privacy_method').val());
|
$('#snmp3_browser_privacy_method').val($('#snmp3_privacy_method').val());
|
||||||
$('#snmp3_browser_privacy_pass').val($('#snmp3_privacy_pass').val());
|
$('#password-snmp3_browser_privacy_pass').val($('#password-snmp3_privacy_pass').val());
|
||||||
|
|
||||||
$("#snmp_browser_container").show().dialog ({
|
$("#snmp_browser_container").show().dialog ({
|
||||||
title: '',
|
title: '',
|
||||||
|
|
|
@ -129,7 +129,7 @@ else {
|
||||||
}
|
}
|
||||||
|
|
||||||
$snmp_version = (string) get_parameter('snmp_version');
|
$snmp_version = (string) get_parameter('snmp_version');
|
||||||
$snmp3_auth_user = (string) get_parameter('snmp3_auth_user');
|
$snmp3_auth_user = (string) io_safe_output(get_parameter('snmp3_auth_user'));
|
||||||
$snmp3_auth_pass = io_input_password((string) get_parameter('snmp3_auth_pass'));
|
$snmp3_auth_pass = io_input_password((string) get_parameter('snmp3_auth_pass'));
|
||||||
$snmp3_auth_method = (string) get_parameter('snmp3_auth_method');
|
$snmp3_auth_method = (string) get_parameter('snmp3_auth_method');
|
||||||
$snmp3_privacy_method = (string) get_parameter('snmp3_privacy_method');
|
$snmp3_privacy_method = (string) get_parameter('snmp3_privacy_method');
|
||||||
|
|
|
@ -25,12 +25,12 @@ if(is_ajax()){
|
||||||
$target_ip = (string) get_parameter ("target_ip", '');
|
$target_ip = (string) get_parameter ("target_ip", '');
|
||||||
$community = (string) get_parameter ("community", '');
|
$community = (string) get_parameter ("community", '');
|
||||||
$snmp_version = (string) get_parameter ("snmp_browser_version", '');
|
$snmp_version = (string) get_parameter ("snmp_browser_version", '');
|
||||||
$snmp3_auth_user = get_parameter('snmp3_browser_auth_user');
|
$snmp3_auth_user = io_safe_output(get_parameter('snmp3_browser_auth_user'));
|
||||||
$snmp3_security_level = get_parameter('snmp3_browser_security_level');
|
$snmp3_security_level = get_parameter('snmp3_browser_security_level');
|
||||||
$snmp3_auth_method = get_parameter('snmp3_browser_auth_method');
|
$snmp3_auth_method = get_parameter('snmp3_browser_auth_method');
|
||||||
$snmp3_auth_pass = get_parameter('snmp3_browser_auth_pass');
|
$snmp3_auth_pass = io_safe_output(get_parameter('snmp3_browser_auth_pass'));
|
||||||
$snmp3_privacy_method = get_parameter('snmp3_browser_privacy_method');
|
$snmp3_privacy_method = get_parameter('snmp3_browser_privacy_method');
|
||||||
$snmp3_privacy_pass = get_parameter('snmp3_browser_privacy_pass');
|
$snmp3_privacy_pass = io_safe_output(get_parameter('snmp3_browser_privacy_pass'));
|
||||||
|
|
||||||
$targets_oids = get_parameter ("oids", "");
|
$targets_oids = get_parameter ("oids", "");
|
||||||
$targets_oids = explode(",", $targets_oids);
|
$targets_oids = explode(",", $targets_oids);
|
||||||
|
|
|
@ -29,25 +29,25 @@ function snmpBrowse () {
|
||||||
var ajax_url = $('#hidden-ajax_url').val();
|
var ajax_url = $('#hidden-ajax_url').val();
|
||||||
|
|
||||||
// Prepare the AJAX call
|
// Prepare the AJAX call
|
||||||
var params = [
|
|
||||||
"target_ip=" + target_ip,
|
var params = {};
|
||||||
"community=" + community,
|
params["target_ip"] = target_ip;
|
||||||
"starting_oid=" + starting_oid,
|
params["community"] = community;
|
||||||
"snmp_browser_version=" + snmp_version,
|
params["starting_oid"] = starting_oid;
|
||||||
"server_to_exec=" + server_to_exec,
|
params["snmp_browser_version"] = snmp_version;
|
||||||
"snmp3_browser_auth_user=" + snmp3_auth_user,
|
params["server_to_exec"] = server_to_exec;
|
||||||
"snmp3_browser_security_level=" + snmp3_security_level,
|
params["snmp3_browser_auth_user"] = snmp3_auth_user;
|
||||||
"snmp3_browser_auth_method=" + snmp3_auth_method,
|
params["snmp3_browser_security_level"] = snmp3_security_level;
|
||||||
"snmp3_browser_auth_pass=" + snmp3_auth_pass,
|
params["snmp3_browser_auth_method"] = snmp3_auth_method;
|
||||||
"snmp3_browser_privacy_method=" + snmp3_privacy_method,
|
params["snmp3_browser_auth_pass"] = snmp3_auth_pass;
|
||||||
"snmp3_browser_privacy_pass=" + snmp3_privacy_pass,
|
params["snmp3_browser_privacy_method"] = snmp3_privacy_method;
|
||||||
"action=" + "snmptree",
|
params["snmp3_browser_privacy_pass"] = snmp3_privacy_pass;
|
||||||
"page=operation/snmpconsole/snmp_browser"
|
params["action"] = "snmptree";
|
||||||
];
|
params["page"] = "operation/snmpconsole/snmp_browser";
|
||||||
|
|
||||||
// Browse!
|
// Browse!
|
||||||
jQuery.ajax ({
|
jQuery.ajax ({
|
||||||
data: params.join ("&"),
|
data: params,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: action= ajax_url,
|
url: action= ajax_url,
|
||||||
async: true,
|
async: true,
|
||||||
|
|
|
@ -28,12 +28,12 @@ if (is_ajax()) {
|
||||||
$community = (string) get_parameter ("community", '');
|
$community = (string) get_parameter ("community", '');
|
||||||
$snmp_version = (string) get_parameter ("snmp_browser_version", '');
|
$snmp_version = (string) get_parameter ("snmp_browser_version", '');
|
||||||
$server_to_exec = (int) get_parameter ("server_to_exec", 0);
|
$server_to_exec = (int) get_parameter ("server_to_exec", 0);
|
||||||
$snmp3_auth_user = get_parameter('snmp3_browser_auth_user');
|
$snmp3_auth_user = io_safe_output(get_parameter('snmp3_browser_auth_user'));
|
||||||
$snmp3_security_level = get_parameter('snmp3_browser_security_level');
|
$snmp3_security_level = get_parameter('snmp3_browser_security_level');
|
||||||
$snmp3_auth_method = get_parameter('snmp3_browser_auth_method');
|
$snmp3_auth_method = get_parameter('snmp3_browser_auth_method');
|
||||||
$snmp3_auth_pass = get_parameter('snmp3_browser_auth_pass');
|
$snmp3_auth_pass = io_safe_output(get_parameter('snmp3_browser_auth_pass'));
|
||||||
$snmp3_privacy_method = get_parameter('snmp3_browser_privacy_method');
|
$snmp3_privacy_method = get_parameter('snmp3_browser_privacy_method');
|
||||||
$snmp3_privacy_pass = get_parameter('snmp3_browser_privacy_pass');
|
$snmp3_privacy_pass = io_safe_output(get_parameter('snmp3_browser_privacy_pass'));
|
||||||
|
|
||||||
// SNMP browser
|
// SNMP browser
|
||||||
if ($action == "snmptree") {
|
if ($action == "snmptree") {
|
||||||
|
|
Loading…
Reference in New Issue