1 Star 1 Fork 0

yanggeorge/btsniffer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

BT种子嗅探器(BT Sniffer)

加入BT网络,收集发布的种子信息。

Collect latest bit torrents.

要求

  1. 独立的公网IP
  2. Git,JDK8,Maven3的运行环境。
  3. 占用6881端口

构建和运行

  1. 克隆master源码
$ git clone https://github.com/yanggeorge/btsniffer.git
  1. 构建打包
$ cd btsniffer &  mvn clean package -DskipTests
  1. 后台运行
$ nohup java -jar -Dio.netty.leakDetectionLevel=advanced -XX:-OmitStackTraceInFastThrow target/btsniffer-1.0.0-SNAPSHOT.jar --spring.profiles.active=test  > /dev/null 2>&1 &
参数 说明
-Dio.netty.leakDetectionLevel=advanced netty探测是否有内存泄露
-XX:-OmitStackTraceInFastThrow 不要忽略堆栈打印
--spring.profiles.active=test 使用测试的profile

默认的日志路径是/var/log/btsniffer

查看日志

  1. 查看收集到的种子元信息(没有去重)
$ cat *.log |grep -a name= | tail 
  2020-01-02 15:00:22,734 [metadataExecutor-0] INFO  c.t.b.b.m.MetadataRequestHandleService.handleMetadata(65) - infoHashHex=62545e5df32b5077b69c48eeb84b40552e2add5c|name=Microsoft Office 2019 Pro Plus v.1908.11929.20376 Oct 2019 By Generation2.img|length=3515320320
  2020-01-02 15:01:06,538 [metadataExecutor-0] INFO  c.t.b.b.m.MetadataRequestHandleService.handleMetadata(65) - infoHashHex=62545e5df32b5077b69c48eeb84b40552e2add5c|name=Microsoft Office 2019 Pro Plus v.1908.11929.20376 Oct 2019 By Generation2.img|length=3515320320
  2020-01-02 15:01:26,617 [metadataExecutor-0] INFO  c.t.b.b.m.MetadataRequestHandleService.handleMetadata(65) - infoHashHex=79e764fe57b2f042217a42126bae52be6c801c87|name=RarLab.WinRAR.v3.93.Cracked-EAT|length=null
  2020-01-02 15:01:40,302 [metadataExecutor-0] INFO  c.t.b.b.m.MetadataRequestHandleService.handleMetadata(65) - infoHashHex=79e764fe57b2f042217a42126bae52be6c801c87|name=RarLab.WinRAR.v3.93.Cracked-EAT|length=null
  2020-01-02 15:01:41,634 [metadataExecutor-0] INFO  c.t.b.b.m.MetadataRequestHandleService.handleMetadata(65) - infoHashHex=79e764fe57b2f042217a42126bae52be6c801c87|name=RarLab.WinRAR.v3.93.Cracked-EAT|length=null
  2020-01-02 15:01:50,413 [metadataExecutor-0] INFO  c.t.b.b.m.MetadataRequestHandleService.handleMetadata(65) - infoHashHex=6254ecf758a0adf45a8563273804a30cb67c76b8|name=Doctor.Who.2005.7x12.Nightmare.In.Silver.HDTV.x264-FoV.mp4|length=319569132
  2020-01-02 15:01:57,517 [metadataExecutor-0] INFO  c.t.b.b.m.MetadataRequestHandleService.handleMetadata(65) - infoHashHex=62545e5df32b5077b69c48eeb84b40552e2add5c|name=Microsoft Office 2019 Pro Plus v.1908.11929.20376 Oct 2019 By Generation2.img|length=3515320320
  ...

bt-sniffer-show

性能

通常需要运行二十分钟左右才开始获取元信息。因为这是BT网络的特性,新加入的节点并不会立刻加入到其它节点的路由表中。

但是当运行的时间越来越长。则交互会越来越多。

部署在搬瓦工上(1cpu/1G内存),从2019-2-17日运行到2019-3-14日持续稳定运行,运行内存200M。

3月14日日志显示交互得到35万个元数据(含重复)。

通过分析元数据的接收日志,可以得到3月14日接收到1.6万新的元数据(不重复是指这1.6万在2月17日至3月13日未接收到)。

从gc日志可以看到3月14日,minor gc的频率大约 10次/min, full gc的频率为6次/hour。

MIT License Copyright (c) 2019 yanggeorge Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

bt-sniffer 是一个基于netty实现的能够收集BT种子元数据的嗅探器。 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/yanggeorge/btsniffer.git
git@gitee.com:yanggeorge/btsniffer.git
yanggeorge
btsniffer
btsniffer
master

搜索帮助

A270a887 8829481 3d7a4017 8829481