diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index be73436361..e2922948c4 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2010-08-11 Sergio Martin + + * godmode/agentes/module_manager_editor.php: Changed the old way of + get a snmpwalk to use the new function get_snmpwalk + 2010-08-11 Sergio Martin * include/functions.php: Changed the newst function added name diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index 75955c3c26..dc2bceae1e 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -81,24 +81,10 @@ if (is_ajax ()) { $snmp3_privacy_method = get_parameter('snmp3_privacy_method'); $snmp3_privacy_pass = get_parameter('snmp3_privacy_pass'); - snmp_set_quick_print (1); - - switch ($snmp_version) { - case '3': - $snmpwalk = @snmp3_real_walk ($ip_target, $snmp3_auth_user, + $snmpwalk = get_snmpwalk($ip_target, $snmp_version, $snmp_community, $snmp3_auth_user, $snmp3_security_level, $snmp3_auth_method, $snmp3_auth_pass, - $snmp3_privacy_method, $snmp3_privacy_pass, null); - break; - case '2': - case '2c': - $snmpwalk = @snmp2_real_walk ($ip_target, $snmp_community, NULL); - break; - case '1': - default: - $snmpwalk = @snmprealwalk ($ip_target, $snmp_community, NULL); - break; - } - + $snmp3_privacy_method, $snmp3_privacy_pass, 1); + if ($snmpwalk === false) { echo json_encode ($snmpwalk); return;