Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   d14:failure reason47:torrent not registered with this tracker (http://www.bvlist.com/showthread.php?t=9235)

boss28604 18th June 2013 19:26

Quote:

Originally Posted by firefly007 (Post 41185)
include 'incloud/config.php';

?

must be

include 'include/config.php';

require_once("include/config.php");

Invalid Passkeye uTorrent

firefly007 18th June 2013 19:30

ITS WORKING NOW!! check browse

boss28604 18th June 2013 19:40

Quote:

Originally Posted by firefly007 (Post 41187)
please try this announce.php, edit db setting and url


PHP Code:

<?php
/*
+------------------------------------------------
|   TBDev.net BitTorrent Tracker PHP
|   =============================================
|   by CoLdFuSiOn
|   (c) 2003 - 2009 TBDev.Net
|   http://www.tbdev.net
|   =============================================
|   svn: http://sourceforge.net/projects/tbdevnet/
|   Licence Info: GPL
+------------------------------------------------
|   $Date$
|   $Revision$
|   $Author$
|   $URL$
+------------------------------------------------
*/
error_reporting(0);
////////////////// GLOBAL VARIABLES ////////////////////////////    
$TBDEV['baseurl'] = 'http://ninjacentral.tk';
$TBDEV['announce_interval'] = 60 30;
$TBDEV['user_ratios'] = 0;
$TBDEV['connectable_check'] = 0;
define ('UC_VIP'2);
// DB setup
$TBDEV['mysql_host'] = "localhost";
$TBDEV['mysql_user'] = "root";
$TBDEV['mysql_pass'] = "****"/// Db password
$TBDEV['mysql_db']   = "****"/// name of db
////////////////// GLOBAL VARIABLES ////////////////////////////

// DO NOT EDIT BELOW UNLESS YOU KNOW WHAT YOU'RE DOING!!

$agent $_SERVER["HTTP_USER_AGENT"];

// Deny access made with a browser...
if (
    
ereg("^Mozilla\\/"$agent) || 
    
ereg("^Opera\\/"$agent) || 
    
ereg("^Links "$agent) || 
    
ereg("^Lynx\\/"$agent) || 
    isset(
$_SERVER['HTTP_COOKIE']) || 
    isset(
$_SERVER['HTTP_ACCEPT_LANGUAGE']) || 
    isset(
$_SERVER['HTTP_ACCEPT_CHARSET'])
    )
    
err("torrent not registered with this tracker CODE 1");

/////////////////////// FUNCTION DEFS ///////////////////////////////////
function dbconn()
{
    global 
$TBDEV;

    if (!@
mysql_connect($TBDEV['mysql_host'], $TBDEV['mysql_user'], $TBDEV['mysql_pass']))
    {
      
err('Please call back later');
    }
    
mysql_select_db($TBDEV['mysql_db']) or err('Please call back later');
}

function 
err($msg)
{
    
benc_resp(array('failure reason' => array('type' => 'string''value' => $msg)));
    
    exit();
}

function 
benc_resp($d)
{
    
benc_resp_raw(benc(array('type' => 'dictionary''value' => $d)));
}

function 
benc_resp_raw($x)
{
    
header"Content-Type: text/plain" );
    
header"Pragma: no-cache" );

    if ( 
$_SERVER['HTTP_ACCEPT_ENCODING'] == 'gzip' )
    {
        
header"Content-Encoding: gzip" );
        echo 
gzencode$x9FORCE_GZIP );
    }
    else
        echo 
$x ;
}

function 
benc($obj) {
    if (!
is_array($obj) || !isset($obj["type"]) || !isset($obj["value"]))
        return;
    
$c $obj["value"];
    switch (
$obj["type"]) {
        case 
"string":
            return 
benc_str($c);
        case 
"integer":
            return 
benc_int($c);
        case 
"list":
            return 
benc_list($c);
        case 
"dictionary":
            return 
benc_dict($c);
        default:
            return;
    }
}

