Toolkit to investigate the BitTorrent network.
1.7K
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
sudo apt install docker-ce
REF: https://www.digitalocean.com/community/tutorials/como-instalar-y-usar-docker-en-ubuntu-18-04-1-es
docker pull raulcalvolaorden/bntoolkit
sudo docker network create bntoolkit-net --subnet 172.24.24.0/24
mkdir postgres #or any folder to store data
sudo docker run --net bntoolkit-net -d --rm -p 5432:5432 --mount type=bind,source=$PWD/postgres/,target=/var/lib/postgresql/data --name hashpostgres -e POSTGRES_PASSWORD=postgres99 postgres
#init Database
sudo docker run --net bntoolkit-net --rm raulcalvolaorden/bntoolkit initDB
#crawl (use -d to detach (background))
sudo docker run --net bntoolkit-net --rm raulcalvolaorden/bntoolkit crawl
#Show hashes
sudo docker run --net bntoolkit-net --rm raulcalvolaorden/bntoolkit show hash
# Create config file
echo 'host="hashpostgres"
port=5432
user="postgres"
password="postgres99"
dbname="hash"' > configFile.toml
#init Database
sudo docker run --net bntoolkit-net --rm -v $PWD/configFile.toml:/go/src/github.com/r4ulcl/bntoolkit/configFile.toml raulcalvolaorden/bntoolkit initDB
#crawl (use -d to detach (background))
sudo docker run --net bntoolkit-net --rm -v $PWD/configFile.toml:/go/src/github.com/r4ulcl/bntoolkit/configFile.toml raulcalvolaorden/bntoolkit crawl
#Show hashes
sudo docker run --net bntoolkit-net --rm -v $PWD/configFile.toml:/go/src/github.com/r4ulcl/bntoolkit/configFile.toml raulcalvolaorden/bntoolkit show hash
Default:
host="localhost"
port=5432
user="postgres"
password="postgres99"
dbname="hash"
You can change this file or change create a new file and use the FLAG: --config
Don't change the dbname. But if you do it you should change the sql.sql file too.
Help about any command
bntoolkit help

Print the version number
bntoolkit version

Create the database and it's tables
bntoolkit initDB
Create a .torrent file. You can specify the output file, the pieze size, the tracker and a comment
Flags:
bntoolkit create go1.12.9.linux-amd64.tar.gz -o output

Download a file from a hash, a magnet or a Torrent file.
Flags:
bntoolkit download e84213a794f3ccd890382a54a64ca68b7e925433

Get torrent file from a hash or magnet.
Flags:
bntoolkit getTorrent e84213a794f3ccd890382a54a64ca68b7e925433 -p .

Add an IP or range to the database alert table and remove it.
Flags:
bntoolkit addAlert 8.8.8.0/24
bntoolkit deleteAlert 8.8.8.0/24

Add a hash to the database monitor table and remove it.
Flags:
bntoolkit addMonitor e84213a794f3ccd890382a54a64ca68b7e925433
bntoolkit deleteMonitor e84213a794f3ccd890382a54a64ca68b7e925433

Crawl the BitTorrent Network to find hashes and storage it in the DB.
Flags:
bntoolkit crawl

Start the daemon to monitor the files in the monitor table, notify alerts and optionally crape DHT
Flags:
bntoolkit daemon

Find the file in Bittorrent network using the DHT, a trackers list and the local database. In this command the hashes can be: Possibles, Valid or Downloaded. The first are the ones that could exist because they are valid, the second are the ones that have been found in BitTorrent and the third is that it has peers and can be downloaded.
Flags:
bntoolkit find

Insert a hash or a file of hashes in the DB.
Flags:
bntoolkit insert 65145ed4d745cfc93f5ffe3492e9cde599999999
Show the database data
Flags:
Flags:
bntoolkit show hash --hash 65145ed4d745cfc93f5ffe3492e9cde599999999
Flags:
bntoolkit show alert
Flags:
bntoolkit show count
Flags:
bntoolkit show ip
Flags:
bntoolkit show monitor
Flags:
bntoolkit show possibles
Flags:
bntoolkit show project
sudo apt-get update
sudo apt-get -y upgrade
wget https://golang.org/dl/go1.16.3.linux-amd64.tar.gz #Check latest in https://golang.org/dl/
sudo tar -xvf go*.linux-amd64.tar.gz
sudo mv go /usr/local
mkdir ~/work
echo 'export GOROOT=/usr/local/go
export GOPATH=$HOME/work
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH' >> ~/.profile
source ~/.profile
REF: https://tecadmin.net/install-go-on-ubuntu/
sudo apt install gcc g++
go install github.com/r4ulcl/bntoolkit
Content type
Image
Digest
sha256:8f926e890…
Size
5.6 MB
Last updated
over 3 years ago
docker pull r4ulcl/bntoolkit