mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
2010-05-17 Miguel de Dios <miguel.dedios@artica.es>
* include/javascript/pandora_modules.js, godmode/agentes/module_manager_editor.php: fixed the snmp_walk for version 2, 2c and 3. Need more test for version 3. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2740 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
5e9d2802f9
commit
d53235091b
@ -1,3 +1,9 @@
|
|||||||
|
2010-05-17 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/javascript/pandora_modules.js,
|
||||||
|
godmode/agentes/module_manager_editor.php: fixed the snmp_walk for version
|
||||||
|
2, 2c and 3. Need more test for version 3.
|
||||||
|
|
||||||
2010-05-17 Miguel de Dios <miguel.dedios@artica.es>
|
2010-05-17 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* include/javascript/pandora.js,
|
* include/javascript/pandora.js,
|
||||||
|
@ -73,9 +73,32 @@ if (is_ajax ()) {
|
|||||||
if ($snmp_walk) {
|
if ($snmp_walk) {
|
||||||
$ip_target = (string) get_parameter ('ip_target');
|
$ip_target = (string) get_parameter ('ip_target');
|
||||||
$snmp_community = (string) get_parameter ('snmp_community');
|
$snmp_community = (string) get_parameter ('snmp_community');
|
||||||
|
$snmp_version = get_parameter('snmp_version');
|
||||||
|
$snmp3_auth_user = get_parameter('snmp3_auth_user');
|
||||||
|
$snmp3_security_level = get_parameter('snmp3_security_level');
|
||||||
|
$snmp3_auth_method = get_parameter('snmp3_auth_method');
|
||||||
|
$snmp3_auth_pass = get_parameter('snmp3_auth_pass');
|
||||||
|
$snmp3_privacy_method = get_parameter('snmp3_privacy_method');
|
||||||
|
$snmp3_privacy_pass = get_parameter('snmp3_privacy_pass');
|
||||||
|
|
||||||
snmp_set_quick_print (1);
|
snmp_set_quick_print (1);
|
||||||
$snmpwalk = @snmprealwalk ($ip_target, $snmp_community, NULL);
|
|
||||||
|
switch ($snmp_version) {
|
||||||
|
case '3':
|
||||||
|
$snmpwalk = @snmp3_real_walk ($ip_target, $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;
|
||||||
|
}
|
||||||
|
|
||||||
if ($snmpwalk === false) {
|
if ($snmpwalk === false) {
|
||||||
echo json_encode ($snmpwalk);
|
echo json_encode ($snmpwalk);
|
||||||
return;
|
return;
|
||||||
|
@ -196,7 +196,14 @@ function configure_modules_form () {
|
|||||||
{"page" : "godmode/agentes/module_manager_editor",
|
{"page" : "godmode/agentes/module_manager_editor",
|
||||||
"snmp_walk" : 1,
|
"snmp_walk" : 1,
|
||||||
"ip_target" : $("#text-ip_target").fieldValue (),
|
"ip_target" : $("#text-ip_target").fieldValue (),
|
||||||
"snmp_community" : $("#text-snmp_community").fieldValue ()
|
"snmp_community" : $("#text-snmp_community").fieldValue (),
|
||||||
|
"snmp_version": $('#snmp_version').val(),
|
||||||
|
"snmp3_auth_user": $('input[name=snmp3_auth_user]').val(),
|
||||||
|
"snmp3_security_level": $('#snmp3_security_level').val(),
|
||||||
|
"snmp3_auth_method": $('snmp3_auth_method').val(),
|
||||||
|
"snmp3_auth_pass": $('input[name=snmp3_auth_pass]').val(),
|
||||||
|
"snmp3_privacy_method": $('snmp3_privacy_method').val(),
|
||||||
|
"snmp3_privacy_pass": $('input[name=snmp3_privacy_pass]').val()
|
||||||
},
|
},
|
||||||
function (data, status) {
|
function (data, status) {
|
||||||
if (data == false) {
|
if (data == false) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user