WebSurfer80 Posted August 7, 2006 Report Posted August 7, 2006 Hi, does anyone know the format for the .torrent files?i want to make a program that reads a torrent file and checks which parts of the files that i have are correct and which parts are not. i don't want to make a bittorrent client, i want to use it as a file checker.So if anyone can help me out with the structure of the file, i'd be greatfull.P.S. when i say structure of the file i mean, for example: announceurl - X bytes, date - X bytes, .....Thanx in advance....
WebSurfer80 Posted August 7, 2006 Author Report Posted August 7, 2006 Thanx, but that's not what i'm looking for. as i said i'm not going to make a client, so i don't care about the protocol. i only want to make a program just to check what parts of a file are correct, so i only need the format of the torrent file.i.e. i only want to implement the checking part of utorrent (open .torrent file, check for file parts i have) and that's it.
masa Posted August 8, 2006 Report Posted August 8, 2006 http://www.bittorrent.org/protocol.html[...]Metainfo files are bencoded dictionaries with the following keys:[..]
WebSurfer80 Posted August 8, 2006 Author Report Posted August 8, 2006 ok thanx, that helped a little. i was aiming for more detailed information, so if anyone has any please reply.thanx again..
masa Posted August 8, 2006 Report Posted August 8, 2006 Did you read that site? I'm not programmer but it seems to describe .torrent files pretty well.
WebSurfer80 Posted August 8, 2006 Author Report Posted August 8, 2006 [ quote removed by moderator ]yes i've read the site, but i need more information. if you were a programmer you would see why that's not enougth.but thanx for help..
masa Posted August 8, 2006 Report Posted August 8, 2006 This part I'm referring:Metainfo files are bencoded dictionaries with the following keys:announceThe URL of the tracker.infoThis maps to a dictionary, with keys described below.The name key maps to a string which is the suggested name to save the file (or directory) as. It is purely advisory.piece length maps to the number of bytes in each piece the file is split into. For the purposes of transfer, files are split into fixed-size pieces which are all the same length except for possibly the last one which may be truncated. piece length is almost always a power of two, most commonly 2 18 = 256 K (BitTorrent prior to version 3.2 uses 2 20 = 1 M as default).pieces maps to a string whose length is a multiple of 20. It is to be subdivided into strings of length 20, each of which is the SHA1 hash of the piece at the corresponding index.There is also a key length or a key files, but not both or neither. If length is present then the download represents a single file, otherwise it represents a set of files which go in a directory structure.In the single file case, length maps to the length of the file in bytes.For the purposes of the other keys, the multi-file case is treated as only having a single file by concatenating the files in the order they appear in the files list. The files list is the value files maps to, and is a list of dictionaries containing the following keys:length - The length of the file, in bytes.path - A list of strings corresponding to subdirectory names, the last of which is the actual file name (a zero length list is an error case).In the single file case, the name key is the name of a file, in the muliple file case, it's the name of a directory.This does not describe the .torrent file? What else do you want to know?For bencode format, see http://en.wikipedia.org/wiki/Bencode
WebSurfer80 Posted August 8, 2006 Author Report Posted August 8, 2006 thanx very much, that helps alot. :D
Ultima Posted August 9, 2006 Report Posted August 9, 2006 Erm... that's exactly what was at the site... are you sure you even read it...? I'm not sure why someone has to post it directly on the forums for it to count... -.-
WebSurfer80 Posted August 9, 2006 Author Report Posted August 9, 2006 the page that helped me was http://en.wikipedia.org/wiki/Bencode not the information from the www.bittorrent.org site. the first site gives details, were the second doesn't.
schnurlos Posted August 10, 2006 Report Posted August 10, 2006 Yeah, and if you check the links on bencode page, you come back to bittorrent.org.You should read the posts, and not only the direct links we give. Also the links on the page and subpages are readable.Try to read, and make your life easier (and ours too). :/
WebSurfer80 Posted August 10, 2006 Author Report Posted August 10, 2006 sorry about that. i got what i need. you can close this topic now.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.