Fixed problems with snmpwalks, when server have mibs text in hexadeximal-string. Tiquet: #2288

(cherry picked from commit 127daf8fdc)
This commit is contained in:
m-lopez-f 2015-06-01 15:23:08 +02:00
parent 589f054928
commit 988228a90a
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}