function 
benc_str($s) {
    return 
strlen($s) . ":$s";
}

function 
benc_int($i) {
    return 
"i" $i "e";
}

function 
benc_list($a) {
    
$s "l";
    foreach (
$a as $e) {
        
$s .= benc($e);
    }
    
$s .= "e";
    return 
$s;
}

function 
benc_dict($d) {
    
$s "d";
    
$keys array_keys($d);
    
sort($keys);
    foreach (
$keys as $k) {
        
$v $d[$k];
        
$s .= benc_str($k);
        
$s .= benc($v);
    }
    
$s .= "e";
    return 
$s;
}

function 
hash_where($name$hash) {
    
$shhash preg_replace('/ *$/s'""$hash);
    return 
"($name = " sqlesc($hash) . " OR $name = " sqlesc($shhash) . ")";
}

function 
sqlesc($x) {
    return 
"'".mysql_real_escape_string($x)."'";
}

function 
portblacklisted($port)
{
    
// direct connect
    
if ($port >= 411 && $port <= 413) return true;

    
// bittorrent
    
if ($port >= 6881 && $port <= 6889) return true;

    
// kazaa
    
if ($port == 1214) return true;

    
// gnutella
    
if ($port >= 6346 && $port <= 6347) return true;

    
// emule
    
if ($port == 4662) return true;

    
// winmx
    
if ($port == 6699) return true;

    return 
false;
}
/////////////////////// FUNCTION DEFS END ///////////////////////////////

$parts = array();
$pattern '[0-9a-fA-F]{32}';
if( !isset(
$_GET['passkey']) OR !ereg($pattern$_GET['passkey'], $parts) ) 
        
err("Invalid Passkey");
    else
        
$GLOBALS['passkey'] = $parts[0];
        
