From 988228a90a54af049f2074713b43d361f10f4f45 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 1 Jun 2015 15:23:08 +0200 Subject: [PATCH] Fixed problems with snmpwalks, when server have mibs text in hexadeximal-string. Tiquet: #2288 (cherry picked from commit 127daf8fdc387c8fb0267d22c3e9dd6cd28f7fe6) --- pandora_console/include/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 097ecc67a1..6f99ce8782 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -1497,7 +1497,7 @@ function get_snmpwalk($ip_target, $snmp_version, $snmp_community = '', switch ($snmp3_security_level) { case "authNoPriv": $command_str = $snmpwalk_bin . - ' -m ALL -v 3' . + ' -m ALL -Oa -v 3' . ' -u ' . escapeshellarg($snmp3_auth_user) . ' -A ' . escapeshellarg($snmp3_auth_pass) . ' -l ' . escapeshellarg($snmp3_security_level) . @@ -1508,7 +1508,7 @@ function get_snmpwalk($ip_target, $snmp_version, $snmp_community = '', break; case "noAuthNoPriv": $command_str = $snmpwalk_bin . - ' -m ALL -v 3' . + ' -m ALL -Oa -v 3' . ' -u ' . escapeshellarg($snmp3_auth_user) . ' -l ' . escapeshellarg($snmp3_security_level) . ' ' . escapeshellarg($ip_target) . @@ -1517,7 +1517,7 @@ function get_snmpwalk($ip_target, $snmp_version, $snmp_community = '', break; default: $command_str = $snmpwalk_bin . - ' -m ALL -v 3' . + ' -m ALL -Oa -v 3' . ' -u ' . escapeshellarg($snmp3_auth_user) . ' -A ' . escapeshellarg($snmp3_auth_pass) . ' -l ' . escapeshellarg($snmp3_security_level) . @@ -1534,7 +1534,7 @@ function get_snmpwalk($ip_target, $snmp_version, $snmp_community = '', case '2c': case '1': default: - $command_str = $snmpwalk_bin . ' -m ALL -v ' . escapeshellarg($snmp_version) . ' -c ' . escapeshellarg($snmp_community) . ' ' . escapeshellarg($ip_target) . ' ' . $base_oid . ' 2> ' . $error_redir_dir; + $command_str = $snmpwalk_bin . ' -m ALL -Oa -v ' . escapeshellarg($snmp_version) . ' -c ' . escapeshellarg($snmp_community) . ' ' . escapeshellarg($ip_target) . ' ' . $base_oid . ' 2> ' . $error_redir_dir; break; }