this is not an bencoded file

Started by ConYum, July 22, 2012, 09:46:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

elephant

#6
From the spec: "Bencoded strings are encoded as follows: <string length encoded in base ten ASCII>:<string data>, or key:value"

So no, if (preg_match('/^(\d+):/', $s, $m)) { does not need to be changed, since the string length will always be an unsigned integer.

Quote from: UniVeRsE on July 23, 2012, 04:32:39 PM
if (preg_match('/^(\d+):/', $s, $m)) {   

and

if (preg_match('/^i(\d+)e/', $s, $m)) { 

DarkWarrior

if (preg_match('/^(\d+):/', $s, $m)) {   

and

if (preg_match('/^i(\d+)e/', $s, $m)) { 

ConYum

Quote from: elephant on July 22, 2012, 10:13:12 PM
In benc.php line 87:
if (preg_match('/^i(\d+)e/', $s, $m)) {
change to:
if (preg_match('/^i(-{0,1}\d+)e/', $s, $m)) {

Thank you! That works perfect :D

Daniel

i have been curious about this bencode thing why does it give an error making an seedbox  note my tracker is public though  but when i created the torrent in my own pc it worked and then i made a folder on the seedbox in order to make it work from the seedbox really dont get it as it always have worked

thanks for your code elephant much apprichiated  ;D

elephant

In benc.php line 87:
if (preg_match('/^i(\d+)e/', $s, $m)) {
change to:
if (preg_match('/^i(-{0,1}\d+)e/', $s, $m)) {

ConYum

#1
hi, i know there was an topic at tbdev where there was an easy fix for the "this is not an bencoded file", tho, tbdev is down and i cant get that "help", so my thought was, that some one in here maybe know how to fix this ?

i know so much that the tracker cant handle negative numbers, but i dunno how to fix... surely its an easy fix.. if i know where to look :P

EDIT: Source; TBDev_2009_svn .

here is the old topic any way -->  http://www.tbdev.net/topic/25020-utorrents-v31-fix/ ...

is there a topic here already.. im sorry for making and new  :-[

Regards

Conyum