This forum has been archived. All content is frozen. Please use KDE Discuss instead.

anybody in the mood to yap about metadata?

Tags: None
(comma "," separated)
eric235u
Registered Member
Posts
23
Karma
0
hi all. just out of curiosity, there's a couple of things i don't understand and wondered if somebody here could enlighten me.

1. if i want to know the hash of a torrent, from what i've found on-line, "...calculates the SHA1 hash of the torrents info field and stores this in the info_hash property...". so info_hash is SHA1 of the 'info' subsection of the metadata file?

2. i understand bencoded section but what's all the strange characters afterward?
Code: Select all
d8:announce44:http://tpb.tracker.thepiratebay.org/announce8:comments66:boston linux & unix user group - hacking the linux kernel 2006111510:created by14:KTorrent 2.1.413:creation datei1180097234e4:infod6:lengthi296825011e4:name16:blu_20061115.ogg12:piece lengthi262144e6:pieces22660:�%��l�C���H������y�0ϼ�����"���?8rO���   /���?�Q�;J��in0�߬iM����NfXiYh��R�
�iw/�IГ��5�~�c�IH���~��0.���hͪ��Oa���s/�$��Q<Q�c$'���(Q�u�K����i�;��Ě9�`AB%�n�h   ��i�g�%l��T��Ъ�G7��;���������a�~���RT��T�咿g-X���V<��6���G��:�a�Ï��I����B����`����|oj�B����yvc&�����w+�o   �ّ)����4����{���lgq\�fM3yT}�Ɠ,o���#}al���Y����8v���Q��`��<D¤A1�"/ڡ3���_����L����S`a����!�1�ҙU�W@,�C�PO��5 ��  (and so on...)
i'll guess binary data?

3. in the ktorrent log i can see the scrape being done. the url takes the form of,
Code: Select all
http://tpb.tracker.thepiratebay.org/scrape?info_hash=%f0%c9%ab%03%07KY.%f9F%de%25A%85%1d%a5B%19%fb%06

i understand that special characters are escaped as "%nn", nn being a two digit hex. but oddly on another tracker they display the hash value and there are no special characters. but if i try to use the 'regular' appearing hash in a url the tracker won't answer me but if i type into my browser the url ktorrent generates the tracker replies with a proper scrape.

feel free to yap away on any or all aspects of metadata and scrape as i'm very interested. thanks for any info!

Last edited by eric235u on Wed Jun 06, 2007 2:46 pm, edited 1 time in total.


eric235u
Registered Member
Posts
23
Karma
0

Wed Jun 06, 2007 2:24 pm
here's a tracker that does answer the unecoded scrape:

Code: Select all
scrape_url = http://hurcules.serveftp.net:6969/scrape?hash_id=8b2736c5622504bc4f8f880fec062e0e42177d73


and it's forty digits.

but http://wiki.theory.org/BitTorrentSpecif ... Parameters states:
info_hash: 20-byte SHA1 hash of the value of the info key from the Metainfo file.


i know just enough to be confused!


George
Moderator
Posts
5421
Karma
1

Thu Jun 07, 2007 7:04 pm
eric235u wrote:here's a tracker that does answer the unecoded scrape:

Code: Select all
scrape_url = http://hurcules.serveftp.net:6969/scrape?hash_id=8b2736c5622504bc4f8f880fec062e0e42177d73


and it's forty digits.

but http://wiki.theory.org/BitTorrentSpecif ... Parameters states:
info_hash: 20-byte SHA1 hash of the value of the info key from the Metainfo file.


i know just enough to be confused!


You need 2 hex digits to represent one byte
George
Moderator
Posts
5421
Karma
1
eric235u wrote:hi all. just out of curiosity, there's a couple of things i don't understand and wondered if somebody here could enlighten me.

1. if i want to know the hash of a torrent, from what i've found on-line, "...calculates the SHA1 hash of the torrents info field and stores this in the info_hash property...". so info_hash is SHA1 of the 'info' subsection of the metadata file?


Yeah info_hash is a SHA1 hash of the info section of the torrent

2. i understand bencoded section but what's all the strange characters afterward?
Code: Select all
d8:announce44:http://tpb.tracker.thepiratebay.org/announce8:comments66:boston linux & unix user group - hacking the linux kernel 2006111510:created by14:KTorrent 2.1.413:creation datei1180097234e4:infod6:lengthi296825011e4:name16:blu_20061115.ogg12:piece lengthi262144e6:pieces22660:�%��l�C���H������y�0ϼ�����"���?8rO���   /���?�Q�;J��in0�߬iM����NfXiYh��R�
�iw/�IГ��5�~�c�IH���~��0.���hͪ��Oa���s/�$��Q<Q�c$'���(Q�u�K����i�;��Ě9�`AB%�n�h   ��i�g�%l��T��Ъ�G7��;���������a�~���RT��T�咿g-X���V<��6���G��:�a�Ï��I����B����`����|oj�B����yvc&�����w+�o   �ّ)����4����{���lgq\�fM3yT}�Ɠ,o���#}al���Y����8v���Q��`��<D¤A1�"/ڡ3���_����L����S`a����!�1�ҙU�W@,�C�PO��5 ��  (and so on...)
i'll guess binary data?


That's the SHA1 hashes of each chunk
eric235u
Registered Member
Posts
23
Karma
0
George wrote:
eric235u wrote:hi all. just out of curiosity, there's a couple of things i don't understand and wondered if somebody here could enlighten me.

1. if i want to know the hash of a torrent, from what i've found on-line, "...calculates the SHA1 hash of the torrents info field and stores this in the info_hash property...". so info_hash is SHA1 of the 'info' subsection of the metadata file?


Yeah info_hash is a SHA1 hash of the info section of the torrent


here's dumb question for you. what exactly is the info section? would it be from
Code: Select all
infod6:lengthi296825011e4:name16:blu_20061115.ogg12:piece lengthi262144e6:pieces22660:�%��l�C���H������y�0ϼ�����"���?8rO���   /���?�Q�;J��in0�߬iM����NfXiYh��R�
�iw/�IГ��5�~�c�IH���~��0.���hͪ��Oa���s/�$��Q<Q�c$'���(Q�u�K����i�;��Ě9�`AB%�n�h   ��i�g�%l��T��Ъ�G7��;���������a�~���RT��T�咿g-X���V<��6� ��G��:�a�Ï��I����B����`����|oj�B����yvc&�����w+�o   �ّ)����4����{���lgq\�fM3yT}�Ɠ,o���#}al���Y����8v���Q��`��<D¤A1�"/ڡ3���_����L����S`a����!�1�ҙU�W@,�C�PO��5 ��  (and so on...)


or would you not include "infod6:" or not include the SHA1 hashes of each chunk?

thanks again.


George
Moderator
Posts
5421
Karma
1

Fri Jun 08, 2007 6:13 pm
Everything from the d behind info until it's corresponding e
eric235u
Registered Member
Posts
23
Karma
0

Fri Jun 08, 2007 6:38 pm
George wrote:Everything from the d behind info until it's corresponding e


u r the man!




Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]