|
| 1 | +torreadwrite 0.20150709 |
| 2 | +VL-LUG |
| 3 | + |
| 4 | + URL: http://www.linuxdv.org/wiki/projects/torrents_editor |
| 5 | + SRC: http://linuxdv.ru/forum/download/file.php?id=28 |
| 6 | + |
| 7 | + |
| 8 | +BUILD |
| 9 | + |
| 10 | +$ bash build.sh |
| 11 | + |
| 12 | +INSTALL |
| 13 | + |
| 14 | +$ sudo cp torread /usr/bin |
| 15 | +$ sudo cp torwrite /usr/bin |
| 16 | +$ sudo cp torreadwrite.1.gz /usr/share/man/man1 |
| 17 | +$ sudo ln -s /usr/share/man/man1/torreadwrite.1.gz /usr/share/man/man1/torread.1.gz |
| 18 | +$ sudo ln -s /usr/share/man/man1/torreadwrite.1.gz /usr/share/man/man1/torwrite.1.gz |
| 19 | + |
| 20 | +SAMPLE |
| 21 | + |
| 22 | +$ torread samplefile.torrent > samplefile.torrent.txt |
| 23 | +$ nano samplefile.torrent.txt |
| 24 | + |
| 25 | +$ torwrite samplefile.torrent.txt > samplefile.mod.torrent |
| 26 | + |
| 27 | +STRUCTURE |
| 28 | + |
| 29 | +Content torrent file |
| 30 | + |
| 31 | +Content torrent file is encoded as described above. Himself torrent file is bencoded dictionary with the following keys: |
| 32 | + |
| 33 | + info: a dictionary describing the files in the torrent. There are two forms of the dictionary, the first to the torrent that contains only one file, and the second - for multi file torrent. |
| 34 | + announce: string with a URL of the tracker. |
| 35 | + announce-list: (optional) list of lists, each of which contains a string with a URL of the tracker. |
| 36 | + creation date: (optional) integer - the creation of a torrent in seconds era UNIX (number of seconds since 00:00:00 01/01/1970). |
| 37 | + comment: (optional) string with an arbitrary comment. |
| 38 | + created by: (optional) string with the name and version of the created torrent file program. |
| 39 | + encoding: (optional) any string of unknown purpose. |
| 40 | + |
| 41 | +In beztrekernom torrent announce and no announce-list, but instead there is an element nodes, which is a list of lists, each of which contains a line with the address and the number of nodes - the port number. Something like nodes = [[«<host>», <port>], [«<host>», <port>], ...]. The simplest option - nodes = [[«127.0.0.1», 6881]]. |
| 42 | + |
| 43 | +Dictionary info |
| 44 | + |
| 45 | +The parameters are the same for single-file and multi-file torrents. |
| 46 | + |
| 47 | + piece length: number of bytes in a piece, usually a power of two. |
| 48 | + pieces: a string of united 20-byte SHA1 hash pieces. |
| 49 | + private: (optional) number. If it is one, the customer to search for peers to be used only tracker (s) specified in the torrent file. If this number is zero, the customer can add peers any methods: manually, or via DHT and Peer Exchange t. D. |
| 50 | + |
| 51 | +For single file torrents: |
| 52 | + |
| 53 | + name: string filename. |
| 54 | + length: the number of bytes in the file. |
| 55 | + md5sum: (optional) string MD5 sums file. Fucking useless. |
| 56 | + |
| 57 | +For multi file torrent: |
| 58 | + |
| 59 | + name: string with the name of the directory where all files will be placed. |
| 60 | + files: a list of dictionaries, one for each file. Each dictionary contains the following keys: |
| 61 | + length: the number of bytes in the file. |
| 62 | + md5sum: (optional) string MD5 sums file. Fuck no one needs, as in the previous case. |
| 63 | + path: a list of one or more lines, representing together a file path. The last line - the name of the file, the previous - the sequence of nested directories. For example, the path «dir1 / dir2 / file.ext» will be presented in a list of three lines: «dir1», «dir2», «file.ext». |
0 commit comments