Removing private tracker patch TBDEV08

Started by greentide, August 17, 2012, 03:08:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

swizzles

#2
Quote from: greentide on August 17, 2012, 03:08:03 PM
Hey there,

I was wondering if any of you could help me... I need the instruction on how to remove private tracker patch on tbdev 08. I know the hack was on Tbdev's forum which is no longer available.

Hi greentide

This was the original post I believe for 09:


"Posted 27 February 2010 - 06:10 PM
all credit goes to the original creators of this code :)

open takeupload.php and find

unset($dict);



and comment out like

// unset($dict);



find

if (!in_array($ann, $TBDEV['announce_urls'], 1))
        stderr($lang['takeupload_failed'], sprintf($lang['takeupload_url'], $TBDEV['announce_urls'][0]));




and comment out like so

//if (!in_array($ann, $TBDEV['announce_urls'], 1))
        //stderr($lang['takeupload_failed'], sprintf($lang['takeupload_url'], $TBDEV['announce_urls'][0]));




find

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




and directly above it add

$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

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



and replace with

//move_uploaded_file($tmpname, "{$TBDEV['torrent_dir']}/$id.torrent");
        $fp = fopen("{$TBDEV['torrent_dir']}/$id.torrent", "w");
if ($fp)
{
@fwrite($fp, benc($dict), strlen(benc($dict)));
fclose($fp);
}




now open file announce.php and find

if($_GET['compact'] != 1)

{

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

}

else

{

$resp = "d" . benc_str("interval") . "i" . $TBDEV['announce_interval'] ."e" . benc_str("min interval") . "i" . 300 ."e5:"."peers" ;

}



and replace with

if($_GET['compact'] != 1)

{

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

}

else

{

$resp = "d" . benc_str("interval") . "i" . $TBDEV['announce_interval'] ."e" . benc_str("private") . 'i1e'. benc_str("min interval") . "i" . 300 ."e5:"."peers" ;
}



and thats it done

if your having problems with info hash ect you may need to add the following

in bittorrent.php add

/////////Strip slashes by system//////////
function cleanquotes(&$in){
        if(is_array($in)) return array_walk($in,'cleanquotes');
        return $in=stripslashes($in);
}
if(get_magic_quotes_gpc()){
        array_walk($_GET,'cleanquotes');
        array_walk($_POST,'cleanquotes');
        array_walk($_COOKIE,'cleanquotes');
        array_walk($_REQUEST,'cleanquotes');
}
/////////Strip slashes by system//////////



add a .htaccess file to root with

php_flag magic_quotes_gpc off


added to it

This post has been edited by FreakyNutz: 06 October 2010 - 08:48 AM"

Remember this was as it was posted by FreakyNutz

I hope this helps  :)

greentide

Hey there,

I was wondering if any of you could help me... I need the instruction on how to remove private tracker patch on tbdev 08. I know the hack was on Tbdev's forum which is no longer available.