【问题标题】:Sending HTTP Get to Bittorent tracker - Where's info_hash and peer_id?向 Bittorent 跟踪器发送 HTTP Get - info_hash 和 peer_id 在哪里?
【发布时间】:2014-03-02 05:35:38
【问题描述】:

我正在尝试向跟踪器发送 HTTP 获取请求。但我不知道 info_hash 和 peer_id 在哪里,我需要它们作为参数。根据 bittorent 规范,info_hash 是元文件的信息“info_hash: urlencoded 20-byte SHA1 hash of the info key from the Metainfo file.”和 peer_id “允许为任何值”

但是当我将正确的 URL 编码的信息键作为 info_hash 并任意为 peer_id 放置一些东西时,我得到了这个错误: d14:failure reason20:Torrent unauthorisede

谁能给我一个info_hash在这个文件中的例子吗?

d8:announce40:http://tracker.the123ay.org/announce13:announce-listll40:http://tracker.th213bay.org/announceel35:udp://tracker.op123rrent.com:80el23:udp://tr123ker.ccc.de:80el29:udp://tracker.pawscbt.com:80el46:udp://tracker.tntvadse.scambioetico.org:2710ee7:comment46:Torrent downloaded from http://theadsde10:created by13:uTorrent/332013:creation datei1391719112e8:encoding5:UTF-84:infod13:file-durationli2462ei2474ee10:file-mediali0ei0ee5:filesld6:lengthi1443259870e4:pathl70:Casdasd7.Problemi.Di.Famiglia.ITA.720p.DLMux.h264-Noasdip.mkveed6:lengthi1461542146e4:pathl70:Chicaasdasx08.Una.Scelta.Difficile.ITA.720p.DLMux.h264-NovaRip.mkveee4:name48:Chicago.Fire.1x07-08.ITA.720p.DLMux.h264-NovaRip12:piece lengthi262144e6:pieces221620:

如果重要,请使用 Java。 Lmk 如果我需要提供更多信息。

【问题讨论】:

  • 仍然不知道 info_hash 在哪里

标签: java bittorrent tracker


【解决方案1】:

您示例中的信息字典开始于

infod13:

您必须确定信息数据并计算信息数据的 SHA1。之后,您必须对 SHA1 进行 URL 编码。

info_hash:来自 Metainfo 文件的 info 键值的 urlencoded 20 字节 SHA1 哈希。请注意,根据上面 info 键的定义,该值将是一个经过编码的字典。

description

有一个用 Qt 编写的示例,我认为它可能会对您有所帮助。 (Qt5.2.1/5.2.1/gcc_64/examples/network/torrent) 你可以在这里在线找到它qt torrent

编辑:这是你正在寻找的一个很好的答案Calculating the info-hash of a torrent file

【讨论】:

    猜你喜欢
    • 2010-11-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-18
    • 1970-01-01
    • 1970-01-01
    • 2016-05-23
    相关资源
    最近更新 更多