The agent hasn't got IP"; return; } echo "
"; echo system ("/usr/sbin/traceroute $ip"); echo ""; } break; case 2: ob_start(); system('whereis ping'); $output = ob_get_clean(); $result = explode(':', $output); $result = trim($result[1]); if (empty($result)) { ui_print_error_message(__('Ping executable does not exist.')); } else { echo "
"; echo system ("ping -c 5 $ip"); echo ""; } break; case 4: ob_start(); system('whereis nmap'); $output = ob_get_clean(); $result = explode(':', $output); $result = trim($result[1]); if (empty($result)) { 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 ""; } ob_start(); system('whereis whois'); $output = ob_get_clean(); $result = explode(':', $output); $result = trim($result[1]); if (empty($result)) { ui_print_error_message(__('Whois executable does not exist.')); } else { echo "
"; echo system ("whois $ip"); echo ""; } break; case 3: echo "
"; echo exec ("snmpget -Ounv -v1 -c $community $ip .1.3.6.1.2.1.1.3.0 "); echo ""; echo "
"; echo system ("snmpget -Ounv -v1 -c $community $ip .1.3.6.1.2.1.1.1.0 "); echo ""; echo "
".__("Interface"); echo " | ".__("Status"); $int_max = exec ("snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.1.0 "); for ($ax=0; $ax < $int_max; $ax++){ $interface = exec ("snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.2.1.2.$ax "); $estado = exec ("snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.2.1.8.$ax "); echo " |
---|---|
$interface | $estado"; } echo " |