Transmission Peer Blocklist for Windows – TiBL4Win – v1.0

Just copy the code below to script.bat to where you want, execute as administrator, this will update the transmission blocklist with ips from Peer Block (http://www.peerblock.com/).

Just follow the instructions below in the configuration to download wget and gzip.

::This script creates the same lists as peerblock http://www.peerblock.com/, it outputs a file that you
::can use on Transmission automatically.
::This script was created by Cesário Garcia Mil-Homens - http://www.cesariogarcia.com just for the fun.
::TiBL4Win - v1.0

::CONFIGURATION - WARNING THE DIRECTORIES SHOULD ALREADY EXIST.

::In order for this script to work wget.exe and gzip.exe should be in the tmp directory do not remove them
::Download wget from: https://eternallybored.org/misc/wget/
::Download gzip from: http://gnuwin32.sourceforge.net/packages/gzip.htm
::Setup Transmission Blocklist folder.
set destination_folder="%appdata%\transmission\blocklists"

::DO NOT EDIT BELOW THIS LINE unless you know what you are doing
pushd "%~dp0"
cd tmp
wget -O - "http://list.iblocklist.com/?list=bt_ads&fileformat=p2p&archiveformat=gz" > bt_ads.txt.gz
wget -O - "http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz" > bt_level1.txt.gz
wget -O - "http://list.iblocklist.com/?list=bt_spyware&fileformat=p2p&archiveformat=gz" > bt_spyware.txt.gz
gzip -d *.gz
copy *.txt lists
copy lists %destination_folder%
del lists
del *.txt
del *.gz

PBLS4Lin v1.0 – Peerblock for Linux and Transmission

Um script para linux que permite utilizar as listas do Peerblock.
Estas listas podem ser utilizadas no Transmission.

#!/bin/bash

#This script creates the same lists as peerblock http://www.peerblock.com/, it outputs a file that you
#can use on Transmission under Edit -> Preferences -> Privacy -> Blocklist. In the first time copy the
#http link and use it. All lists are from http://www.iblocklist.com
#This script was created by Cesário Garcia Mil-Homens - http://www.cesariogarcia.com just for the fun.
#PBLS4Lin - v1.0

#CONFIGURATION - WARNING THE DIRECTORIES SHOULD ALREADY EXIST.

#Insert here the dir where is your Dropbox/Google Drive/etc public folders or you local server with apache
#Using Dropbox
#destination_folder="$HOME/Dropbox/Public"
#Using localhost
destination_folder="/var/www/peerblock"

#Insert here your own temporary download folder, do not use /tmp
temp="$HOME/tmp"

#DO NOT EDIT BELOW THIS LINE

clear
echo "Peerblock Lists - Automatic Uptades for Transmission"
echo "My destination folder is $destination_folder and my temporary download folder is $temp is this correct? (y/n)"

function download() {
	sudo cd $temp
	sudo wget -O - "http://list.iblocklist.com/?list=bt_ads&fileformat=p2p&archiveformat=gz" > bt_ads.txt.gz
	sudo wget -O - "http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz" > bt_level1.txt.gz
	sudo wget -O - "http://list.iblocklist.com/?list=bt_spyware&fileformat=p2p&archiveformat=gz" > bt_spyware.txt.gz
	sudo gunzip *.gz
	}

function combine() {
	sudo cat bt_ads.txt bt_level1.txt bt_spyware.txt > peerblock.txt
	sudo rm bt_ads.txt
	sudo rm bt_level1.txt
	sudo rm bt_spyware.txt
	 }

function upload() {
	sudo mv -f peerblock.txt $destination_folder
	}

read op

case $op in
	y) download; combine; upload;;
	*) exit;;
esac