. * * Version 0.1 * Author: Daniel Larraz */ include_once $API_core.'conf_file.php'; include_once $base_plugin.'php/paths.php'; //------------------------------------------------------------------------------------------- function make_security ($iface) /* ------------------------------------------------------------------------ */ { global $paths; /*$list ='
';*/ if ( !file_exists($paths['hostapd_conf_dir']) ) { exec ("sudo mkdir -p ".$paths['hostapd_conf_dir']); } $security = load_conf_file ($paths['security']); if ( empty($security) ) { $security = array ( 'ath0' => array ('protocol' => 'none'), 'ath1' => array ('protocol' => 'none') ); save_conf_file ($paths['security'], $security); } //print_r ($security); $list .= make_protocol_panel ($iface, $security); return $list; } /* ------------------------------------------------------------------------ */ function make_protocol_panel ($iface, $security) /* ------------------------------------------------------------------------ */ { $list = '
Security
Protocol:
'; $list .= make_wep_panel ($iface, $security); $list .= make_wpa_panel ($iface, $security); $list .= '
'; return $list; } /* ------------------------------------------------------------------------ */ function make_wep_panel ($iface, $security) /* ------------------------------------------------------------------------ */ { $list = '
WEP
Key size:
Password: '; } $list .= '
'; return $list; } /* ------------------------------------------------------------------------ */ function make_remote_connection_panel ($iface, $security) /* ------------------------------------------------------------------------ */ { $list = '
Remote
IP address: