Сборка REDL: панель на PHP 8, капча-тумблер, закрытые уязвимости, установщики в один клик
- панель работает на PHP 8.4 (оригинал под PHP 7.0): elFinder utf8_encode, apache_get_modules, warnings - капча выключена и управляется из админки (флаг captcha_enable + блок настроек) - закрыты две SQL-инъекции без авторизации (createAuthLog: пароль из POST и CF-Connecting-IP) - убрано хранение паролей в открытом виде в authlog, XSS в поле ref - установщики install-panel.sh и install-node.sh (оригинальный затирал sources.list репозиториями Debian 9) - современный Dockerfile (оригинальный на debian:stretch больше не собирается) - планировщик и автозапуск работают без systemd - брендинг REDL.IO, год 2026, ссылки на redl.io - документация на русском: ИЗМЕНЕНИЯ, БЕЗОПАСНОСТЬ, ИНСТРУКЦИЯ
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/*
|
||||
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
|
||||
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
|
||||
*/
|
||||
?>
|
||||
<?php echo $admheader ?>
|
||||
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
|
||||
<div class="d-flex flex-column-fluid">
|
||||
<div class="container">
|
||||
<div class="card card-custom">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
<h3 class="card-label">Создание локации
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form id="createForm" method="POST">
|
||||
<div class="form-group form-md-line-input">
|
||||
<label>Введите название локации</label>
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="Введите название локации">
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<label>Введите IP (Который видит пользователь)</label>
|
||||
<input type="text" class="form-control" id="ip2" name="ip2" placeholder="Введите IP (Который видит пользователь)">
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<label>Введите IP (По которому подключаются)</label>
|
||||
<input type="text" class="form-control" id="ip" name="ip" placeholder="Введите IP (По которому подключаются)">
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<label>Введите имя пользователя</label>
|
||||
<input type="text" class="form-control" id="user" name="user" placeholder="Введите имя пользователя">
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<label>Пароль</label>
|
||||
<input type="text" class="form-control" id="password" name="password" placeholder="Пароль">
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<label>Повторите пароль</label>
|
||||
<input type="text" class="form-control" id="password2" name="password2" placeholder="Повторите пароль">
|
||||
</div>
|
||||
<hr>
|
||||
<input type="submit" name="otp" class="btn btn-primary m-btn m-btn--air btn-outline btn-block sbold uppercase" value="Сохранить">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#createForm').ajaxForm({
|
||||
url: '/admin/locations/create/ajax',
|
||||
dataType: 'text',
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
data = $.parseJSON(data);
|
||||
switch(data.status) {
|
||||
case 'error':
|
||||
toastr.error(data.error);
|
||||
$('button[type=submit]').prop('disabled', false);
|
||||
break;
|
||||
case 'success':
|
||||
toastr.success(data.success);
|
||||
setTimeout("redirect('/admin/locations')", 1500);
|
||||
break;
|
||||
}
|
||||
},
|
||||
beforeSubmit: function(arr, $form, options) {
|
||||
$('button[type=submit]').prop('disabled', true);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php echo $footer ?>
|
||||
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
/*
|
||||
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
|
||||
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
|
||||
*/
|
||||
?>
|
||||
<?php echo $admheader ?>
|
||||
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
|
||||
<div class="d-flex flex-column-fluid">
|
||||
<div class="container">
|
||||
<div class="card card-custom">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
<h3 class="card-label">Редактирование локации
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form id="editForm" method="POST">
|
||||
<div class="form-group form-md-line-input">
|
||||
<label>Введите название локации</label>
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="Введите название локации" value="<?php echo $location['location_name'] ?>">
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<label>Введите IP (Который видит пользователь)</label>
|
||||
<input type="text" class="form-control" id="ip2" name="ip2" placeholder="Введите IP (Который видит пользователь)" value="<?php echo $location['location_ip2'] ?>">
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<label>Введите IP (По которому подключаются)</label>
|
||||
<input type="text" class="form-control" id="ip" name="ip" placeholder="Введите IP (По которому подключаются)" value="<?php echo $location['location_ip'] ?>">
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<label>Введите имя пользователя</label>
|
||||
<input type="text" class="form-control" id="user" name="user" placeholder="Введите имя пользователя" value="<?php echo $location['location_user'] ?>">
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<label>Введите ID игр для которых будет доступна локация (через пробел)</label>
|
||||
<input type="text" class="form-control" id="location_games" name="location_games" placeholder="Введите ID игр для которых будет доступна локация (через пробел)" value="<?php echo $location['location_games'] ?>">
|
||||
</div>
|
||||
<hr>
|
||||
<div class="card card-body" style="margin-bottom: 1rem;padding: 1rem;">
|
||||
<div class="form-group" style="margin-bottom: 0rem;">
|
||||
<div class="checkbox-list">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" id="editpassword" name="editpassword" onChange="togglePassword()">
|
||||
<span></span>
|
||||
Изменить пароль
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<label>Пароль</label>
|
||||
<input type="password" class="form-control" id="password" name="password" placeholder="Пароль" disabled>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input">
|
||||
<label>Повторите пароль</label>
|
||||
<input type="password" class="form-control" id="password2" name="password2" placeholder="Повторите пароль" disabled>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-group form-md-line-input">
|
||||
<label>Выберите статус локации</label>
|
||||
<select class="form-control" id="status" name="status" aria-required="true" aria-invalid="false" aria-describedby="delivery-error">
|
||||
<option value="1"<?php if($location['location_status'] == 1): ?> selected="selected"<?php endif; ?>>Включена</option>
|
||||
<option value="0"<?php if($location['location_status'] == 0): ?> selected="selected"<?php endif; ?>>Выключена</option>
|
||||
</select>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="m-btn-group m-btn-group--pill btn-group m-btn-group m-btn-group--pill btn-block" role="group" aria-label="Large button group">
|
||||
<button type="submit" class="btn btn-primary btn-outline btn-block sbold uppercase">Сохранить изменения</button>
|
||||
<a data-toggle="tooltip" data-placement="right" title="" data-original-title="Удалить" style="height: 3.1rem;" href="/admin/locations/edit/delete/<?php echo $location['location_id'] ?>" class="btn btn-danger btn-elevate btn-icon"><i class="fa fa-trash-alt"></i></a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#editForm').ajaxForm({
|
||||
url: '/admin/locations/edit/ajax/<?php echo $location['location_id'] ?>',
|
||||
dataType: 'text',
|
||||
success: function(data) {
|
||||
console.log(data);
|
||||
data = $.parseJSON(data);
|
||||
switch(data.status) {
|
||||
case 'error':
|
||||
toastr.error(data.error);
|
||||
$('button[type=submit]').prop('disabled', false);
|
||||
break;
|
||||
case 'success':
|
||||
toastr.success(data.success);
|
||||
setTimeout("redirect('/admin/locations')", 1500);
|
||||
break;
|
||||
}
|
||||
},
|
||||
beforeSubmit: function(arr, $form, options) {
|
||||
$('button[type=submit]').prop('disabled', true);
|
||||
}
|
||||
});
|
||||
|
||||
function togglePassword() {
|
||||
var status = $('#editpassword').is(':checked');
|
||||
if(status) {
|
||||
$('#password').prop('disabled', false);
|
||||
$('#password2').prop('disabled', false);
|
||||
} else {
|
||||
$('#password').prop('disabled', true);
|
||||
$('#password2').prop('disabled', true);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php echo $footer ?>
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/*
|
||||
Copyright (c) 2020 HOSTINPL (HOSTING-RUS) https://vk.com/hosting_rus
|
||||
Developed by Samir Shelenko and Alexander Zemlyanoy (https://vk.com/id00v / https://vk.com/mrsasha082)
|
||||
*/
|
||||
?>
|
||||
<?php echo $admheader ?>
|
||||
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
|
||||
<div class="d-flex flex-column-fluid">
|
||||
<div class="container">
|
||||
<div class="card card-custom">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
<h3 class="card-label">Список локаций
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-toolbar">
|
||||
<a href="/admin/locations/create" class="btn btn-sm btn-icon btn-light-primary" data-toggle="tooltip" data-placement="right" title="" data-original-title="Добавить локацию">
|
||||
<i class="flaticon2-add-square"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" style="padding: 0rem 1rem;">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-head-custom table-vertical-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><i class="fa fa-list-ol"></i></th>
|
||||
<th>Статус</th>
|
||||
<th>Название</th>
|
||||
<th>IP</th>
|
||||
<th>CPU</th>
|
||||
<th>RAM</th>
|
||||
<th>SSD</th>
|
||||
<th>Обновлено в</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($locations as $item): ?>
|
||||
<tr onClick="redirect('/admin/locations/edit/index/<?php echo $item['location_id'] ?>')">
|
||||
<th scope="row"><?php echo $item['location_id'] ?></th>
|
||||
<td>
|
||||
<?php if($item['location_status'] == 0): ?>
|
||||
<span class="badge badge-danger">Выключена</span>
|
||||
<?php elseif($item['location_status'] == 1): ?>
|
||||
<span class="badge badge-success">Включена</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php echo $item['location_name'] ?></td>
|
||||
<td><?php echo $item['location_ip'] ?></td>
|
||||
<td><?php echo $item['location_cpu'] ?>%</td>
|
||||
<td><?php echo $item['location_ram'] ?>%</td>
|
||||
<td><?php echo $item['location_hdd'] ?>%</td>
|
||||
<td><?php echo date("H:i:s", strtotime($item['location_upd'])) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php if(empty($locations)): ?>
|
||||
<tr>
|
||||
<td colspan="9" class="text-center">На данный момент нет локаций.</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php echo $pagination ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $footer ?>
|
||||
Reference in New Issue
Block a user