【问题标题】:How can I scrape a udp BitTorrent tracker in Java?如何在 Java 中抓取 udp BitTorrent 跟踪器?
【发布时间】:2016-03-21 06:44:28
【问题描述】:

我发送一个抓取数据包,播种者、下载者和 leechers 总是返回为 0。

这是我的初始连接和爬虫代码。

public void scrape() {
        for (final String infohash : infoHashes) {
            hashes += infohash;
        }
        outStream.writeByte(hashes.getBytes());

}

例如我的输出是

3617635676834215396 0

【问题讨论】:

    标签: java udp bittorrent


    【解决方案1】:
    for (final String infohash : infoHashes) {
        hashes += infohash;
    }
    outStream.writeByte(hashes.getBytes());
    

    我的猜测是您使用的是十六进制编码的哈希值。 UDP 抓取期望它们采用原始格式。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-01-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多