Bravo List
Register
Go Back   > Bravo List > Source Code > Trackers > Project U-232
Reply
  #1  
Old 19-10-08, 10:24
FAT's Avatar
FAT FAT is offline
Senior Member
 
Join Date: Sep 2008
Posts: 19
Default bad data from tracker - bad bencoded data
hi..
all my users who seed with seedbox and torrentflux get this error.
is there a fix?
thx
Reply With Quote
  #2  
Old 23-10-08, 19:29
Omen's Avatar
Omen Omen is offline
Senior Member
 
Join Date: Apr 2008
Hungary
Posts: 25
Default
This mistake occurred in me some solution would be good onto him
Reply With Quote
  #3  
Old 05-11-08, 19:34
Ashur's Avatar
Ashur Ashur is offline
Moderator
 
Join Date: Jun 2008
Posts: 523
Default
they need to import their browser cookies into torrentflux and it should work
i think found the solution somewhere on torrentflux forums long time ago so I hope this fix still works :)
__________________
Say NO to private tracking
Running TorrentHoster 2.5 on IraqiGate.org
Reply With Quote
  #4  
Old 20-07-16, 01:31
kira's Avatar
kira kira is offline
Senior Member
 
Join Date: Jul 2011
France
Posts: 69
Default
I've a same problem error Tracker: [Could not parse bencoded data]
an idea please ?
Reply With Quote
  #5  
Old 20-07-16, 12:55
DND's Avatar
DND DND is offline
Support
 
Join Date: Dec 2008
Posts: 1,020
Default
update benc.php file
__________________
Need HELP!? I can install:

  1. Server/VPS (Debian,CentOS,Ubuntu,Fedora, FreeBSD) Optimization and ... + Modules
  2. Webserver Windows/Linux (Apache/Lighttpd/Nginx/Mysql/PhpMyAdmin/SSL) Optimization and ... + Modules
  3. Seedbox Windows/Linux (uTorrent,rTorrent,libTorrent,ruTorrent) + Modules
  4. TBDev Support
  5. Gazelle Support Install
  6. TSSE Install Support
Reply With Quote
  #6  
Old 20-07-16, 23:03
kira's Avatar
kira kira is offline
Senior Member
 
Join Date: Jul 2011
France
Posts: 69
Default
I have no benc.php file, I am with u-232-v4
Reply With Quote
  #7  
Old 21-07-16, 00:15
UFFENO1's Avatar
UFFENO1 UFFENO1 is offline
Senior Member
 
Join Date: Sep 2008
P2P
Posts: 23
Post
include/class/class_bencodec.php
Reply With Quote
  #8  
Old 21-07-16, 00:23
kira's Avatar
kira kira is offline
Senior Member
 
Join Date: Jul 2011
France
Posts: 69
Default
OK, and what should I change ?
Reply With Quote
  #9  
Old 21-07-16, 13:24
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,045
Default
Quote:
Originally Posted by kira View Post
I have no benc.php file, I am with u-232-v4
then why are you posting in the Template Shares section?
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Managerô forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #10  
Old 22-07-16, 10:15
Napon's Avatar
Napon Napon is offline
Senior Member
 
Join Date: Feb 2016
P2P
Posts: 214
Thumbs up
use this benc.php

Code:
<?

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 hash_where_arr($name, $hash_arr) {
        $new_hash_arr = Array();
        foreach ($hash_arr as $hash) {
                $new_hash_arr[] = sqlesc((urldecode($hash)));
        }
        return $name." IN ( ".implode(", ",$new_hash_arr)." )";
}

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 bdec_file($f, $ms) {
    $fp = fopen($f, "rb");
    if (!$fp)
        return;
    $e = fread($fp, $ms);
    fclose($fp);
    return bdec($e);
}

function bdec($s) {
    if (preg_match('/^(\d+):/', $s, $m)) {
        $l = $m[1];
        $pl = strlen($l) + 1;
        $v = substr($s, $pl, $l);
        $ss = substr($s, 0, $pl + $l);
        if (strlen($v) != $l)
            return;
        return array(type => "string", value => $v, strlen => strlen($ss), string => $ss);
    }
    if (preg_match('/^i(\d+)e/', $s, $m)) {
        $v = $m[1];
        $ss = "i" . $v . "e";
        if ($v === "-0")
            return;
        if ($v[0] == "0" && strlen($v) != 1)
            return;
        return array(type => "integer", value => $v, strlen => strlen($ss), string => $ss);
    }
    switch ($s[0]) {
        case "l":
            return bdec_list($s);
        case "d":
            return bdec_dict($s);
        default:
            return;
    }
}

function bdec_list($s) {
    if ($s[0] != "l")
        return;
    $sl = strlen($s);
    $i = 1;
    $v = array();
    $ss = "l";
    for (;;) {
        if ($i >= $sl)
            return;
        if ($s[$i] == "e")
            break;
        $ret = bdec(substr($s, $i));
        if (!isset($ret) || !is_array($ret))
            return;
        $v[] = $ret;
        $i += $ret["strlen"];
        $ss .= $ret["string"];
    }
    $ss .= "e";
    return array(type => "list", value => $v, strlen => strlen($ss), string => $ss);
}

function bdec_dict($s) {
    if ($s[0] != "d")
        return;
    $sl = strlen($s);
    $i = 1;
    $v = array();
    $ss = "d";
    for (;;) {
        if ($i >= $sl)
            return;
        if ($s[$i] == "e")
            break;
        $ret = bdec(substr($s, $i));
        if (!isset($ret) || !is_array($ret) || $ret["type"] != "string")
            return;
        $k = $ret["value"];
        $i += $ret["strlen"];
        $ss .= $ret["string"];
        if ($i >= $sl)
            return;
        $ret = bdec(substr($s, $i));
        if (!isset($ret) || !is_array($ret))
            return;
        $v[$k] = $ret;
        $i += $ret["strlen"];
        $ss .= $ret["string"];
    }
    $ss .= "e";
    return array(type => "dictionary", value => $v, strlen => strlen($ss), string => $ss);
}

?>
Reply With Quote
Reply

Tags
bad , bencoded , data , tracker

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
TS SE v5.1 - Tracker sending invalid data lost91 Template Shares 12 16-01-12 18:13
Tracker: [Could not parse bencoded data] daffy phpMyBitTorrent (BT.Manager) 1 03-03-10 03:43
Tracker sending invalid data underx Template Shares 14 10-02-10 22:04
Tracker Sending Invalid Data pwnage phpMyBitTorrent (BT.Manager) 2 09-02-10 03:33
Tracker sending invalid data... crztz Template Shares 3 20-04-09 20:21



All times are GMT +2. The time now is 15:31. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2018, vBulletin Solutions Inc.