$arguments) { add_submenu_page($parent, $arguments['page_title'], $arguments['menu_title'], $capability, wtsec_getRoute($page), $arguments['function']); } add_submenu_page(null, WTSEC_LIBRARY_Localization::lmsg('sign_in'), WTSEC_LIBRARY_Localization::lmsg('sign_in'), 'manage_options', wtsec_getRoute('login'), 'wtsec_login'); add_submenu_page($parent, WTSEC_LIBRARY_Localization::lmsg('logout'), WTSEC_LIBRARY_Localization::lmsg('logout'), 'manage_options', wtsec_getRoute('logout'), 'wtsec_logout'); } else { $capability = 'manage_options'; foreach (wtsec_pages() as $page => $arguments) { add_submenu_page(null, $arguments['page_title'], $arguments['menu_title'], $capability, wtsec_getRoute($page), function () { wp_safe_redirect(wtsec_getUrl('login')); }); } add_submenu_page($parent, WTSEC_LIBRARY_Localization::lmsg('sign_in'), WTSEC_LIBRARY_Localization::lmsg('sign_in'), 'manage_options', wtsec_getRoute('login'), 'wtsec_login'); add_submenu_page(null, WTSEC_LIBRARY_Localization::lmsg('logout'), WTSEC_LIBRARY_Localization::lmsg('logout'), 'manage_options', wtsec_getRoute('logout'), 'wtsec_logout'); } } function dd($vl) { echo '
';
    print_r($vl);
    echo '
'; die(); } function myGrading($score) { if ($score < 0 || $score > 100) return ['grade' => '','color' => '']; $scores = [100 => 'A+', 90 => 'A', 80 => 'A-', 70 => 'B+', 60 => 'B', 50 => 'B-', 35 => 'C+', 20 => 'C', 0 => 'C-' ]; foreach ($scores as $key => $value){ if($score >= $key){ $grade = $value; break; } } $color = ($score >= 80) ? 'green' : ($score >= 50) ? 'orange' : 'red'; return ['grade' => $grade,'color' => $color]; } function convertTimeToReadable($date) { $lang = get_locale(); //enable russian language if ($lang === "ru_RU") { $lang .= ".UTF-8"; setlocale(LC_ALL, $lang); } if(strpos($date, ".") !== false){ $date = substr($date, 0, strpos($date, ".")); } return strftime("%B %e, %Y / %R", strtotime($date." UTC")); } function convertToCurrentTime($date) { $lang = get_locale(); //enable russian language if ($lang === "ru_RU") { $lang .= ".UTF-8"; setlocale(LC_ALL, $lang); } if(strpos($date, ".") !== false){ $date = substr($date, 0, strpos($date, ".")); } $date .= " UTC"; $current_time = strtotime($date); return ['date' => date("Y-m-d", $current_time),'time' => date("H:i:s",$current_time)]; } function wtsec_index_page() { $host = WTSEC_LIBRARY_WT::getOwnSite(); $services = []; if (!empty($host)) { $services = [ "settings" => [ "token" => WTSEC_LIBRARY_App::getToken(), "site_id" => $host['id'], ], "score" => [ "total_score" => 0, "tested_on" => "", "server_ip" => "", "location" => "", "description" => wtsec_locale("score.description"), "information" => "", "grade" => "", ], ]; $score = json_decode(WTSEC_LIBRARY_WT::getScore(), true); if (!empty($score)) { $total_score = round($score['totalScore']); $my_grading = myGrading($total_score); $services["score"] = [ "total_score" => $total_score."%", "tested_on" => convertTimeToReadable($score['date']), "server_ip" => $score['ip'], "location" => $score['country'], "description" => wtsec_locale("score.description"), "information" => wtsec_locale("score.higher_than_percent", ['percent' => $score['ishigherthan']]), "grade" => $my_grading['grade'], "color" => $my_grading['color'], ]; } $checks = WTSEC_LIBRARY_WT::getAllChecks($host['id']); foreach ($checks as $service => $site) { if (empty($site) || !is_array($site)) { continue; } switch ($service) { case "availability": $services["wa"] = [ // "pause" => wtsec_getStatusStartPauseIcon($site['config']['isActive'], $site['config']['id'], $host['id']), "pause" => "", "status" => WTSEC_LIBRARY_WT::getStatusIcon($site['status']), "response_time" => ceil($site['responseTime'] / 1000000) . ' ' . WTSEC_LIBRARY_Localization::lmsg('ms'), "availability" => $site['percent'] . '%', "availability_percent" => $site['percent'], "last_test" => convertTimeToReadable($site['lastTest']['time']), "downtime" => ceil($site['downTime'] / 1000000) . ' ' . WTSEC_LIBRARY_Localization::lmsg('ms'), "description" => WTSEC_LIBRARY_Localization::lmsg('descriptions.availability') ]; break; case "ssl": if ((int)$site['expiryDate'] === 0) { $days_left = 0; } else { $earlier = new DateTime(); $later = new DateTime($site['expiryDate']); $days_left = $later->diff($earlier)->format("%a"); } $services["ssl"] = [ "pause" => "", "information" => wtsec_getInformation($service, $site['status']), "status" => WTSEC_LIBRARY_WT::getStatusIcon($site['status']), "days_left" => $days_left, "issue_date" => convertTimeToReadable($site['issueDate']), "expiry_date" => convertTimeToReadable($site['expiryDate']), "description" => WTSEC_LIBRARY_Localization::lmsg('descriptions.ssl'), "solve_it" => in_array($site['status'],['clean','pending']) ? '' : wtsec_locale('solve_it'), ]; break; case "domain": if ((int)$site['expiredDate'] === 0) { $days_left = 0; } else { $earlier = new DateTime(); $later = new DateTime($site['expiredDate']); $days_left = $later->diff($earlier)->format("%a"); } $services["dec"] = [ "pause" => "", "registrar" => $site['registrar'], "owner" => $site['owner'], "information" => wtsec_getInformation($service, $site['status']), "email" => $site['email'], "status" => WTSEC_LIBRARY_WT::getStatusIcon($site['status']), "days_left" => $days_left, "created" => convertTimeToReadable($site['createdDate']), "expiry_date" => convertTimeToReadable($site['expiredDate']), "description" => WTSEC_LIBRARY_Localization::lmsg('descriptions.domain') ]; break; case "reputation": $count = 0; if ($site['status'] != "clean") { foreach ($site['virusList'] as &$list) { if (!empty($list['virus']['type'])) { $count++; } } } $services["av"] = [ "pause" => "", "status" => WTSEC_LIBRARY_WT::getStatusIcon($site['status']), "time_of_the_last_test" => convertTimeToReadable($site['lastTest']['time']), "blacklists_entries" => $count, "description" => WTSEC_LIBRARY_Localization::lmsg('descriptions.reputation'), "reputation" => $site['status'] === "infected" ? wtsec_locale('bad_reputation') : wtsec_locale('good_reputation'), ]; break; case "maliciousScript": $services["cms"] = [ "pause" => "", "status" => WTSEC_LIBRARY_WT::getStatusIcon($site['status']), "time_of_the_last_test" => $site['lastTest']['time'], "description" => WTSEC_LIBRARY_Localization::lmsg('descriptions.malicious') ]; break; case "deface": $services["dc"] = [ "pause" => "", "status" => WTSEC_LIBRARY_WT::getStatusIcon($site['status']), "time_of_the_last_test" => convertTimeToReadable($site['lastTest']['time']), "number" => $site['count'], "description" => WTSEC_LIBRARY_Localization::lmsg('descriptions.deface') ]; break; case "ports": $services["ps"] = [ "pause" => "", "status" => WTSEC_LIBRARY_WT::getStatusIcon($site['status']), "ip" => $site['ip'], "last_test" => convertTimeToReadable($site['lastTest']['time']), "number" => count($site['tcp']), "tcp" => !empty($site['tcp']) ? implode(",", $site['tcp']) : '', "udp" => "", "description" => WTSEC_LIBRARY_Localization::lmsg('descriptions.port') ]; break; case "firewall": $service = "WAF"; $_service = strtolower($service); $domain = $host['hostname']; $uid = $host['id']; $chart = generateChart($site['chart'], 7); // $status = wtsec_checkStatus($uid, $service); $data = WTSEC_LIBRARY_WT::getFirewall($host['id']); $data = $data['data']['auth']['viewer']['sites']['one']['firewall']; $countryAttacks = getCountryAttacks($data['map'], $chart['count_attacks']); $edges = $data['logs']['edges']; $services["waf"] = [ "pause" => "", "site_address" => $domain, "status" => WTSEC_LIBRARY_WT::getStatusIcon($site['status']), "_status" => $site['status'], "installed_status" => in_array($site['status'], ["not_installed", "error", "down", "not_supported", "not_registered"]) ? false : true, "time_of_the_last_check" => convertTimeToReadable($site['lastTest']['time']), "attacks" => $chart['count_attacks'], "blocking" => $chart['count_blocks'], "non-blocking" => $chart['count_attacks'] - $chart['count_blocks'], "description" => WTSEC_LIBRARY_Localization::lmsg('descriptions.firewall'), "actions" => wtsec_generateButtons($uid, $_service, $service, $site['status'], WTSEC_SITE_URL), "chart" => json_encode($chart['chart'], true), "edges" => $edges, "countryAttacks" => $countryAttacks, ]; break; case "antivirus": $service = "AV"; $_service = strtolower($service); $domain = $host['hostname']; $uid = $host['id']; // $status = wtsec_checkStatus($uid, $service); $services["vc"] = [ "pause" => "", "site_address" => $domain, "status" => WTSEC_LIBRARY_WT::getStatusIcon($site['status']), "installed_status" => in_array($site['status'], ["not_installed", "error", "down", "not_supported", "not_registered"]) ? false : true, "_status" => $site['status'], "signatures" => (int)$site['stats']['infected'], "changes" => (int)$site['stats']['changed'], "scanned" => (int)$site['stats']['scaned'], "deleted" => (int)$site['stats']['deleted'], "list" => $site['stats']["infected"], "actions" => wtsec_generateButtons($uid, $_service, $service, $site['status'], WTSEC_SITE_URL), "description" => WTSEC_LIBRARY_Localization::lmsg('descriptions.antivirus') ]; break; } } //check AM, if not installed , run install $process = "installing"; $check_am_file = wtsec_checkInstalledFile("AM"); $am_installed = $check_am_file["status"]; $am_installed_status = wtsec_app()->get('am_installed'); if (!$am_installed || !$am_installed_status) { $am_is_installed = wtsec_cmd("am_install", "AM", "am", $host['id'], [], WTSEC_SITE_URL); if (!$am_is_installed) { $process = "failed"; wtsec_app()->set('am_installed', false); } else { wtsec_app()->set('am_installed', true); } } elseif ($services["vc"]["_status"] === "not_installed" || $services["waf"]["_status"] === "not_installed") { $process = "installing"; } else { $process = "installed"; } $services["am"] = [ "status" => WTSEC_LIBRARY_WT::getStatusIcon($am_installed ? "working" : "not_installed"), "actions" => wtsec_generateButtons($host['id'], "am", "AM", ["active" => $check_am_file], WTSEC_SITE_URL), "process_status" => $process, "installed" => $am_installed, ]; } wtsec_layout("dashboard", $services); } function getCountryAttacks($map, $countAttacks){ if($map){ $attackKey = array_search(max(array_column($map, 'attacks')), array_column($map, 'attacks')); $map[$attackKey]['percent'] = round($map[$attackKey]['attacks'] / $countAttacks * 100); $map[$attackKey]['country'] = wtsec_locale("countries.".$map[$attackKey]['country']); return $map[$attackKey]; } return ['percent' => 0, 'country' => false]; } function generateChart($charts, $days = 7) { if(is_array($days)) { $beginDate = new DateTime( $days['begin'] ); $endDate = new DateTime( $days['end'] ); $dateDiff = strtotime($days['end'] - strtotime($days['begin'])); $days = floor($dateDiff / (60 * 60 * 24)); } if($days <= 1){ $begin = new DateTime( date('Y-m-d 00:00:00') ); $end = new DateTime( date('Y-m-d 23:59:59') ); $step = 'hour'; } elseif($days <= 31){ $begin = new DateTime( date('Y-m-d', strtotime('-'.($days - 1).' day')) ); $end = new DateTime( date('Y-m-d') ); $step = 'day'; } else { $begin = new DateTime( date('Y-m-01', strtotime('- 11 month')) ); $end = new DateTime( date('Y-m-01', time()) ); $step = 'month'; } $count_attacks = 0; $count_blocks = 0; $c = []; for($i = $begin; $i <= $end; $i->modify('+1 '.$step)){ $c[$i->format('U')] = [ 'date' => ($days <= 1) ? $i->format("Y-m-d H:00:00") : $i->format("Y-m-d"), 'count' => 0, 'attacks' => 0, 'blocked' => 0, ]; } foreach ($charts as $chart) { $d = strtotime($chart['time']); $c[$d]['count'] = $chart['blocked']; $c[$d]['attacks'] = $chart['attacks']; $c[$d]['blocked'] = $chart['blocked']; $count_attacks += $chart['attacks']; $count_blocks += $chart['blocked']; } //unset keys, because the js parser sorting by key in integer $result = []; foreach ($c as $d) { $result[] = $d; } return ['chart' => $result, 'count_attacks' => $count_attacks, 'count_blocks' => $count_blocks]; } function wtsec_getInformation($service, $status) { $information = [ "ssl" => [ WTSEC_LIBRARY_Localization::lmsg("statuses.ok"), WTSEC_LIBRARY_Localization::lmsg("statuses.invalid"), WTSEC_LIBRARY_Localization::lmsg("statuses.expired"), WTSEC_LIBRARY_Localization::lmsg("statuses.expires"), "unknown_status" => WTSEC_LIBRARY_Localization::lmsg("statuses.missing"), ], "domain" => [ WTSEC_LIBRARY_Localization::lmsg("statuses.ok"), WTSEC_LIBRARY_Localization::lmsg("statuses.expires"), "unknown_status" => WTSEC_LIBRARY_Localization::lmsg("statuses.error"), ] ]; return isset($information[$service][$status]) ? $information[$service][$status] : $information[$service]["unknown_status"]; } function wtsec_getStatusStartPauseIcon($status, $config_id, $host_id) { $icon = ''; switch ($status) { case "1": $icon = '
'; break; case "0": $icon = '
'; break; } return $icon; } function wtsec_options_page() { $host = WTSEC_LIBRARY_WT::getOwnSite(); $result = WTSEC_LIBRARY_WT::getOptions($host['id']); $options = []; if (isset($result['data']['userHost']['services'])) { foreach ($result['data']['userHost']['services'] as $service) { $configs = $service['configs'][0]; $options[$service['name']] = ['config_id' => $configs['id'], 'is_active' => $configs['isActive']]; } } $options['host_id'] = $host['id']; wtsec_layout("options", $options); } function wtsec_services_page() { wtsec_layout("services"); } function wtsec_antivirus_page() { $host = WTSEC_LIBRARY_WT::getOwnSite(); $services = []; if (!empty($host)) { $site = WTSEC_LIBRARY_WT::getAntivirus($host['id']); if (isset($site['data']['auth']['viewer']['sites']['one']['antivirus']['log'])) { $site = $site['data']['auth']['viewer']['sites']['one']['antivirus']; $_SESSION['antivirus_endCursor'] = $site['log']['pageInfo']['endCursor']; $_SESSION['antivirus_hasNextPage'] = $site['log']['pageInfo']['hasNextPage']; $service = "AV"; $_service = strtolower($service); $domain = $host['hostname']; $uid = $host['id']; $status = wtsec_checkStatus($uid, $service); $services["vc"] = [ "pause" => "", "site_address" => $domain, "status" => WTSEC_LIBRARY_WT::getStatusIcon($site['status']), "signatures" => (int)$site['stats']['infected'], "changes" => (int)$site['stats']['changed'], "scanned" => (int)$site['stats']['scaned'], "deleted" => (int)$site['stats']['deleted'], "list" => $site["log"]['edges'], "actions" => $buttons = wtsec_generateButtons($uid, $_service, $service, $status, WTSEC_SITE_URL), "description" => WTSEC_LIBRARY_Localization::lmsg('descriptions.antivirus') ]; } } wtsec_layout("antivirus", $services); } function wtsec_firewall_page() { $host = WTSEC_LIBRARY_WT::getOwnSite(); $services = []; if (!empty($host)) { $site = WTSEC_LIBRARY_WT::getFirewall($host['id'],10,null,7); $chart = WTSEC_LIBRARY_WT::getFirewallChart($host['id'], 7); if (isset($site['data']['auth']['viewer']['sites']['one']['firewall']['logs'])) { $logs = $site['data']['auth']['viewer']['sites']['one']['firewall']['logs']; $firewall = $site['data']['auth']['viewer']['sites']['one']['firewall']; $edges = $logs['edges']; $chart = $chart['data']['auth']['viewer']['sites']['one']['firewall']['chart']; $chart = generateChart($chart, 7); $domain = $host['hostname']; $_SESSION['firewall_endCursor'] = $logs['pageInfo']['endCursor']; $_SESSION['firewall_hasNextPage'] = $logs['pageInfo']['hasNextPage']; $countryAttacks = getCountryAttacks($firewall['map'], $chart['count_attacks']); $services["waf"] = [ "pause" => "", "site_address" => $domain, "status" => WTSEC_LIBRARY_WT::getStatusIcon($firewall['status']), "_status" => $firewall['status'], "installed_status" => in_array($firewall['status'], ["not_installed", "error", "down", "not_supported", "not_registered"]) ? false : true, "time_of_the_last_check" => convertTimeToReadable($firewall['lastTest']['time']), "attacks" => $chart['count_attacks'], "blocking" => $chart['count_blocks'], "non-blocking" => $chart['count_attacks'] - $chart['count_blocks'], "description" => WTSEC_LIBRARY_Localization::lmsg('descriptions.firewall'), "chart" => json_encode($chart['chart'], true), "edges" => $edges, "countryAttacks" => $countryAttacks, ]; } } wtsec_layout("firewall", $services); } /** * ajax load firewall */ function wtsec_ajax_firewall() { $host = WTSEC_LIBRARY_WT::getOwnSite(); $services = []; $post = ($_POST) ? wtsec_clean($_POST):[]; $days = ($post['period']) ? wtsec_period_as_time($post['period']) : 7; if (!empty($host)) { if(!$_SESSION['firewall_endCursor'] || $post['filter'] == 'period_filter') $_SESSION['firewall_endCursor'] = null; $site = WTSEC_LIBRARY_WT::getFirewall($host['id'],10, $_SESSION['firewall_endCursor'], $days); if (isset($site['data']['auth']['viewer']['sites']['one']['firewall']['logs'])) { $logs = $site['data']['auth']['viewer']['sites']['one']['firewall']['logs']; $services["waf"]['edges'] = $logs['edges']; $_SESSION['firewall_endCursor'] = $logs['pageInfo']['endCursor']; $_SESSION['firewall_hasNextPage'] = $logs['pageInfo']['hasNextPage']; } } wtsec_layout_part("_firewall_lazy", $services); wp_die(); } /** * ajax load antivirus */ function wtsec_ajax_antivirus() { $host = WTSEC_LIBRARY_WT::getOwnSite(); $services = []; $post = ($_POST) ? wtsec_clean($_POST):[]; $days = ($post['period']) ? wtsec_period_as_time($post['period']) : 7; if (!empty($host)) { if(!$_SESSION['antivirus_endCursor'] || $post['filter'] == 'period_filter') $_SESSION['antivirus_endCursor'] = null; if($post['event'] || $_SESSION['antivirus_event']){ if($post['event']){ $_SESSION['antivirus_event'] = $post['event']; } $site = WTSEC_LIBRARY_WT::getAntivirus($host['id'],10, $_SESSION['antivirus_endCursor'],$days, $_SESSION['antivirus_event']); } else { $site = WTSEC_LIBRARY_WT::getAntivirus($host['id'],10, $_SESSION['antivirus_endCursor'],$days); } if (isset($site['data']['auth']['viewer']['sites']['one']['antivirus']['log'])) { $logs = $site['data']['auth']['viewer']['sites']['one']['antivirus']['log']; $services["vc"]['list'] = $logs['edges']; $_SESSION['antivirus_endCursor'] = $logs['pageInfo']['endCursor']; $_SESSION['antivirus_hasNextPage'] = $logs['pageInfo']['hasNextPage']; } } wtsec_layout_part("_antivirus_lazy", $services); wp_die(); } /** * ajax load chart */ function wtsec_chart_filter() { $days = (int)$_POST['days']; $days = $days ?: 7; $host = WTSEC_LIBRARY_WT::getOwnSite(); $chart = WTSEC_LIBRARY_WT::getFirewallChart($host['id'], $days); $chart = $chart['data']['auth']['viewer']['sites']['one']['firewall']['chart']; $chart = generateChart($chart, $days); $res['chart'] = json_encode($chart['chart'], true); $res['days'] = $days; wtsec_layout_part("_chart_ajax", $res); wp_die(); } function wtsec_login_form() { if (wtsec_request()->method === "POST") { $result = WTSEC_LIBRARY_WT::auth(wtsec_request()->key); if (isset($result['data']['guest']['apiKeys']['auth']['token']['value'])) { WTSEC_LIBRARY_Session::setNotification("success", WTSEC_LIBRARY_Localization::lmsg('successfully_activated')); $token = $result['data']['guest']['apiKeys']['auth']['token']['value']; WTSEC_LIBRARY_App::login($token); wtsec_app()->set("api_key", wtsec_request()->key); wp_safe_redirect(wtsec_getUrl('dashboard')); exit; } else { WTSEC_LIBRARY_Session::setNotification("error", WTSEC_LIBRARY_Localization::lmsg("form.incorrect")); } } wp_safe_redirect(wtsec_getUrl('login')); } function wtsec_cmd_ajax() { $service = strtoupper(wtsec_request()->service); $_service = strtolower(wtsec_request()->service); $uid = wtsec_request()->uid; $cmd = wtsec_request()->cmd; $status = wtsec_checkStatus($uid, $service); if (stripos($cmd, "install") === false) { wtsec_cmd($cmd, $service, $_service, $uid, $status, WTSEC_SITE_URL); wp_safe_redirect(wp_get_referer()); } else { $redirect = wtsec_getUrl("dashboard"); $form_url = wp_nonce_url(admin_url('admin-post.php?cmd=' . $cmd . '&action=ajax_cmd&service=' . $service . '&uid=' . $uid), "ajax_cmd"); if (wtsec_filesystem_init($form_url, '', false, false)) { wtsec_cmd($cmd, $service, $_service, $uid, $status, WTSEC_SITE_URL); wp_safe_redirect($redirect); } } } function wtsec_login() { require_once WTSEC_PLUGIN_PATH . "includes/login.php"; } function wtsec_logout() { WTSEC_LIBRARY_App::logout(); } function wtsec_layout_part($template, $arguments = []) { require WTSEC_PLUGIN_PATH . "includes/components/" . $template . ".php"; } function wtsec_layout($template, $arguments = [], $faq = "faq") { $body = WTSEC_PLUGIN_PATH . "includes/" . $template . ".php"; $faq = WTSEC_PLUGIN_PATH . "includes/" . $faq . ".php"; require_once WTSEC_PLUGIN_PATH . "includes/layout.php"; } function wtsec_ajax_changeStatus() { if (wtsec_request()->method === "POST") { $host_id = wtsec_request()->host_id; $config_id = wtsec_request()->config_id; $result = WTSEC_LIBRARY_WT::changeStatus($config_id, $host_id); echo json_encode($result); } wp_die(); } function wtsec_changeStatus() { if (wtsec_request()->method === "POST") { $host_id = wtsec_request()->host_id; $config_id = wtsec_request()->config_id; WTSEC_LIBRARY_WT::changeStatus($config_id, $host_id); } wp_safe_redirect(wp_get_referer()); } function wtsec_page($page) { return wtsec_pages()[$page]; } function wtsec_clean($data) { if (is_array($data)) { foreach ($data as $key => $value) { unset($data[$key]); $data[wtsec_clean($key)] = wtsec_clean($value); } } else { $data = htmlspecialchars(strip_tags($data), ENT_COMPAT, 'UTF-8'); } return $data; } function wtsec_period_as_time($period){ $end = $period[1] ?: $period[0]; $array['begin'] = strtotime(date('d-m-Y 00:00:00',strtotime($period[0]))); $array['end'] = strtotime(date('d-m-Y 23:59:59',strtotime($end))); return $array; } function wtsec_getUrl($page) { return admin_url('admin.php?page=' . WTSEC_PAGE_PREFIX . $page); } function wtsec_getRoute($page) { return WTSEC_PAGE_PREFIX . $page; } function wtsec_pages() { return [ // "options" => [ // "page_title" => WTSEC_LIBRARY_Localization::lmsg('options'), // "menu_title" => WTSEC_LIBRARY_Localization::lmsg('options'), // "function" => "wtsec_options_page", // ], "services" => [ "page_title" => WTSEC_LIBRARY_Localization::lmsg('services'), "menu_title" => WTSEC_LIBRARY_Localization::lmsg('services'), "function" => "wtsec_services_page", ], "vc" => [ "page_title" => WTSEC_LIBRARY_Localization::lmsg('remote_antivirus'), "menu_title" => WTSEC_LIBRARY_Localization::lmsg('remote_antivirus'), "function" => "wtsec_antivirus_page", "vc_action" => "vc-action", "vc_function" => "wtsec_vc_function" ], "waf" => [ "page_title" => WTSEC_LIBRARY_Localization::lmsg('firewall'), "menu_title" => WTSEC_LIBRARY_Localization::lmsg('firewall'), "function" => "wtsec_firewall_page", "vc_action" => "firewall-action", "vc_function" => "wtsec_firewall_function" ], ]; }