diff --git a/core/lib/Core/Helpers/DDosProtection.class.php b/core/lib/Core/Helpers/DDosProtection.class.php index 5ac6d07..d9d2cac 100644 --- a/core/lib/Core/Helpers/DDosProtection.class.php +++ b/core/lib/Core/Helpers/DDosProtection.class.php @@ -23,6 +23,7 @@ namespace Core\Helpers; + use Core\CoreException; use Core\DataBases\DB; /** @@ -94,7 +95,11 @@ $item = $DB->getItem(self::TABLE, ['observed_key' => $this->observedKey]); if ($item) { if ($item['attempts'] >= $item['attempts_limit'] && (time() - $item['last_active']) <= $item['time_interval']) { - die('DDoS protected active'); + echo '
'; + echo 'You are temporarily blocked (DDoS Guard))
'; + echo 'Due to a large number of requests, you are temporarily blocked.
If this happened by mistake, contact the resource administrator.
'; + echo '
'; + die(); } $DB->update(self::TABLE, ['id' => $item['id']], ['attempts' => ++$item['attempts'], 'last_active' => time()]);