diff --git a/src/includes/shell_exec.php b/src/includes/shell_exec.php index b967b59..06b1ab4 100644 --- a/src/includes/shell_exec.php +++ b/src/includes/shell_exec.php @@ -17,7 +17,7 @@ if ($cmd === '') { } // Restrict dangerous commands for safety -$blacklist = ['rm', 'shutdown', 'reboot', 'passwd', 'dd', ':(){']; +$blacklist = $CONFIG['blacklist_commands']; foreach ($blacklist as $bad) { if (stripos($cmd, $bad) !== false) { echo json_encode(['output' => "⚠️ Command '$bad' not allowed"]); @@ -30,7 +30,7 @@ $descriptor = [ 1 => ['pipe', 'w'], 2 => ['pipe', 'w'] ]; -$process = proc_open($cmd, $descriptor, $pipes, '/home'); +$process = proc_open($cmd, $descriptor, $pipes, $CONFIG['default_dir']); if (is_resource($process)) { $output = stream_get_contents($pipes[1]); $error = stream_get_contents($pipes[2]); diff --git a/src/js/app.js b/src/js/app.js index 28ef086..c6a69f1 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -68,7 +68,7 @@ document.addEventListener('DOMContentLoaded', () => { }); await checkAdmin(); - setInterval(checkAdmin, 30000); + setInterval(checkAdmin, CONFIG.index_admin_status_update_interval); })(); // --- Page loader --- diff --git a/src/js/home.js b/src/js/home.js index 2035871..743efe9 100644 --- a/src/js/home.js +++ b/src/js/home.js @@ -60,9 +60,9 @@ document.addEventListener('page-loaded', e => { } // Color thresholds - if (numVal >= 85) { + if (numVal >= CONFIG.home_chart_color_threshold_high) { elements[key].className = 'high'; - } else if (numVal >= 75) { + } else if (numVal >= CONFIG.home_chart_color_threshold_medium) { elements[key].className = 'medium'; } else { elements[key].className = 'low';