mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 10:37:39 -07:00
🔒 ♻️ Implement secure exec
wrapper functions.
This commit is contained in:
parent
6e13036780
commit
8e951ac72e
115 changed files with 1345 additions and 1986 deletions
|
@ -3,26 +3,20 @@
|
|||
error_reporting(NULL);
|
||||
session_start();
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
$v_domain = $_GET['domain'];
|
||||
$v_domain = escapeshellarg($_GET['domain']);
|
||||
if ($_GET['type'] == 'access') $type = 'access';
|
||||
if ($_GET['type'] == 'error') $type = 'error';
|
||||
|
||||
header("Cache-Control: public");
|
||||
header("Content-Description: File Transfer");
|
||||
header("Content-Disposition: attachment; filename=".$_GET['domain'].".".$type."-log.txt");
|
||||
header("Content-Type: application/octet-stream; ");
|
||||
header("Content-Type: application/octet-stream");
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
|
||||
$v_domain = escapeshellarg($_GET['domain']);
|
||||
if ($_GET['type'] == 'access') $type = 'access';
|
||||
if ($_GET['type'] == 'error') $type = 'error';
|
||||
|
||||
exec (VESTA_CMD."v-list-web-domain-".$type."log $user ".$v_domain." 5000", $output, $return_var);
|
||||
if ($return_var == 0 ) {
|
||||
foreach($output as $file) {
|
||||
echo $file . "\n";
|
||||
}
|
||||
$return_var = v_exec("v-list-web-domain-{$type}log", [$user, $v_domain, '5000'], false, $output);
|
||||
if ($return_var == 0) {
|
||||
echo $output . "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue