C:\laragon\www\pentor.ru\src\Legacy\Torrent.php
if (isset($bt_v1)) {
$info_hash = hash('sha1', \Arokettu\Bencode\Bencode::encode($info), true);
$info_hash_sql = rtrim(DB()->escape($info_hash), ' ');
$info_hash_where = "WHERE info_hash = '$info_hash_sql'";
}
// Getting info_hash v2
if (isset($bt_v2)) {
$info_hash_v2 = hash('sha256', \Arokettu\Bencode\Bencode::encode($info), true);
$info_hash_v2_sql = rtrim(DB()->escape($info_hash_v2), ' ');
$info_hash_where = "WHERE info_hash_v2 = '$info_hash_v2_sql'";
}
// Ocelot
if ($bb_cfg['ocelot']['enabled']) {
self::ocelot_update_tracker('add_torrent', ['info_hash' => rawurlencode($info_hash ?? hex2bin(substr($v2_hash, 0, 40))), 'id' => $topic_id, 'freetorrent' => 0]);
}
if ($row = DB()->fetch_row("SELECT topic_id FROM " . BB_BT_TORRENTS . " $info_hash_where LIMIT 1")) {
$msg = sprintf($lang['BT_REG_FAIL_SAME_HASH'], TOPIC_URL . $row['topic_id']);
bb_die($msg);
set_die_append_msg($forum_id, $topic_id);
}
$totallen = 0;
if (isset($info['length'])) {
$totallen = (float)$info['length'];
} elseif (isset($bt_v1, $info['files']) && !isset($bt_v2) && \is_array($info['files'])) {
foreach ($info['files'] as $fn => $f) {
// Exclude padding files
if (($f['attr'] ?? null) !== 'p') {
if (isset($f['length']) && is_numeric($f['length'])) {
$totallen += $f['length'];
} else {
self::torrent_error_exit($lang['TORFILE_INVALID']);
}
}
}
$totallen = (float)$totallen;
Arguments
"Undefined array key "BT_REG_FAIL_SAME_HASH""
C:\laragon\www\pentor.ru\src\Legacy\Torrent.php
if (isset($bt_v1)) {
$info_hash = hash('sha1', \Arokettu\Bencode\Bencode::encode($info), true);
$info_hash_sql = rtrim(DB()->escape($info_hash), ' ');
$info_hash_where = "WHERE info_hash = '$info_hash_sql'";
}
// Getting info_hash v2
if (isset($bt_v2)) {
$info_hash_v2 = hash('sha256', \Arokettu\Bencode\Bencode::encode($info), true);
$info_hash_v2_sql = rtrim(DB()->escape($info_hash_v2), ' ');
$info_hash_where = "WHERE info_hash_v2 = '$info_hash_v2_sql'";
}
// Ocelot
if ($bb_cfg['ocelot']['enabled']) {
self::ocelot_update_tracker('add_torrent', ['info_hash' => rawurlencode($info_hash ?? hex2bin(substr($v2_hash, 0, 40))), 'id' => $topic_id, 'freetorrent' => 0]);
}
if ($row = DB()->fetch_row("SELECT topic_id FROM " . BB_BT_TORRENTS . " $info_hash_where LIMIT 1")) {
$msg = sprintf($lang['BT_REG_FAIL_SAME_HASH'], TOPIC_URL . $row['topic_id']);
bb_die($msg);
set_die_append_msg($forum_id, $topic_id);
}
$totallen = 0;
if (isset($info['length'])) {
$totallen = (float)$info['length'];
} elseif (isset($bt_v1, $info['files']) && !isset($bt_v2) && \is_array($info['files'])) {
foreach ($info['files'] as $fn => $f) {
// Exclude padding files
if (($f['attr'] ?? null) !== 'p') {
if (isset($f['length']) && is_numeric($f['length'])) {
$totallen += $f['length'];
} else {
self::torrent_error_exit($lang['TORFILE_INVALID']);
}
}
}
$totallen = (float)$totallen;
Arguments
2
"Undefined array key "BT_REG_FAIL_SAME_HASH""
"C:\laragon\www\pentor.ru\src\Legacy\Torrent.php"
396
C:\laragon\www\pentor.ru\library\includes\cron\jobs\nnmclub_copy_releases.php
DB()->sql_query("INSERT INTO ". BB_ATTACHMENTS_DESC ."
(physical_filename, real_filename, extension, mimetype, filesize, filetime)
VALUES
('". $torfile['physical_filename'] ."', '". $torfile['real_filename'] ."', 'torrent', 'application/x-bittorrent', '". $torfile['filesize'] ."', ". $time .")");
$attach_id = DB()->sql_nextid();
DB()->sql_query("INSERT INTO ". BB_ATTACHMENTS ."
(attach_id, post_id, user_id_1)
VALUES
($attach_id, $post_id, ". $user_id .")");
DB()->sql_query("UPDATE ". BB_FORUMS ." SET
forum_posts = forum_posts + 1,
forum_last_post_id = $post_id,
forum_topics = forum_topics + 1
WHERE forum_id = $forum_id");
DB()->sql_query("UPDATE nnmclub_releases SET time = ". TIMENOW ." WHERE title = '$subject'");
\TorrentPier\Legacy\Torrent::tracker_register($attach_id, '2', TOR_APPROVED);
}
Arguments
C:\laragon\www\pentor.ru\library\includes\cron\jobs\nnmclub_copy_releases.php
$info_hash_v2 = hash('sha256', \Arokettu\Bencode\Bencode::encode($tor['info']), true);
$info_hash_v2_sql = rtrim(DB()->escape($info_hash_v2), ' ');
$info_hash_where = "WHERE info_hash_v2 = '$info_hash_v2_sql'";
if($row = DB()->fetch_row("SELECT topic_id FROM ". BB_BT_TORRENTS . " $info_hash_where LIMIT 1")) {
DB()->sql_query("UPDATE nnmclub_releases SET time = ". TIMENOW ." WHERE title = '$subject'");
} else {
$new_name = md5($subject);
$file = fopen("$attach_dir/$new_name.torrent", 'w');
fputs($file, $torrent);
fclose($file);
$torfile = array(
'physical_filename' => addslashes("$new_name.torrent"),
'real_filename' => addslashes("nnmclub-{$sql[$i]['id']}"),
'filesize' => (int)filesize("$attach_dir/$new_name.torrent"),
);
submit_torrent_nnm($subject, $message, $sql[$i]['forum_new'], $torfile, (TIMENOW + $i), $sql[$i]['user_id']);
}
} else {
$content = iconv('windows-1251', 'UTF-8', $torrent);
if(preg_match("#лимит скачиваний#siu", $content)) {
DB()->sql_query("UPDATE nnmclub_users SET time = ". TIMENOW ." WHERE login = '{$users[$j]}'");
$j = ($j + 1);
$i = ($i - 1);
} else {
DB()->sql_query("UPDATE nnmclub_releases SET time = ". TIMENOW ." WHERE title = '$subject'");
}
}
unset($tor);
} else {
DB()->sql_query("UPDATE nnmclub_releases SET time = ". TIMENOW ." WHERE title = '$subject'");
}
unset($curl);
}
}
Arguments
"Журнал | Моделист-конструктор №11 (ноябрь 2023) [PDF]"
"[img=right]https://i3.imageban.ru/out/2023/12/02/a22e7bb67dfcfebb4acc6ce7e5b9c464.jpg[/img]\n[b]Издательство:[/b] АО «Редакция журнала «Моделист-конструктор»\n[b]Жанр:[/b] Научно-технический журнал\n\n[b]Формат:[/b] PDF\n[b]Качество:[/b] Обработанный скан\n[b]Иллюстрации:[/b] Черно-белые\n\n[b]Описание:[/b]\n«Моделист-конструктор» — ежемесячный отечественный популярный научно-технический журнал. Издаётся с августа 1962 года. В каждом номере журнала публикуются чертежи и схемы самых разнообразных конструкций — от приспособлений для домашнего хозяйства до самодельных микроавтомобилей и любительских самолётов, а также материалы по истории техники и движению самодеятельных конструкторов в стране и за рубежом. Авторами журнала являются как известные изобретатели и конструкторы, так и просто любители техники и народные умельцы.\n\n[b]Скриншоты:[/b]\n[img]https://i.imgur.com/uEcKUVw.jpg[/img] [img]https://i.imgur.com/gV0ltxE.jpg[/img] [img]https://i.imgur.com/QbdDTL9.jpg[/img] [img]https://i.imgur.com/leKcPkt.jpg[/img]"
"125"
array:3 [
"physical_filename" => "b39dbd5617452f2f150f33077d274b8a.torrent"
"real_filename" => "nnmclub-1681205"
"filesize" => 20509
]
1710833198
"5"
C:\laragon\www\pentor.ru\library\includes\cron\cron_run.php
$cron_write_log = (CRON_LOG_ENABLED && (CRON_FORCE_LOG || $job['log_enabled'] >= 1));
$cron_sql_log_file = CRON_LOG_DIR . '/SQL-' . basename($job['cron_script']);
if ($cron_write_log) {
$msg = [];
$msg[] = 'start';
$msg[] = date('m-d');
$msg[] = date('H:i:s');
$msg[] = sprintf('%05d', getmypid());
$msg[] = $job['cron_title'];
$msg = implode(LOG_SEPR, $msg);
bb_log($msg . LOG_LF, CRON_LOG_DIR . '/' . CRON_LOG_FILE);
}
if ($job['log_sql_queries']) {
DB()->log_next_query(100000, $cron_sql_log_file);
}
set_time_limit(600);
require($job_script);
if ($job['log_sql_queries']) {
DB()->log_next_query(0);
bb_log(LOG_LF, $cron_sql_log_file);
}
if ($cron_write_log) {
$msg = [];
$msg[] = ' end';
$msg[] = date('m-d');
$msg[] = date('H:i:s');
$msg[] = sprintf('%05d', getmypid());
$msg[] = round(utime() - $cron_start_time) . '/' . round(utime() - TIMESTART) . ' sec';
$msg = implode(LOG_SEPR, $msg);
$msg .= LOG_LF . '------=-------=----------=------=-------=----------';
bb_log($msg . LOG_LF, CRON_LOG_DIR . '/' . CRON_LOG_FILE);
if ($cron_runtime_log) {
$runtime_log_file = ($job['log_file']) ?: $job['cron_script'];
bb_log($cron_runtime_log . LOG_LF, CRON_LOG_DIR . '/' . basename($runtime_log_file));
Arguments
"C:\laragon\www\pentor.ru\library\includes\cron\jobs\nnmclub_copy_releases.php"
C:\laragon\www\pentor.ru\library\includes\cron\cron_check.php
// Get cron jobs
$cron_jobs = DB()->fetch_rowset("
SELECT * FROM " . BB_CRON . "
WHERE cron_active = 1
AND next_run <= NOW()
ORDER BY run_order
");
// Run cron jobs
if ($cron_jobs) {
bb_log(date('H:i:s - ') . getmypid() . ' --x- RUN jobs' . LOG_LF, CRON_LOG_DIR . '/cron_check');
foreach ($cron_jobs as $job) {
if ($job['disable_board']) {
TorrentPier\Helpers\CronHelper::disableBoard();
break;
}
}
require(CRON_DIR . 'cron_run.php');
// Update cron_last_check
bb_update_config(['cron_last_check' => TIMENOW + 10]);
} else {
bb_log(date('H:i:s - ') . getmypid() . ' --x- no active jobs found ----------------------------------------------' . LOG_LF, CRON_LOG_DIR . '/cron_check');
}
Arguments
"C:\laragon\www\pentor.ru\library\includes\cron\cron_run.php"
C:\laragon\www\pentor.ru\library\includes\init_bb.php
bb_log(date('H:i:s - ') . getmypid() . ' -x-- DB-LOCK try' . LOG_LF, CRON_LOG_DIR . '/cron_check');
if (DB()->get_lock('cron', 1)) {
bb_log(date('H:i:s - ') . getmypid() . ' --x- DB-LOCK OBTAINED !!!!!!!!!!!!!!!!!' . LOG_LF, CRON_LOG_DIR . '/cron_check');
/** Run cron */
if (TorrentPier\Helpers\CronHelper::hasFileLock()) {
/** снятие файловой блокировки */
register_shutdown_function(function () {
TorrentPier\Helpers\CronHelper::releaseLockFile();
});
/** разблокировка форума */
register_shutdown_function(function () {
TorrentPier\Helpers\CronHelper::enableBoard();
});
TorrentPier\Helpers\CronHelper::trackRunning('start');
require(CRON_DIR . 'cron_check.php');
TorrentPier\Helpers\CronHelper::trackRunning('end');
}
if (defined('IN_CRON')) {
bb_log(date('H:i:s - ') . getmypid() . ' --x- ALL jobs FINISHED *************************************************' . LOG_LF, CRON_LOG_DIR . '/cron_check');
}
DB()->release_lock('cron');
}
}
}
/**
* Exit if board is disabled via trigger
*/
if (($bb_cfg['board_disable'] || is_file(BB_DISABLED)) && !defined('IN_ADMIN') && !defined('IN_AJAX') && !defined('IN_LOGIN')) {
http_response_code(503);
if ($bb_cfg['board_disable']) {
// admin lock
Arguments
"C:\laragon\www\pentor.ru\library\includes\cron\cron_check.php"
C:\laragon\www\pentor.ru\common.php
{
return ltrim(str_replace(BB_PATH, '', $path), '/\\');
}
function sys(string $param)
{
switch ($param) {
case 'mem':
return memory_get_usage();
case 'mem_peak':
return memory_get_peak_usage();
default:
trigger_error("invalid param: $param", E_USER_ERROR);
}
}
// Initialization
if (!defined('IN_TRACKER')) {
// Init board
require_once INC_DIR . '/init_bb.php';
} else {
define('DUMMY_PEER', pack('Nn', \TorrentPier\Helpers\IPHelper::ip2long($_SERVER['REMOTE_ADDR']), !empty($_GET['port']) ? (int)$_GET['port'] : random_int(1000, 65000)));
define('PEER_HASH_EXPIRE', round($bb_cfg['announce_interval'] * (0.85 * $bb_cfg['tracker']['expire_factor'])));
define('PEERS_LIST_EXPIRE', round($bb_cfg['announce_interval'] * 0.7));
define('SCRAPE_LIST_EXPIRE', round($bb_cfg['scrape_interval'] * 0.7));
define('PEER_HASH_PREFIX', 'peer_');
define('PEERS_LIST_PREFIX', 'peers_list_');
define('SCRAPE_LIST_PREFIX', 'scrape_list_');
// Init tracker
require_once BB_PATH . '/bt/includes/init_tr.php';
header('Content-Type: text/plain');
header('Pragma: no-cache');
if (!defined('IN_ADMIN')) {
// Exit if tracker is disabled via ON/OFF trigger
if (is_file(BB_DISABLED)) {
Arguments
"C:\laragon\www\pentor.ru\library\includes\init_bb.php"
C:\laragon\www\pentor.ru\index.php
<?php
/**
* TorrentPier – Bull-powered BitTorrent tracker engine
*
* @copyright Copyright (c) 2005-2024 TorrentPier (https://torrentpier.com)
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
*/
define('BB_SCRIPT', 'index');
require __DIR__ . '/common.php';
$page_cfg['load_tpl_vars'] = [
'post_icons'
];
// Show last topic
$show_last_topic = true;
$last_topic_max_len = 28;
// Show online stats
$show_online_users = true;
// Show subforums
$show_subforums = true;
$datastore->enqueue([
'stats',
'moderators',
'cat_forums'
]);
if ($bb_cfg['show_latest_news']) {
$datastore->enqueue('latest_news');
}
if ($bb_cfg['show_network_news']) {
$datastore->enqueue('network_news');
}
Arguments
"C:\laragon\www\pentor.ru\common.php"