$cmd = '/usr/sbin/arp -n ' . $addr; $ret = false; exec($cmd, $out, $ret); if ($ret) { log_error('The command `' . $cmd . '\' failed to execute'); } else { $mac = explode(' ', $out[0]); if (isset($mac[3])) { $ret = $mac[3]; } } return $ret; } /* find MAC address for client */ if ($macfilter || $passthrumac) { $tmpres = ip_to_mac($clientip); if (!$tmpres) { /* unable to find MAC address - shouldn't happen! - bail out */ captiveportal_logportalauth("unauthenticated", "noclientmac", $clientip, "ERROR"); echo "An error occurred. Please check the system logs for more information."; log_error("Zone: {$cpzone} - Captive portal could not determine client's MAC address. Disable MAC address filtering in captive portal if you do not need this functionality."); ob_flush(); return; } $clientmac = $tmpres; unset($tmpres); } /* find out if we need RADIUS + RADIUSMAC or not */ if (file_exists("/var/db/captiveportal_radius_{$cpzone}.db")) { $radius_enable = true; if (isset($cpcfg['radmac_enable'])) {
exit; } if (isset($_GET["all-status"])) { GLOBAL_STATUS(); exit; } if (isset($_GET["procstat"])) { procstat(); exit; } if (isset($_GET["nic-infos"])) { TCP_NIC_INFOS(); exit; } if (isset($_GET["ip-to-mac"])) { ip_to_mac(); exit; } if (isset($_GET["arp-ip"])) { arp_and_ip(); exit; } if (isset($_GET["hostToMac"])) { hostToMac(); exit; } if (isset($_GET["browse-computers-import-list"])) { import_computer_from_list(); exit; } if (isset($_GET["refresh-status"])) {
if(isset($_GET["ifconfig-all"])){ifconfig_all();exit;} if(isset($_GET["ifconfig-all-ips"])){ifconfig_all_ips();exit;} if(isset($_GET["resolv-conf"])){resolv_conf();exit;} if(isset($_GET["myos"])){MyOs();exit;} if(isset($_GET["lspci"])){lspci();exit;} if(isset($_GET["freemem"])){freemem();exit;} if(isset($_GET["dfmoinsh"])){dfmoinsh();exit;} if(isset($_GET["printenv"])){printenv();exit;} if(isset($_GET["GenerateCert"])){GenerateCert();exit;} if(isset($_GET["all-status"])){GLOBAL_STATUS();exit;} if(isset($_GET["procstat"])){procstat();exit;} if(isset($_GET["nic-infos"])){TCP_NIC_INFOS();exit;} if(isset($_GET["ip-to-mac"])){ip_to_mac();exit;} if(isset($_GET["arp-ip"])){arp_and_ip();exit;} if(isset($_GET["hostToMac"])){hostToMac();exit;} if(isset($_GET["browse-computers-import-list"])){import_computer_from_list();exit;} if(isset($_GET["refresh-status"])){RefreshStatus();exit;} if(isset($_GET["SpamassassinReload"])){reloadSpamAssassin();exit;} if(isset($_GET["SpamAssassin-Reload"])){reloadSpamAssassin();exit;} if(isset($_GET["spamass-check"])){spamassassin_check();exit;} if(isset($_GET["spamass-trust-nets"])){spamassassin_trust_networks();exit;} if(isset($_GET["SpamAssDBVer"])){SpamAssDBVer();exit;} if(isset($_GET["spamass-build"])){spamassassin_rebuild();exit;}