This commit is contained in:
Roman Kelesidis 2023-09-07 18:29:50 +07:00
commit 3c503c981f
3 changed files with 27 additions and 41 deletions

View file

@ -10,6 +10,7 @@
define('IN_TRACKER', true);
define('BB_ROOT', './../');
require dirname(__DIR__) . '/common.php';
require __DIR__ . '/includes/init_tr.php';
global $bb_cfg;
@ -39,19 +40,6 @@ if (strlen($info_hash) == 32) {
msg_die('Invalid info_hash');
}
function msg_die($msg)
{
$output = \SandFox\Bencode\Bencode::encode([
'min interval' => (int)1800,
'failure reason' => (string)$msg,
'warning message' => (string)$msg,
]);
die($output);
}
require __DIR__ . '/includes/init_tr.php';
$info_hash_sql = rtrim(DB()->escape($info_hash), ' ');
/**
* Поскольку торрент-клиенты в настоящее время обрезают инфо-хэш до 20 символов (независимо от его типа, как известно v1 = 20 символов, а v2 = 32 символа),