"; system("/usr/local/bin/nmap" . $nmap_options); } function nmap_get_interfaces() { global $config; $interfaces = get_configured_interface_with_descr(); $nmap_ifs = array(array("name" => "Any", "value" => "")); foreach ($interfaces as $iface => $ifacename) { $tmp["name"] = $ifacename; $tmp["value"] = $iface; $nmap_ifs[] = $tmp; } foreach (array('server', 'client') as $mode) { if (is_array($config['openvpn']["openvpn-{$mode}"])) { foreach ($config['openvpn']["openvpn-{$mode}"] as $id => $setting) { if (!isset($setting['disable'])) { $tmp["name"] = gettext("OpenVPN") . " ".$mode.": ".htmlspecialchars($setting['description']); $tmp["value"] = 'ovpn' . substr($mode, 0, 1) . $setting['vpnid']; $nmap_ifs[] = $tmp; } } } } return $nmap_ifs; } ?>