arvidn / bittorrent-trace

A tool to reconstruct and analyze bittorrent stream from a packet capture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


tracebt is a tool that reconstructs BitTorrent peer protocol streams (TCP and uTP) from a packet capture, parse the protocol and prints it to human readable form to files on disk. The packet capture is expected to be a libpcap compatible file, either .pcap or .pcapng, suitable captured with wireshark or tcpdump.

For the reconstruction to work reliably, the full packets need to be included in the capture, not just packet headers. This is because at the bittorrent protocol level, messages are not aligned to packets, and may end up at the end of a full MTU segment.


./tracebt <capture-file>

Files are saved to current working directory, in a subdirectory called bt/<info-hash>. Each TCP or uTP connection is dumped to a file in that directory.

uTP stream analysis

analyze_utp is a tool to analyze uTP packet captures. It can filter based on connection ID and indicate incoming and outgoing packet direction based on IPs. It prints uTP packet headers and IP packet fragments. It was developed to enable analysis of MTU probes.


Bittorrent trace depends on libpcap and boost.system.


Building is most conveniently done with boost-build. Run:


In the root directory.

ezoic increase your site revenue


A tool to reconstruct and analyze bittorrent stream from a packet capture

License:MIT License


Language:C++ 100.0%