Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=109)
-   -   09 Private Tracker Patch (http://www.bvlist.com/showthread.php?t=8956)

Chez 5th March 2013 10:13

09 Private Tracker Patch
 
Credits to Laffin.

takeupload.php find and delete


PHP Code:

if (!in_array($ann$TBDEV['announce_urls'], 1))

 
bark("invalid announce url! must be <b>" $TBDEV['announce_urls'][0] . "</b>"); 

find and delete


PHP Code:

unset($dict); 


find


PHP Code:

$infohash pack("H*"sha1($info["string"])); 

above it add


PHP Code:

$dict['value']['announce']=bdec(benc_str($TBDEV['announce_urls'][0] )); // change announce url to local

$dict['value']['info']['value']['private']=bdec('i1e'); // add private tracker flag

$dict['value']['info']['value']['source']=bdec(benc_str"{$TBDEV['baseurl']} {$TBDEV['site_name']}")); // add link for bitcomet users

unset($dict['value']['announce-list']); // remove multi-tracker capability

unset($dict['value']['nodes']); // remove cached peers (Bitcomet & Azareus)

$dict=bdec(benc($dict)); // double up on the becoding solves the occassional misgenerated infohash 

list($ann$info) = dict_check($dict"announce(string):info"); 

find


PHP Code:

move_uploaded_file($tmpname"{$TBDEV['torrent_dir']}/$id.torrent"); 

replace with


PHP Code:

$fp fopen("{$TBDEV['torrent_dir']}/$id.torrent""w");

if (
$fp)

{

 @
fwrite($fpbenc($dict), strlen(benc($dict)));

 
fclose($fp);




announce.php find


PHP Code:

$resp "d" benc_str("interval") . "i" $TBDEV['announce_interval'] . "e" benc_str("peers") . "l"

and replace with


PHP Code:

$resp "d" benc_str("interval") . "i" $TBDEV['announce_interval'] . "e" benc_str("private") . 'i1e' benc_str("peers") . "l"



All times are GMT +2. The time now is 07:29.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.