foreach (array(
"info_hash","peer_id","event","ip","localip") as $x
{
if(isset(
$_GET["$x"]))
$GLOBALS[$x] = "" $_GET[$x];
}

foreach (array(
"port","downloaded","uploaded","left") as $x)
{
$GLOBALS[$x] = $_GET[$x];
}


foreach (array(
"passkey","info_hash","peer_id","port","downloaded","uploaded","left") as $x)

if (!isset(
$x)) err("Missing key: $x");



foreach (array(
"info_hash","peer_id") as $x)

if (
strlen($GLOBALS[$x]) != 20err("Invalid $x (" strlen($GLOBALS[$x]) . " - " urlencode($GLOBALS[$x]) . ")");

unset(
$x);

$info_hash bin2hex($info_hash);

$ip $_SERVER['REMOTE_ADDR'];

$port $port;
$downloaded $downloaded;
$uploaded $uploaded;
$left $left;

$rsize 50;
foreach(array(
"num want""numwant""num_want") as $k)
{
    if (isset(
$_GET[$k]))
    {
        
$rsize $_GET[$k];
        break;
    }
}


if (!
$port || $port 0xffff)
    
err("invalid port");

if (!isset(
$event))
    
$event "";

$seeder = ($left == 0) ? "yes" "no";

dbconn();


$user_query mysql_query("SELECT id, uploaded, downloaded, class, enabled FROM users WHERE passkey=".sqlesc($passkey)) or err("Tracker error 2");

if ( 
mysql_num_rows($user_query) != )

 
err("Unknown passkey. Please redownload the torrent from {$TBDEV['baseurl']}.");
 
    
$user mysql_fetch_assoc($user_query);
    if( 
$user['enabled'] == 'no' err('Permission denied, you\'re not enabled');
    
    
$res mysql_query("SELECT id, banned, seeders + leechers AS numpeers, added AS ts FROM torrents WHERE info_hash = " .sqlesc($info_hash));//" . hash_where("info_hash", $info_hash));

$torrent mysql_fetch_assoc($res);
if (!
$torrent)
    
err("torrent not registered with this tracker CODE 2");

$torrentid $torrent["id"];

$fields "seeder, peer_id, ip, port, uploaded, downloaded, userid";

$numpeers $torrent["numpeers"];
$limit "";
if (
$numpeers $rsize)
    
$limit "ORDER BY RAND() LIMIT $rsize";
$res mysql_query("SELECT $fields FROM peers WHERE torrent = $torrentid AND connectable = 'yes' $limit");

//////////////////// START NEW COMPACT MODE/////////////////////////////

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" ;

}

$peer = array();

$peer_num 0;
while (
$row mysql_fetch_assoc($res))

{

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

{



$row["peer_id"] = str_pad($row["peer_id"], 20);



if (
$row["peer_id"] === $peer_id)

{

 
$self $row;

 continue;

}



$resp .= "d" .

 
benc_str("ip") . benc_str($row["ip"]);

       if (!
$_GET['no_peer_id']) {

  
$resp .= benc_str("peer id") . benc_str($row["peer_id"]);

 }

 
$resp .= benc_str("port") . "i" $row["port"] . "e" .

 
"e";

      }

      else

      {

         
$peer_ip explode('.'$row["ip"]);

$peer_ip pack("C*"$peer_ip[0], $peer_ip[1], $peer_ip[2], $peer_ip[3]);

$peer_port pack("n*", (int)$row["port"]);

$time intval((time() % 7680) / 60);

if(
$_GET['left'] == 0)

{

$time += 128;

}

$time pack("C"$time);



   
$peer[] = $time $peer_ip $peer_port;

$peer_num++;


      }

}



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

$resp .= "ee";

else

{
$o "";
for(
$i=0;$i<$peer_num;$i++)

 {

  
$o .= substr($peer[$i], 16);

 }

$resp .= strlen($o) . ':' $o 'e';

}

$selfwhere "torrent = $torrentid AND " hash_where("peer_id"$peer_id);

///////////////////////////// END NEW COMPACT MODE////////////////////////////////



if (!isset($self))
{
    
$res mysql_query("SELECT $fields FROM peers WHERE $selfwhere");
    
$row mysql_fetch_assoc($res);
    if (
$row)
    {
        
$userid $row["userid"];
        
$self $row;
    }
}

//// Up/down stats ////////////////////////////////////////////////////////////



if (!isset($self))

{

$valid = @mysql_fetch_row(@mysql_query("SELECT COUNT(*) FROM peers WHERE torrent=$torrentid AND passkey=" sqlesc($passkey)));

if (
$valid[0] >= && $seeder == 'no'err("Connection limit exceeded! You may only leech from one location at a time.");

if (
$valid[0] >= && $seeder == 'yes'err("Connection limit exceeded!");


    if (
$left && $user['class'] < UC_VIP && $TBDEV['user_ratios'])
    {
        
$gigs $user["uploaded"] / (1024*1024*1024);
        
$elapsed floor((time() - $torrent["ts"]) / 3600);
        
$ratio = (($user["downloaded"] > 0) ? ($user["uploaded"] / $user["downloaded"]) : 1);
        if (
$ratio 0.5 || $gigs 5$wait 48;
        elseif (
$ratio 0.65 || $gigs 6.5$wait 24;
        elseif (
$ratio 0.8 || $gigs 8$wait 12;
        elseif (
$ratio 0.95 || $gigs 9.5$wait 6;
        else 
$wait 0;
        if (
$elapsed $wait)
                
err("Not authorized (" . ($wait $elapsed) . "h) - READ THE FAQ!");
    }
}
else
{
    
$upthis max(0$uploaded $self["uploaded"]);
    
$downthis max(0$downloaded $self["downloaded"]);

    if (
$upthis || $downthis 0)
        
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=".$user['id']) or err("Tracker error 3");
}

///////////////////////////////////////////////////////////////////////////////


$updateset = array();

if (
$event == "stopped")
{
    if (isset(
$self))
    {
        
mysql_query("DELETE FROM peers WHERE $selfwhere");
        if (
mysql_affected_rows())
        {
            if (
$self["seeder"] == "yes")
                
$updateset[] = "seeders = seeders - 1";
            else
                
$updateset[] = "leechers = leechers - 1";
        }
    }
}
else
{
    if (
$event == "completed")
        
$updateset[] = "times_completed = times_completed + 1";

    if (isset(
$self))
    {
        
mysql_query("UPDATE peers SET uploaded = $uploaded, downloaded = $downloaded, to_go = $left, last_action = ".time().", seeder = '$seeder'"
            
. ($seeder == "yes" && $self["seeder"] != $seeder ", finishedat = " time() : "") . " WHERE $selfwhere");
        if (
mysql_affected_rows() && $self["seeder"] != $seeder)
        {
            if (
$seeder == "yes")
            {
                
$updateset[] = "seeders = seeders + 1";
                
$updateset[] = "leechers = leechers - 1";
            }
            else
            {
                
$updateset[] = "seeders = seeders - 1";
                
$updateset[] = "leechers = leechers + 1";
            }
        }
    }
    else
    {
        if (
$event != "started")
            
err("Peer not found. ".$passkey." Restart the torrent.");

        if (
portblacklisted($port))
        {
            
err("Port $port is blacklisted.");
        }
        elseif ( 
$TBDEV['connectable_check'] )
        {
            
$sockres = @fsockopen($ip$port$errno$errstr5);
            if (!
$sockres)
                
$connectable "no";
            else
            {
                
$connectable "yes";
                @
fclose($sockres);
            }
        }
        else
        {
      
$connectable 'yes';
        }

        
$ret mysql_query("INSERT INTO peers (connectable, torrent, peer_id, ip, port, uploaded, downloaded, to_go, started, last_action, seeder, userid, agent, passkey) VALUES ('$connectable', $torrentid, " sqlesc($peer_id) . ", " sqlesc($ip) . ", $port$uploaded$downloaded$left, ".time().", ".time().", '$seeder', {$user['id']}, " sqlesc($agent) . "," sqlesc($passkey) . ")");
        
        if (
$ret)
        {
            if (
$seeder == "yes")
                
$updateset[] = "seeders = seeders + 1";
            else
                
$updateset[] = "leechers = leechers + 1";
        }
    }
}

if (
$seeder == "yes")
{
    if (
$torrent["banned"] != "yes")
        
$updateset[] = "visible = 'yes'";
    
$updateset[] = "last_action = ".time();
}

if (
count($updateset))
    
mysql_query("UPDATE torrents SET " join(","$updateset) . " WHERE id = $torrentid");

benc_resp_raw($resp);



?>

Bump: And you need to bring the torrent down again once you have downloaded it

Bump:

ITS WORKING NOW!! check browse

http://upic.me/i/zr/47untitled.png

firefly007 18th June 2013 19:42

Bring the torrent down to seed !!!

Once you have uploaded the torrent click on it to download, then when the box pops up click on the two dots to open up the tree.. then locate the file on your drive and click ok.. The torrent will check and then seed!!!

boss28604 18th June 2013 19:56

connection limit exceeded uTorrent

Asked another question.

Sign up not's confirmation to email

firefly007 18th June 2013 20:11

Quote:

Originally Posted by boss28604 (Post 41190)
connection limit exceeded uTorrent

Asked another question.

Sign up not's confirmation to email

Quote:

connection limit exceeded uTorrent
You need to edit your announce to allow multi seeds from same ip

Quote:

Sign up not's confirmation to email
Use this takesignup.php, This should auto confirm users when sighning up.

takesignup.php

PHP Code:

<?php
/*
+------------------------------------------------
|   TBDev.net BitTorrent Tracker PHP
|   =============================================
|   by CoLdFuSiOn
|   (c) 2003 - 2009 TBDev.Net
|   http://www.tbdev.net
|   =============================================
|   svn: http://sourceforge.net/projects/tbdevnet/
|   Licence Info: GPL
+------------------------------------------------
|   $Date$
|   $Revision$
|   $Author$
|   $URL$
+------------------------------------------------
*/

require_once "include/bittorrent.php";
require_once 
"include/password_functions.php";

dbconn();

    
$lang array_mergeload_language('global'), load_language('takesignup') );
    
    
$res mysql_query("SELECT COUNT(*) FROM users") or sqlerr(__FILE____LINE__);
    
$arr mysql_fetch_row($res);
    
    if (
$arr[0] >= $TBDEV['maxusers'])
      
stderr($lang['takesignup_error'], $lang['takesignup_limit']);

//if (!mkglobal("wantusername:wantpassword:passagain:email:captcha"))
//    die();
    
foreach( array('wantusername','wantpassword','passagain','email','captcha') as $x )
    {
      if( !isset(
$_POST$x ]) )
      {
        
stderr($lang['takesignup_user_error'], $lang['takesignup_form_data']);
      }
      
      ${
$x} = $_POST$x ];
    }

    
session_start();
    
    if(empty(
$captcha) || $_SESSION['captcha_id'] != strtoupper($captcha))
    {
        
header('Location: signup.php');
        exit();
    }


function 
validusername($username)
  {
    global 
$lang;
    
    if (
$username == "")
      return 
false;
    
    
$namelength strlen($username);
    
    if( (
$namelength 3) OR ($namelength 32) )
    {
      
stderr($lang['takesignup_user_error'], $lang['takesignup_username_length']);
    }
    
// The following characters are allowed in user names
    
$allowedchars $lang['takesignup_allowed_chars'];
    
    for (
$i 0$i $namelength; ++$i)
    {
      if (
strpos($allowedchars$username[$i]) === false)
        return 
false;
    }
    
    return 
true;
  }
/*
function isportopen($port)
{
    $sd = @fsockopen($_SERVER["REMOTE_ADDR"], $port, $errno, $errstr, 1);
    if ($sd)
    {
        fclose($sd);
        return true;
    }
    else
        return false;
}

function isproxy()
{
    $ports = array(80, 88, 1075, 1080, 1180, 1182, 2282, 3128, 3332, 5490, 6588, 7033, 7441, 8000, 8080, 8085, 8090, 8095, 8100, 8105, 8110, 8888, 22788);
    for ($i = 0; $i < count($ports); ++$i)
        if (isportopen($ports[$i])) return true;
    return false;
}
*/
    
if (empty($wantusername) || empty($wantpassword) || empty($email))
      
stderr($lang['takesignup_user_error'], $lang['takesignup_blank']);
    
/*
    if (strlen($wantusername) > 12)
      bark("Sorry, username is too long (max is 12 chars)");
    */
    
if ($wantpassword != $passagain)
      
stderr($lang['takesignup_user_error'], $lang['takesignup_nomatch']);

    if (
strlen($wantpassword) < 6)
      
stderr($lang['takesignup_user_error'], $lang['takesignup_pass_short']);

    if (
strlen($wantpassword) > 40)
      
stderr($lang['takesignup_user_error'], $lang['takesignup_pass_long']);

    if (
$wantpassword == $wantusername)
      
stderr($lang['takesignup_user_error'], $lang['takesignup_same']);

    if (!
validemail($email))
      
stderr($lang['takesignup_user_error'], $lang['takesignup_validemail']);

    if (!
validusername($wantusername))
      
stderr($lang['takesignup_user_error'], $lang['takesignup_invalidname']);

    
// make sure user agrees to everything...
    
if ($_POST["rulesverify"] != "yes" || $_POST["faqverify"] != "yes" || $_POST["ageverify"] != "yes")
      
stderr($lang['takesignup_failed'], $lang['takesignup_qualify']);

    
// check if email addy is already in use
    
$a = (@mysql_fetch_row(@mysql_query("select count(*) from users where email='$email'"))) or die(mysql_error());
    if (
$a[0] != 0)
      
stderr($lang['takesignup_user_error'], $lang['takesignup_email_used']);

    
// TIMEZONE STUFF
    
if(isset($_POST["user_timezone"]) && preg_match('#^\-?\d{1,2}(?:\.\d{1,2})?$#'$_POST['user_timezone']))
    {
    
$time_offset sqlesc($_POST['user_timezone']);
    }
    else
    { 
$time_offset = isset($TBDEV['time_offset']) ? sqlesc($TBDEV['time_offset']) : '0'; }
    
// have a stab at getting dst parameter?
    
$dst_in_use localtime(time() + ($time_offset 3600), true);
    
// TIMEZONE STUFF END

    
$secret mksecret();
    
$wantpasshash make_passhash$secretmd5($wantpassword) );
    
$editsecret = ( !$arr[0] ? "" make_passhash_login_key() );

    
$ret mysql_query("INSERT INTO users (username, passhash, secret, editsecret, email, status, ". (!$arr[0]?"class, ":"") ."added, time_offset, dst_in_use) VALUES (" .
        
implode(","array_map("sqlesc", array($wantusername$wantpasshash$secret$editsecret$email, (!$arr[0]?'confirmed':'confirmed')))).
        
", ". (!$arr[0]?UC_SYSOP.", ":""). ""time() ." , $time_offset{$dst_in_use['tm_isdst']})");

    if (!
$ret
    {
      if (
mysql_errno() == 1062)
        
stderr($lang['takesignup_user_error'], $lang['takesignup_user_exists']);
      
stderr($lang['takesignup_user_error'], $lang['takesignup_fatal_error']);
    }

    
$id mysql_insert_id();

//write_log("User account $id ($wantusername) was created");

    
$psecret $editsecret//md5($editsecret);

    
$body str_replace(array('<#SITENAME#>''<#USEREMAIL#>''<#IP_ADDRESS#>''<#REG_LINK#>'),
                        array(
$TBDEV['site_name'], $email$_SERVER['REMOTE_ADDR'], "{$TBDEV['baseurl']}/confirm.php?id=$id&secret=$psecret"),
                        
$lang['takesignup_email_body']);

    if(
$arr[0])
      
mail($email"{$TBDEV['site_name']} {$lang['takesignup_confirm']}"$body"{$lang['takesignup_from']} {$TBDEV['site_email']}");
    else 
      
logincookie($id$wantpasshash);

    
header("Refresh: 0; url=ok.php?type=". (!$arr[0]?"sysop":("signup&email=" urlencode($email))));

?>


boss28604 18th June 2013 20:17

You need to edit your announce to allow multi seeds from same ip

Edit announce.php

-----------------------------------------------------------------------------------

i'm create Torrent

http://119.59.97.74/2010/announce.php

Failure: Invalid Passkey not's seed

firefly007 18th June 2013 20:25

Quote:

Originally Posted by boss28604 (Post 41192)
You need to edit your announce to allow multi seeds from same ip

Edit announce.php

-----------------------------------------------------------------------------------

i'm create Torrent

http://119.59.97.74/2010/announce.php

Failure: Invalid Passkey not's seed

Do you have teamviewer? If not get and install...

boss28604 18th June 2013 20:28

Quote:

Originally Posted by firefly007 (Post 41193)
Do you have teamviewer? If not get and install...

ID : 873 554 309

Pass : 123456

Bump: new connect

firefly007 18th June 2013 22:47

Lost connection, but the tracker is working... All you need to do is to bring down your torrent and locate the content you want to seed.


All times are GMT +2. The time now is 00:54.

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