Skip to content

Instantly share code, notes, and snippets.

@vmrfriz
Created February 29, 2024 13:32
Show Gist options
  • Save vmrfriz/7d2a29213dbdd177170ae3f9b6c20b6a to your computer and use it in GitHub Desktop.
Save vmrfriz/7d2a29213dbdd177170ae3f9b6c20b6a to your computer and use it in GitHub Desktop.

1С-Битрикс: Аутентификация без пароля

  1. Поместить файл в корень.
  2. Перейти на странице example.com/php_auth.php
  3. Профит. Выполнен вход под первым пользователем, файл php_auth.php удален.
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
global $USER;
$USER->Authorize(1);
// shell_exec('rm '.__FILE__);
unlink(__FILE__);
header('Location: /bitrix/admin/index.php');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment