Fixed problems with snmpwalks, when server have mibs text in hexadeximal-string. Tiquet: #2288
This commit is contained in:
parent
58115b8296
commit
127daf8fdc
|
@ -1501,7 +1501,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) .
|
||||
|
@ -1512,7 +1512,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) .
|
||||
|
@ -1521,7 +1521,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) .
|
||||
|
@ -1538,7 +1538,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue