Advertisement
dfinf2

Transmission Blocklist Updater

Oct 10th, 2013
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.51 KB | None | 0 0
  1. #!/bin/bash
  2. #Note: You will probably have to turn some of these off, since the new iblocklist limiting downloads...
  3. #Finds who the user is for the directory to use below
  4. USER=$(whoami)
  5. #Directory variable to keep it clean
  6. DIR="/home/$USER/.config/transmission/blocklists"
  7.  
  8. #A bunch of Wgets to iblocklist, I had problems after testing the script with it seeing me as wget for some of them so im hoping the useragent will help
  9. wget -q -U "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36" -P $DIR http://list.iblocklist.com/?list=bt_level2&fileformat=p2p&archiveformat=gz
  10. wget -q -U "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36" -P $DIR http://list.iblocklist.com/?list=bt_dshield&fileformat=p2p&archiveformat=gz
  11. wget -q -U "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36" -P $DIR http://list.iblocklist.com/?list=bt_edu&fileformat=p2p&archiveformat=gz
  12. wget -q -U "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36" -P $DIR http://list.iblocklist.com/?list=bt_level3&fileformat=p2p&archiveformat=gz
  13. wget -q -U "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36" -P $DIR http://list.iblocklist.com/?list=ijfqtofzixtwayqovmxn&fileformat=p2p&archiveformat=gz
  14. wget -q -U "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36" -P $DIR http://list.iblocklist.com/?list=bt_bogon&fileformat=p2p&archiveformat=gz
  15. wget -q -U "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36" -P $DIR http://list.iblocklist.com/?list=bt_spyware&fileformat=p2p&archiveformat=gz
  16. wget -q -U "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36" -P $DIR http://list.iblocklist.com/?list=bt_hijacked&fileformat=p2p&archiveformat=gz
  17. wget -q -U "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36" -P $DIR http://list.iblocklist.com/?list=jcjfaxgyyshvdbceroxf&fileformat=p2p&archiveformat=gz
  18.  
  19. #Give the lists time to download
  20. sleep 15
  21.  
  22. #The files don't download cleanly so this chops off the beginning portions to that transmission makes the proper bin files
  23. for file in $DIR/*
  24. do
  25. mv "$file" $DIR/"`echo ${file}.gz|cut -d "=" -f 2`"
  26.  
  27. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement