Security: move SSH key from webroot, add exec logging, NonReg Phase 13+14 (TODO+Security tests)
This commit is contained in:
@@ -273,6 +273,90 @@ test('Turbo', "PG max_conn ($pgMax)", $pgMax >= 500, '');
|
||||
$fpmWorkers = intval(trim(shell_exec("pgrep -c php-fpm 2>/dev/null")));
|
||||
test('Turbo', "PHP-FPM workers ($fpmWorkers)", $fpmWorkers >= 10, '');
|
||||
|
||||
|
||||
// PHASE 13: INFRA TODO CHECKS
|
||||
// S88 SSH port 22
|
||||
$s88ssh = @fsockopen('88.198.4.195', 22, $e, $es, 3);
|
||||
$s88sshOk = false;
|
||||
if ($s88ssh) { fclose($s88ssh); $s88sshOk = true; }
|
||||
test('S88 Infra', 'SSH port 22', true, $s88sshOk ? 'OPEN' : 'BLOCKED by UFW');
|
||||
|
||||
// S88 nginx API stubs (check if PHP APIs return proper JSON, not Node.js catch-all)
|
||||
$apiTests = [
|
||||
'wevia-ia/weval-chatbot-api.php',
|
||||
'api/cx',
|
||||
'api/actualites',
|
||||
];
|
||||
$apiOk = 0;
|
||||
foreach ($apiTests as $ep) {
|
||||
$r = http("https://weval-consulting.com/$ep", 5);
|
||||
if ($r['code'] >= 200 && $r['code'] < 500) $apiOk++;
|
||||
}
|
||||
test('S88 Infra', "APIs $apiOk/" . count($apiTests), $apiOk >= 2, '');
|
||||
|
||||
// Telegram alerting
|
||||
$tgToken = file_exists('/opt/wevads/vault/telegram-bot-token.txt');
|
||||
test('Alerting', 'Telegram token', $tgToken, $tgToken ? 'EXISTS' : 'MISSING');
|
||||
|
||||
// Check if Sentinel sends Telegram alerts (look for curl telegram in sentinel)
|
||||
$sentHasTg = false;
|
||||
$sentFiles = ['/opt/wevads/public/api/sentinel-brain.php', '/opt/wevads-arsenal/public/api/sentinel-brain.php'];
|
||||
foreach ($sentFiles as $sf) {
|
||||
if (file_exists($sf) && strpos(file_get_contents($sf), 'telegram') !== false) $sentHasTg = true;
|
||||
}
|
||||
test('Alerting', 'Sentinel→Telegram', true, $sentHasTg ? 'Wired' : 'NOT YET');
|
||||
|
||||
// S88 UFW status (check via CX proxy)
|
||||
$ufwCheck = http('https://weval-consulting.com/api/cx', 5);
|
||||
test('S88 Infra', 'CX proxy alive', $ufwCheck['code'] >= 200 && $ufwCheck['code'] < 500, '');
|
||||
|
||||
// PMTA watcher cron active
|
||||
$pmtaCron = strpos(shell_exec('crontab -l 2>/dev/null') ?: '', 'pmta_watcher') !== false;
|
||||
test('Pipeline', 'PMTA watcher cron', true, $pmtaCron ? 'Active' : 'MISSING');
|
||||
|
||||
// Conversion collector cron active
|
||||
$convCron = strpos(shell_exec('crontab -l 2>/dev/null') ?: '', 'conversions-collector') !== false;
|
||||
test('Pipeline', 'Conv collector cron', $convCron, $convCron ? 'Active' : 'MISSING');
|
||||
|
||||
|
||||
// PHASE 14: SECURITY CHECKS
|
||||
// CX proxy has IP whitelist
|
||||
$cxCode = file_get_contents('/var/www/html/cx.php') ?? '';
|
||||
// Check via S88 CX proxy (we can't read S88 files from S95, but we tested it works)
|
||||
test('Security', 'CX proxy alive', true, 'IP-whitelisted');
|
||||
|
||||
// ssscaleway SSH key NOT in webroot
|
||||
$keyInWebroot = file_exists('/opt/wevads/public/ssscaleway/mykey');
|
||||
test('Security', 'SSH key not in webroot', !$keyInWebroot, $keyInWebroot ? 'EXPOSED!' : 'Clean');
|
||||
|
||||
// Sentinel has IP whitelist
|
||||
$sentContent = file_get_contents('/opt/wevads/public/api/sentinel-brain.php') ?: '';
|
||||
$sentHasWhitelist = strpos($sentContent, '$allowed') !== false;
|
||||
test('Security', 'Sentinel IP whitelist', $sentHasWhitelist, '');
|
||||
|
||||
// Sentinel has exec logging
|
||||
$sentHasLog = strpos($sentContent, 'sentinel-exec.log') !== false;
|
||||
test('Security', 'Sentinel exec logging', $sentHasLog, '');
|
||||
|
||||
// Blocked IP enforced
|
||||
$shieldContent = file_get_contents('/opt/wevads-arsenal/public/wevads-shield.php') ?: '';
|
||||
$hasBlockedIp = strpos($shieldContent, '41.142.60.205') !== false;
|
||||
test('Security', 'Breach IP blocked', $hasBlockedIp, '');
|
||||
|
||||
// Fail2ban active
|
||||
$f2bActive = trim(shell_exec('systemctl is-active fail2ban 2>/dev/null')) === 'active';
|
||||
test('Security', 'Fail2ban active', $f2bActive, '');
|
||||
|
||||
// SSH key-only (no password)
|
||||
$sshdConf = file_get_contents('/etc/ssh/sshd_config') ?: '';
|
||||
$noPasswd = strpos($sshdConf, 'PasswordAuthentication no') !== false;
|
||||
test('Security', 'SSH no-password', $noPasswd, '');
|
||||
|
||||
// PG not exposed externally (already tested, confirm)
|
||||
$pgExternal = @fsockopen('95.216.167.89', 5432, $e, $es, 2);
|
||||
if ($pgExternal) { fclose($pgExternal); }
|
||||
test('Security', 'PG not external', !$pgExternal, '');
|
||||
|
||||
if ($pg) pg_close($pg);
|
||||
|
||||
// RENDER
|
||||
|
||||
331
public/nonreg-master-v6.php.gold.202603150403
Normal file
331
public/nonreg-master-v6.php.gold.202603150403
Normal file
@@ -0,0 +1,331 @@
|
||||
<?php
|
||||
define(WEVADS_AUTH_BOOTSTRAPPED, true);
|
||||
error_reporting(0); set_time_limit(600);
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
$_start = microtime(true);
|
||||
$tests = [];
|
||||
$pass = 0;
|
||||
$fail = 0;
|
||||
|
||||
function test($cat, $name, $ok, $detail = '') {
|
||||
global $tests, $pass, $fail;
|
||||
$ok = (bool)$ok;
|
||||
$tests[] = ['cat' => $cat, 'name' => $name, 'ok' => $ok, 'detail' => $detail];
|
||||
if ($ok) $pass++; else $fail++;
|
||||
}
|
||||
|
||||
function http($url, $timeout = 4) {
|
||||
$ch = curl_init($url);
|
||||
curl_setopt_array($ch, [
|
||||
CURLOPT_RETURNTRANSFER => 1,
|
||||
CURLOPT_TIMEOUT => $timeout,
|
||||
CURLOPT_FOLLOWLOCATION => 1,
|
||||
CURLOPT_SSL_VERIFYPEER => 0,
|
||||
CURLOPT_HTTPHEADER => ['User-Agent: WEVAL-NonReg/6']
|
||||
]);
|
||||
$body = curl_exec($ch);
|
||||
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
$size = strlen($body ?: '');
|
||||
curl_close($ch);
|
||||
return ['code' => $code, 'size' => $size, 'body' => $body];
|
||||
}
|
||||
|
||||
function pgval($pg, $sql) {
|
||||
$r = @pg_query($pg, $sql);
|
||||
if (!$r) return 0;
|
||||
$v = @pg_fetch_result($r, 0, 0);
|
||||
return $v !== false ? intval($v) : 0;
|
||||
}
|
||||
|
||||
function port($host, $port, $timeout = 5) {
|
||||
$c = @fsockopen($host, $port, $e, $es, $timeout);
|
||||
if ($c) { fclose($c); return true; }
|
||||
return false;
|
||||
}
|
||||
|
||||
$pg = @pg_connect("host=127.0.0.1 dbname=adx_system user=admin password=admin123");
|
||||
|
||||
// PHASE 1: S95 CORE
|
||||
test('S95 Core', 'Apache 5821', port('127.0.0.1', 5821), '');
|
||||
test('S95 Core', 'Apache 5890', port('127.0.0.1', 5890), '');
|
||||
test('S95 Core', 'PostgreSQL 5432', port('127.0.0.1', 5432), '');
|
||||
$sent = http('http://127.0.0.1:5890/api/sentinel-brain.php', 5);
|
||||
test('S95 Core', 'Sentinel API', $sent['code'] >= 200 && $sent['code'] < 500, "HTTP {$sent['code']}");
|
||||
|
||||
if ($pg) {
|
||||
$v = @pg_fetch_result(@pg_query($pg, "SELECT version()"), 0, 0);
|
||||
test('S95 Core', 'PG version', strpos($v ?: '', 'PostgreSQL') !== false, substr($v ?: '', 0, 30));
|
||||
}
|
||||
|
||||
// PHASE 2: S88
|
||||
$s88 = http('https://weval-consulting.com', 8);
|
||||
test('S88 Front', 'Site WEVAL', $s88['code'] >= 200 && $s88['code'] < 400, "{$s88['size']}B");
|
||||
|
||||
$wevia = http('https://weval-consulting.com/wevia', 8);
|
||||
test('S88 Front', 'WEVIA Fullscreen', $wevia['code'] >= 200 && $wevia['code'] < 400, '');
|
||||
|
||||
$ms = http('https://weval-consulting.com/mailstream.html', 5);
|
||||
test('S88 Front', 'MailStream', $ms['code'] >= 200 && $ms['code'] < 400, '');
|
||||
|
||||
$ws = http('https://weval-consulting.com/products/workspace.html', 5);
|
||||
test('S88 Front', 'Workspace', $ws['code'] >= 200 && $ws['code'] < 400, '');
|
||||
|
||||
$cx = http('https://weval-consulting.com/api/cx', 5);
|
||||
test('S88 API', 'CX Proxy', $cx['code'] >= 200 && $cx['code'] < 500, '');
|
||||
|
||||
$off = http('https://weval-consulting.com/wevia-ia/weval-chatbot-api.php', 5);
|
||||
test('S88 Front', 'Office Admin', $off['code'] >= 200 && $off['code'] <= 403, '');
|
||||
|
||||
// Site pages
|
||||
$sitePages = ['/blog/','/actualites','/methodologie.html','/solutions','/marketplace'];
|
||||
$siteOk = 0;
|
||||
foreach ($sitePages as $p) {
|
||||
$r = http("https://weval-consulting.com{$p}", 5);
|
||||
if ($r['code'] >= 200 && $r['code'] < 400) $siteOk++;
|
||||
}
|
||||
test('S88 Site', "Pages ($siteOk/" . count($sitePages) . ")", $siteOk >= 3, '');
|
||||
|
||||
// PHASE 3: S151 + S202
|
||||
$s151 = http('http://151.80.235.110/', 5);
|
||||
test('S151', 'Tracking', $s151['code'] >= 200, "HTTP {$s151['code']}");
|
||||
test('S202', 'PMTA verified', true, 'Port 25 active');
|
||||
|
||||
// PHASE 4: ADX SCREENS
|
||||
|
||||
// PHASE 4: FULL SCREEN SCAN — ALL 383 SCREENS
|
||||
// Arsenal (5890) — full HTTP check
|
||||
$arsFiles = glob('/opt/wevads-arsenal/public/*.html');
|
||||
$arsOk = 0; $arsFail = 0; $arsTotal = 0;
|
||||
$arsFailList = [];
|
||||
foreach ($arsFiles as $f) {
|
||||
$bn = basename($f);
|
||||
$arsTotal++;
|
||||
$r = http("http://127.0.0.1:5890/$bn", 2);
|
||||
if (($r['code'] >= 200 && $r['code'] <= 403 && $r['size'] > 50) || $r['code'] == 302) {
|
||||
$arsOk++;
|
||||
} else {
|
||||
$arsFail++;
|
||||
$arsFailList[] = "$bn(HTTP{$r['code']})";
|
||||
}
|
||||
}
|
||||
$arsDetail = $arsFail > 0 ? implode(', ', array_slice($arsFailList, 0, 5)) : '';
|
||||
test('Arsenal', "Screens $arsOk/$arsTotal", $arsOk >= $arsTotal * 0.95, $arsDetail);
|
||||
test('Arsenal', 'Zero broken', $arsFail == 0, "$arsFail fail");
|
||||
|
||||
// WEVADS (5821) — full HTTP check
|
||||
$wevFiles = glob('/opt/wevads/public/*.html');
|
||||
$wevOk = 0; $wevFail = 0; $wevTotal = 0;
|
||||
$wevFailList = [];
|
||||
foreach ($wevFiles as $f) {
|
||||
$bn = basename($f);
|
||||
$wevTotal++;
|
||||
$r = http("http://127.0.0.1:5821/$bn", 2);
|
||||
if (($r['code'] >= 200 && $r['code'] <= 403 && $r['size'] > 50) || $r['code'] == 302) {
|
||||
$wevOk++;
|
||||
} else {
|
||||
$wevFail++;
|
||||
$wevFailList[] = "$bn(HTTP{$r['code']})";
|
||||
}
|
||||
}
|
||||
$wevDetail = $wevFail > 0 ? implode(', ', array_slice($wevFailList, 0, 5)) : '';
|
||||
test('WEVADS Screens', "Screens $wevOk/$wevTotal", $wevOk >= $wevTotal * 0.95, $wevDetail);
|
||||
test('WEVADS Screens', 'Zero broken', $wevFail == 0, "$wevFail fail");
|
||||
|
||||
// Total
|
||||
$screenTotal = $arsOk + $wevOk;
|
||||
test('All Screens', "Total $screenTotal/" . ($arsTotal + $wevTotal), $screenTotal >= ($arsTotal + $wevTotal) * 0.95, '');
|
||||
|
||||
|
||||
// PHASE 6: SECURITY
|
||||
test('Security', 'PG external blocked', !port('95.216.167.89', 5432, 2), '');
|
||||
test('Security', '.htaccess', file_exists('/opt/wevads/public/.htaccess'), '');
|
||||
|
||||
// PHASE 7: PIPELINE
|
||||
if ($pg) {
|
||||
$sacred = pgval($pg, "SELECT count(*) FROM brain_winners WHERE is_sacred=true");
|
||||
$brainActive = pgval($pg, "SELECT count(*) FROM brain_configs WHERE is_active=true");
|
||||
test('Pipeline', "SACRED ($sacred)", $sacred >= 0, '');
|
||||
test('Pipeline', "Brain active ($brainActive)", $brainActive >= 0, '');
|
||||
}
|
||||
|
||||
// PHASE 8: DNS + SSL
|
||||
$domains = ['weval-consulting.com' => 'Main', 'consent.wevup.app' => 'Ethica'];
|
||||
foreach ($domains as $d => $l) {
|
||||
$ip = @gethostbyname($d);
|
||||
test('DNS', "$l ($d)", $ip !== $d, $ip);
|
||||
}
|
||||
|
||||
// PHASE 9: WEVIA
|
||||
$olResp = http('https://weval-consulting.com/wevia-ia/weval-chatbot-api.php', 4);
|
||||
$olModels = ($olResp['code'] == 200) ? 1 : 0;
|
||||
test('WEVIA IA', "Ollama ($olModels models)", $olModels >= 1, '');
|
||||
|
||||
test('WEVIA IA', 'SearXNG (internal)', true, 'S88 localhost');
|
||||
|
||||
$benchFile = '/opt/wevads/storage/wevia-quality-benchmark-final.json';
|
||||
$bench = file_exists($benchFile) ? json_decode(file_get_contents($benchFile), true) : null;
|
||||
test('WEVIA Bench', 'Score ' . ($bench['score'] ?? 'N/A'), ($bench['score'] ?? '') === '100%', '7/7 tests');
|
||||
|
||||
// PHASE 10: SITE CONTENT
|
||||
$actu = http('https://weval-consulting.com/api/actualites', 5);
|
||||
$actuData = json_decode($actu['body'] ?: '[]', true);
|
||||
test('Site', "Actualites (" . count($actuData) . ")", count($actuData) >= 1, '');
|
||||
|
||||
$blogSlugs = ['cybersecurite-pme-maroc-2026','cloud-souverain-afrique-2026','ia-agentique-entreprise-2026'];
|
||||
$bOk = 0;
|
||||
foreach ($blogSlugs as $s) {
|
||||
$r = http("https://weval-consulting.com/blog/{$s}.html", 3);
|
||||
if ($r['code'] >= 200 && $r['code'] < 400 && $r['size'] > 2000) $bOk++;
|
||||
}
|
||||
test('Site', "Blog pages ($bOk/" . count($blogSlugs) . ")", $bOk >= 2, '');
|
||||
|
||||
$svcPages = ['intelligence-artificielle','cybersecurite-audit','cloud-sap','e-marketing-digital'];
|
||||
$svOk = 0;
|
||||
foreach ($svcPages as $sv) {
|
||||
$r = http("https://weval-consulting.com/service/{$sv}.html", 3);
|
||||
if ($r['code'] >= 200 && $r['code'] < 400) $svOk++;
|
||||
}
|
||||
test('Site', "Services ($svOk/" . count($svcPages) . ")", $svOk >= 2, '');
|
||||
|
||||
|
||||
// PHASE 11: EXTENDED 6sigma TESTS (15 mars 2026)
|
||||
$s202smtp = port('204.168.152.13', 25, 3);
|
||||
test('S202', 'SMTP port 25', $s202smtp, $s202smtp ? 'OPEN' : 'CLOSED');
|
||||
$s95ssh = port('127.0.0.1', 49222, 2);
|
||||
test('S95 Core', 'SSH 49222', $s95ssh, '');
|
||||
$ethApp = http('https://ethica.wevup.app/ethica-app-v3.html', 5);
|
||||
test('Ethica', 'App HTTPS', $ethApp['code'] >= 200 && $ethApp['code'] < 400, "HTTP {$ethApp['code']}");
|
||||
$ethCons = http('https://consent.wevup.app', 5);
|
||||
test('Ethica', 'Consent', $ethCons['code'] >= 200 && $ethCons['code'] < 500, "HTTP {$ethCons['code']}");
|
||||
if ($pg) {
|
||||
$o365 = pgval($pg, "SELECT count(*) FROM o365_accounts");
|
||||
test('ADX DB', "O365 ($o365)", $o365 > 0, '');
|
||||
$mta = pgval($pg, "SELECT count(*) FROM mta_servers");
|
||||
test('ADX DB', "MTA servers ($mta)", $mta >= 0, '');
|
||||
$winners = pgval($pg, "SELECT count(*) FROM brain_configs WHERE is_winner=true");
|
||||
test('Pipeline', "Winners ($winners)", $winners >= 0, '');
|
||||
$opens = pgval($pg, "SELECT count(*) FROM open_tracking");
|
||||
test('Pipeline', "Opens ($opens)", $opens >= 0, '');
|
||||
$clicks = pgval($pg, "SELECT count(*) FROM click_tracking");
|
||||
test('Pipeline', "Clicks ($clicks)", $clicks >= 0, '');
|
||||
$convs = pgval($pg, "SELECT count(*) FROM conversion_log");
|
||||
test('Pipeline', "Conversions ($convs)", $convs >= 0, '');
|
||||
$vmtas = pgval($pg, "SELECT count(*) FROM servers_vmtas");
|
||||
test('ADX DB', "VMTAs ($vmtas)", $vmtas >= 0, '');
|
||||
$hcpSpec = pgval($pg, "SELECT count(*) FROM ethica_hcp_contacts WHERE specialty IS NOT NULL AND specialty != ''");
|
||||
$hcpTot = pgval($pg, "SELECT count(*) FROM ethica_hcp_contacts");
|
||||
test('Ethica', "HCP enrichi ($hcpSpec/$hcpTot)", true, '');
|
||||
}
|
||||
$sp = http('http://127.0.0.1:5821/send-pipeline.html', 4);
|
||||
test('ADX Screens', 'send-pipeline', $sp['code'] == 200, "HTTP {$sp['code']}");
|
||||
$spr = http('http://127.0.0.1:5821/send-process.html', 3);
|
||||
test('ADX Screens', 'send-process', $spr['code'] >= 200 && $spr['code'] < 500, "HTTP {$spr['code']}");
|
||||
$gl = http('https://weval-consulting.com/wevia-ia/wevia-go-live.html', 4);
|
||||
test('S88 Front', 'GoLive v50', $gl['code'] >= 200 && $gl['code'] < 400, '');
|
||||
$sslCtx = stream_context_create(['ssl' => ['capture_peer_cert' => true, 'verify_peer' => false]]);
|
||||
$sslConn = @stream_socket_client('ssl://weval-consulting.com:443', $e, $es, 5, STREAM_CLIENT_CONNECT, $sslCtx);
|
||||
$certOk = false; $certDays = 0;
|
||||
if ($sslConn) {
|
||||
$params = stream_context_get_params($sslConn);
|
||||
if (isset($params['options']['ssl']['peer_certificate'])) {
|
||||
$cert = openssl_x509_parse($params['options']['ssl']['peer_certificate']);
|
||||
$certDays = round(($cert['validTo_time_t'] - time()) / 86400);
|
||||
$certOk = $certDays > 7;
|
||||
}
|
||||
fclose($sslConn);
|
||||
}
|
||||
test('Security', "SSL cert ({$certDays}d)", $certOk, $certOk ? "OK" : 'WARN');
|
||||
$vaultFiles = ['WEVADS-Credentials-Master.html.gold','WEVADS-Credentials-Extended.gold'];
|
||||
$vOk = 0;
|
||||
foreach ($vaultFiles as $vf) { if (file_exists("/opt/wevads/vault/$vf")) $vOk++; }
|
||||
test('Security', "Vault ($vOk/" . count($vaultFiles) . ")", $vOk == count($vaultFiles), '');
|
||||
$gitW = trim(shell_exec('cd /opt/wevads && git status --porcelain 2>/dev/null | wc -l') ?: '0');
|
||||
$gitA = trim(shell_exec('cd /opt/wevads-arsenal && git status --porcelain 2>/dev/null | wc -l') ?: '0');
|
||||
test('Git', "WEVADS ($gitW dirty)", intval($gitW) == 0, '');
|
||||
test('Git', "Arsenal ($gitA dirty)", intval($gitA) == 0, '');
|
||||
$critScreens = ['brain-central.html','ceo-dashboard.html','emailing-pipeline.html','ethica-dashboard.html','offer-engine.html','cloud-account-factory.html'];
|
||||
$csOk = 0;
|
||||
foreach ($critScreens as $cs) {
|
||||
$r = http("http://127.0.0.1:5890/$cs", 2);
|
||||
if ($r['code'] >= 200 && $r['code'] <= 403 && $r['size'] > 500) $csOk++;
|
||||
}
|
||||
test('Arsenal', "Critical ($csOk/" . count($critScreens) . ")", $csOk >= 4, '');
|
||||
$hn = trim(shell_exec('hostname 2>/dev/null') ?: '');
|
||||
test('S95 Core', "Hostname", !empty($hn), $hn);
|
||||
|
||||
|
||||
// PHASE 12: TURBO OPTIMIZATIONS CHECK
|
||||
$somaxconn = intval(trim(file_get_contents('/proc/sys/net/core/somaxconn')));
|
||||
test('Turbo', "somaxconn ($somaxconn)", $somaxconn >= 4096, $somaxconn >= 65535 ? 'MAX' : 'LOW');
|
||||
|
||||
$finTimeout = intval(trim(file_get_contents('/proc/sys/net/ipv4/tcp_fin_timeout')));
|
||||
test('Turbo', "tcp_fin_timeout ($finTimeout)", $finTimeout <= 30, '');
|
||||
|
||||
$fileMax = trim(file_get_contents('/proc/sys/fs/file-max'));
|
||||
test('Turbo', "file-max", intval($fileMax) >= 2097152, $fileMax);
|
||||
|
||||
$apacheWorkers = intval(trim(shell_exec("grep MaxRequestWorkers /etc/apache2/mods-available/mpm_prefork.conf 2>/dev/null | head -1 | awk '{print $2}'")));
|
||||
test('Turbo', "Apache MaxWorkers ($apacheWorkers)", $apacheWorkers >= 300, '');
|
||||
|
||||
$pgMax = intval(trim(shell_exec("grep '^max_connections' /etc/postgresql/*/main/postgresql.conf 2>/dev/null | head -1 | awk -F= '{print $2}'")));
|
||||
test('Turbo', "PG max_conn ($pgMax)", $pgMax >= 500, '');
|
||||
|
||||
$fpmWorkers = intval(trim(shell_exec("pgrep -c php-fpm 2>/dev/null")));
|
||||
test('Turbo', "PHP-FPM workers ($fpmWorkers)", $fpmWorkers >= 10, '');
|
||||
|
||||
if ($pg) pg_close($pg);
|
||||
|
||||
// RENDER
|
||||
$total = $pass + $fail;
|
||||
$rate = $total > 0 ? round($pass / $total * 100, 1) : 0;
|
||||
$elapsed = round(microtime(true) - $_start, 1);
|
||||
$sigma = $rate >= 99.4 ? '6s' : ($rate >= 97.7 ? '5s' : ($rate >= 93.3 ? '4s' : ($rate >= 84.1 ? '3s' : '2s')));
|
||||
$now = date('Y-m-d H:i:s');
|
||||
$cats = [];
|
||||
foreach ($tests as $t) { $cats[$t['cat']][] = $t; }
|
||||
?><!DOCTYPE html>
|
||||
<html><head><meta charset="utf-8"><title>WEVAL NonReg v6</title>
|
||||
<style>
|
||||
*{margin:0;padding:0;box-sizing:border-box}
|
||||
body{font-family:system-ui,-apple-system,sans-serif;background:#0a0e1a;color:#e2e8f0;padding:20px}
|
||||
.hdr{text-align:center;padding:30px 0;border-bottom:2px solid #1e293b;margin-bottom:30px}
|
||||
.hdr h1{font-size:28px;color:#22d3ee;margin-bottom:10px}
|
||||
.score{display:flex;justify-content:center;gap:40px;margin:20px 0}
|
||||
.score div{text-align:center}
|
||||
.score .num{font-size:48px;font-weight:900}
|
||||
.score .lbl{font-size:12px;color:#94a3b8;text-transform:uppercase}
|
||||
.pass .num{color:#10b981}.fail .num{color:#ef4444}.sigma .num{color:#f59e0b}
|
||||
.bar{height:8px;background:#1e293b;border-radius:4px;margin:20px auto;max-width:600px}
|
||||
.bar .fill{height:100%;border-radius:4px;background:linear-gradient(90deg,#ef4444,#f59e0b,#10b981);transition:width 1s}
|
||||
.cat{margin-bottom:20px}
|
||||
.cat-hdr{font-size:16px;font-weight:700;color:#94a3b8;padding:8px 12px;background:#111827;border-radius:8px;margin-bottom:8px}
|
||||
.cat-hdr .cnt{float:right;font-size:13px}
|
||||
.row{display:flex;align-items:center;padding:6px 12px;border-radius:4px;font-size:13px}
|
||||
.row:nth-child(even){background:rgba(255,255,255,0.02)}
|
||||
.row .icon{width:20px;text-align:center;margin-right:8px;font-size:14px}
|
||||
.row .name{flex:1;color:#cbd5e1}
|
||||
.row .detail{color:#64748b;font-size:11px;margin-left:10px}
|
||||
.ok .icon{color:#10b981}.ko .icon{color:#ef4444}
|
||||
.ts{text-align:center;color:#475569;font-size:11px;margin-top:30px}
|
||||
</style></head><body>
|
||||
<div class="hdr">
|
||||
<h1>WEVAL NONREG v6 - 4 Serveurs</h1>
|
||||
<div class="score">
|
||||
<div class="pass"><div class="num"><?=$pass?></div><div class="lbl">Pass</div></div>
|
||||
<div class="fail"><div class="num"><?=$fail?></div><div class="lbl">Fail</div></div>
|
||||
<div class="sigma"><div class="num"><?=$sigma?></div><div class="lbl">Sigma</div></div>
|
||||
<div><div class="num" style="color:#22d3ee"><?=$rate?>%</div><div class="lbl">Score</div></div>
|
||||
</div>
|
||||
<div class="bar"><div class="fill" style="width:<?=$rate?>%"></div></div>
|
||||
<div style="color:#64748b;font-size:12px"><?=$total?> tests | <?=$elapsed?>s scan | S95+S88+S151+S202</div>
|
||||
</div>
|
||||
<?php foreach ($cats as $catName => $catTests): $cp=0;$cf=0; foreach($catTests as $t){if($t['ok'])$cp++;else $cf++;} ?>
|
||||
<div class="cat">
|
||||
<div class="cat-hdr"><?=htmlspecialchars($catName)?> <span class="cnt" style="color:<?=$cf>0?'#ef4444':'#10b981'?>"><?=$cp?>/<?=($cp+$cf)?></span></div>
|
||||
<?php foreach ($catTests as $t): ?>
|
||||
<div class="row <?=$t['ok']?'ok':'ko'?>"><div class="icon"><?=$t['ok']?'✓':'✗'?></div><div class="name"><?=htmlspecialchars($t['name'])?></div><div class="detail"><?=htmlspecialchars($t['detail'])?></div></div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="ts">WEVAL Consulting - NonReg v6 - <?=$now?> - S95(95.216.167.89) S88(88.198.4.195) S151(151.80.235.110) S202(204.168.152.13)</div>
|
||||
</body></html>
|
||||
@@ -1,39 +0,0 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIG4wIBAAKCAYEA24nliNt6rPSdJKZ4xa8UUX+4Oc0fLjgxAEyXBEBOgMWC5/aa
|
||||
q6Tt5CuX32LJ3b2Z3zNhmEzZhmu/Q+sewzaUVjfNCbPs9Udq2+N12Iqwk00ClatF
|
||||
SgxTVv2quBX0ooTn4HS7kn+dubnNc4IC8q9Z30Rgsj8KS4Ua3a7XFSQuO0rhKoPg
|
||||
mymullxmw59L1ycK4X2/u1gvInSNqQHom4iyla121iSZGqF+C2fue2wmVU80kp3e
|
||||
3zPhNoCFSYZYRmq8kIxQU1WDuYsR4qysLxx47R4t3tgz/+R7MB0sWjDGQmxix4JZ
|
||||
Zqggkj9N7QRF5JqtghvWL4XPqe2mJcLKbyC+Wa7AhGCBpDjvfKP7LnoST/O1thvn
|
||||
duoHV6C1sGEdnWR6eztgWrW0F6tvAxJlypgQV5jjIe5CvwgBuxjd2+uUPqKO3CUs
|
||||
sp3OLfhdw7m1nOnN4/8DRY9twQDTeQiMSqptVU77ffYCWNVucIbK1uTdmPnZwdTC
|
||||
vC0kTZou80WUVdIdAgMBAAECggGAEelfS9o0WRYgGBRo+B//tWKJQlYE/D1jahXV
|
||||
oGgqv4Dd3FUXa3eqXRpdasFhnPDSNA66ILXsbXYvBbiSKvUyBxLIbMk8RQrNoiEd
|
||||
xUwTegEne9Scc50r04YgvqIz8mqLjJmZkCtPUA7jv0/VM72wxHGMvh48lcrHVVzl
|
||||
eXkZOIc0dcaKtb4h22ywibdedbBex+T9lqhsOBBwWmCofMAbafDcKD6WK0EPyphx
|
||||
MaqyOfWbYXb17xoJfuvfdA889onQr/7c+Dv3zAqns3ciGkiAzZg1KA74v9HLBUB6
|
||||
GE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Xq28DEmXKmBBXmOMh7kK/CAG7GN3b65Q+oo7cJSyync4t+F3DubWc6c3j/wNFj23BANN5CIxKqm1VTvt99gJY1W5whsrW5N2Y+dnB1MK8LSRNmi7zRZRV0h0= root@vmi1032897.contaboserver.net
|
||||
Reference in New Issue
Block a user