blob: f15a43e97f40e4127cd46057b06264d185fcfdf6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php";
if (isset($_GET['_']) && strpos($_GET['_'], "/") === false) {
$arg = $_GET['_'];
} else {
die();
}
$webs = scandir("/mnt/minteckrolt-cloud");
if (in_array($arg, $webs)) {
$token = "madm-" . bin2hex(random_bytes(24));
file_put_contents("/mnt/minteckrolt-cloud/" . $arg . "/data/tokens/" . $token, "");
setcookie("_NEUTRON_ADMIN_TOKEN", $token, 0, "/", ".minteck.ro.lt", true, true);
header("Location: https://cloud.minteck.ro.lt/" . $arg . "/cms-special/admin/#/home");
die();
}
die("Unable to calculate data usage");
|