This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
public static function load(): void { | |
global $DB; | |
$ip = self::$rules_exclude;//например '111.111.111.111' | |
\CModule::IncludeModule('security'); | |
$query_exec = <<<EOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Откройте файл /bitrix/modules/security/admin/security_403.php удалите все или закомментируйте | |
2. Далее в админке переходим Рабочий стол / Настройки / Проактивная защита / Защита административного раздела = Выключить защиту | |
3. Возвращаем содержимое /bitrix/modules/security/admin/security_403.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); | |
global $USER; | |
$USER->Authorize(1); | |
header('Location: /bitrix/admin/'); | |
unlink(__FILE__); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
//В файл /bitrix/tools/vote/uf.php перед required | |
// Добавляем: | |
$request = \Bitrix\Main\Context::getCurrent()->getRequest(); | |
if ( $request ->isPost()) { | |
CHTTP::SetStatus( "404 Not Found" ); | |
@define( "ERROR_404" , "Y" ); | |
die (); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
function file_get_contents_curl($url) | |
{ | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
$data = curl_exec($ch); | |
curl_close($ch); | |
return $data; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
'log' => array ( | |
'settings' => array ( | |
'file' => 'bitrix/modules/error.log', | |
'log_size' => 1000000, | |
), | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Тестирование ошибок. Возвращаем заголовок | |
header('HTTP/1.1 503 Service Temporarily Unavailable'); | |
header('Retry-After: 300'); | |
#Чтобы nginx ловил ошибки бэка (апача) | |
proxy_intercept_errors on; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// https://dev.1c-bitrix.ru/api_d7/bitrix/main/diag/debug/index.php | |
\Bitrix\Main\Diag\Debug::dumpToFile($variable, $varName = '__'.date('d.m.Y H:i:s'), $fileName = ''); | |
//вардампим через file_put_contents | |
ob_start(); | |
echo "page_type=".$page_type; | |
var_dump($_SERVER); | |
$out = ob_get_contents(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var params = window.location.search.replace('?','').split('&').reduce( | |
function(p,e){ | |
var a = e.split('='); | |
p[ decodeURIComponent(a[0])] = decodeURIComponent(a[1]); | |
return p; | |
}, | |
{} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://docs.madelineproto.xyz/docs/LOGIN.html#getting-permission-to-use-the-telegram-api | |
//https://github.com/danog/MadelineProto | |
//https://docs.telethon.dev/en/stable/# | |
//https://ru.stackoverflow.com/questions/688356/%D0%94%D0%BE%D1%81%D1%82%D0%B0%D1%82%D1%8C-%D0%B2%D1%81%D0%B5-%D1%81%D0%BE%D0%BE%D0%B1%D1%89%D0%B5%D0%BD%D0%B8%D1%8F-%D1%81-%D0%BF%D1%83%D0%B1%D0%BB%D0%B8%D1%87%D0%BD%D0%BE%D0%B3%D0%BE-%D1%87%D0%B0%D1%82%D0%B0-telegram |
OlderNewer