'.__('Traceroute to ').$ip.''; echo '
'; echo system($traceroute.' '.$ip); echo ''; } break; case 2: $ping = whereis_the_command('ping'); if (empty($ping)) { ui_print_error_message(__('Ping executable does not exist.')); } else { echo '
'; echo system($ping.' -c 5 '.$ip); echo ''; } break; case 4: $nmap = whereis_the_command('nmap'); if (empty($nmap)) { ui_print_error_message(__('Nmap executable does not exist.')); } else { echo '
'; echo system($nmap.' -F '.$ip); echo ''; } break; case 5: echo '
'; echo system('dig '.$ip); echo ''; } $whois = whereis_the_command('whois'); if (empty($whois)) { ui_print_error_message(__('Whois executable does not exist.')); } else { echo '
'; echo system('whois '.$ip); echo ''; } break; case 3: $snmp_obj = [ 'ip_target' => $ip, 'snmp_version' => $snmp_version, 'snmp_community' => $community, 'format' => '-Oqn', ]; $snmp_obj['base_oid'] = '.1.3.6.1.2.1.1.3.0'; $result = get_h_snmpwalk($snmp_obj); echo '
'; if (empty($result)) { ui_print_error_message(__('Target unreachable.')); break; } else { echo array_pop($result); } echo ''; echo '
'; $snmp_obj['base_oid'] = '.1.3.6.1.2.1.1.1.0'; $result = get_h_snmpwalk($snmp_obj); if (empty($result)) { ui_print_error_message(__('Target unreachable.')); break; } else { echo array_pop($result); } echo ''; echo '