簡體   English   中英

將HTTP Get發送到Bittorent跟蹤器-info_hash和peer_id在哪里?

[英]Sending HTTP Get to Bittorent tracker - Where's info_hash and peer_id?

我正在嘗試將HTTP get請求發送到跟蹤器。 但是我不知道info_hash和peer_id在哪里,我需要它們作為參數。 根據嚴格的規范,info_hash是圖元文件的信息“ info_hash:對來自Metainfo文件的信息密鑰的值進行20位字節的SHA1哈希編碼。”而peer_id“允許為任何值”

但是,當我將正確編碼的URL信息密鑰作為info_hash並任意地為peer_id放入某些內容時,我會收到此錯誤:d14:failure reason20:Torrent未經授權

有人可以給我一個例子,該文件中的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,如果我需要提供更多信息。

您的示例中的信息詞典始於

infod13:

您必須確定信息數據並計算信息數據的SHA1。 之后,您必須對SHA1進行URL編碼。

info_hash:對Metainfo文件中info鍵值的值進行20字節SHA1哈希編碼。 請注意,根據上述info鍵的定義,該值將是本編碼的字典。

描述

有一個用Qt編寫的示例,我認為它可能對您有幫助。 (Qt5.2.1 / 5.2.1 / gcc_64 / examples / network / torrent)您可以在這里在線找到它qt torrent

編輯:這是您要查找的一個好答案計算torrent文件的信息哈希

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM