如何使用Infohash获取种子文件的元数据?

huangapple go评论59阅读模式
英文:

How do I fetch the metadata of a torrent using an Infohash?

问题

我假设在使用该Infohash找到对等方之后,您会发送握手消息,直到一个对等方建立连接。但我似乎在Wireshark中找不到包含元数据的任何数据包。如果可能的话,您能展示一下元数据查询是什么样的吗?

关于元数据,我唯一找到的信息是bep 9,但我觉得有点难以理解,并且在Wireshark中也找不到类似的内容。

英文:

I am assuming that after finding peers using that Infohash you send handshake messages until one peer establishes a connection. But I can't seem to find any packet in Wireshark that has the metadata in it. If possible can you show me how a metadata query looks like?

The only thing I've found about metadata was bep 9 but it was kinda hard for me to understand and I didn't find anything in Wireshark similar

答案1

得分: 1

你已经找到了相关的BEP 9。要实现它,首先必须实现BEP 10,然后检查扩展标头,看对等方是否支持BEP 9,如果支持,则发送一系列带有适当协商的ID的扩展消息,携带元数据请求消息。

在大多数BitTorrent连接中,您应该能看到扩展握手消息,因为许多客户端都支持它。您不太可能看到元数据请求/数据消息(除非您在客户端中明确触发它们),因为这只是比下载种子有效负载更不常见的操作。

英文:

You already found the relevant BEP 9. To implement it you first have to implement BEP 10 and then check the extension header whether the peer supports BEP 9 and if it does send a series of extension messages with the appropriate negotiated IDs carrying a metadata request message.

You should be seeing the extension handshake message in most bittorrent connections since many clients support it. You're less likely to see metadata request/data messages (unless you explicitly trigger them in a client) because it's simply a less common operation than downloading the torrent payload.

huangapple
  • 本文由 发表于 2023年1月6日 14:45:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/75027783.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定