项目作者: jholtmann

项目描述 :
Python script for analyzing .torrent and uTorrent .dat files
高级语言: Python
项目地址: git://github.com/jholtmann/BitTorrent-Forensics.git
创建时间: 2020-02-26T00:36:05Z
项目社区:https://github.com/jholtmann/BitTorrent-Forensics

开源协议:GNU General Public License v3.0

下载


BitTorrent-Forensics

Python script for analyzing .torrent files and uTorrent .dat files

General Information on BitTorrent Forensics

See the following blog post by Michael R. Godfrey for general information on BitTorrent forensics, including what artifacts are available and how they are stored.

Functionality

  1. Perform piece analysis on .torrent files to verify that a file/folder matches the content associated with a given .torrent file
  2. Retrieve/decode a list of DHT peers from the dht.dat file
  3. Retrieve/decode a list of peers from the resume.dat file

Installation

Requires Python 3.x

$ python3 setup.py install

Usage

$ bittorrent-forensics --help

  1. usage: bittorrent-forensics [-h] [--version] {torrent-piece-analysis,uTorrent-dht-nodes,uTorrent-resume-peers} ...
  2. positional arguments:
  3. {torrent-piece-analysis,uTorrent-dht-nodes,uTorrent-resume-peers}
  4. Options
  5. torrent-piece-analysis
  6. Perform piece analysis on .torrent file and content file/folder
  7. uTorrent-dht-nodes Parse hex from dht.dat nodes key
  8. uTorrent-resume-peers
  9. Parse hex from resume.dat peers6 key
  10. optional arguments:
  11. -h, --help show this help message and exit
  12. --version show program's version number and exit

General (Torrent Client Agnostic)

Torrent File Piece Analysis

bittorrent-forensics torrent-piece-analysis --help

  1. usage: bittorrent-forensics torrent-piece-analysis [-h] -t TORRENT_FILE -d DATA_FILE [-o OUT] [--silent] [--write-blob]
  2. optional arguments:
  3. -h, --help show this help message and exit
  4. -t TORRENT_FILE, --torrent-file TORRENT_FILE
  5. Torrent file
  6. -d DATA_FILE, --data-file DATA_FILE
  7. File to check against torrent file
  8. -o OUT, --out OUT File to write results to
  9. --silent Do not print results to terminal
  10. --write-blob Write assembled hex blob to disk

Example:

  1. Process torrent file that downloads test_torrent.jpg:
    bittorrent-forensics torrent-piece-analysis -t test_torrent.torrent -d test_torrent.jpg -o result.csv

  2. Process torrent file that downloads folder test:
    bittorrent-forensics torrent-piece-analysis -t test_torrent.torrent -d test -o result.csv

uTorrent Client

DHT Peers Processing

bittorrent-forensics uTorrent-dht-nodes --help

  1. usage: bittorrent-forensics uTorrent-dht-nodes [-h] (-s HEX_STR | -f FILE) [-c CSV] [--silent]
  2. optional arguments:
  3. -h, --help show this help message and exit
  4. -s HEX_STR, --hex_str HEX_STR
  5. String starting with 0x to decode
  6. -f FILE, --file FILE File containing string(s) starting with 0x to decode, one per line
  7. -c CSV, --csv CSV Folder to write csv file to
  8. --silent Do not print results to terminal

Resume Peers Processing

bittorrent-forensics uTorrent-resume-peers --help

  1. usage: bittorrent-forensics uTorrent-resume-peers [-h] (-s HEX_STR | -f FILE) [-c CSV] [--silent]
  2. optional arguments:
  3. -h, --help show this help message and exit
  4. -s HEX_STR, --hex_str HEX_STR
  5. String starting with 0x to decode
  6. -f FILE, --file FILE File containing string(s) starting with 0x to decode, one per line
  7. -c CSV, --csv CSV Folder to write csv file to
  8. --silent Do not print results to terminal