Files
html/api/nonreg-runner.php
2026-04-12 22:57:03 +02:00

28 lines
884 B
PHP

<?php
// === WEVAL SECRETS LOADER ===
$_WEVAL_SECRETS = [];
if (file_exists('/etc/weval/secrets.env')) {
foreach (file('/etc/weval/secrets.env', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) as $line) {
if (strpos($line, '#') === 0) continue;
if (strpos($line, '=') !== false) {
list($k, $v) = explode('=', $line, 2);
$_WEVAL_SECRETS[trim($k)] = trim($v);
}
}
}
function weval_secret($key, $default='') {
global $_WEVAL_SECRETS;
return $_WEVAL_SECRETS[$key] ?? getenv($key) ?: $default;
}
ignore_user_abort(true);
set_time_limit(300);
ob_start();
$_GET["k"]=weval_secret('CX_KEY','WEVADS2026');
$_SERVER["REMOTE_ADDR"]="127.0.0.1";
include "/var/www/html/api/nonreg-opus.php";
$out = ob_get_clean();
file_put_contents("/tmp/nonreg-result.txt", $out);
file_put_contents("/tmp/nonreg-done.txt", "DONE ".date("H:i:s"));