Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Blacklist's names & URLs arrays
- bl_name=([0]='spyware')
- bl_url=([0]='http://list.iblocklist.com/?list=bt_spyware&fileformat=p2p&archiveformat=gz')
- bl_name=(${bl_name[*]} [1]='webexploit')
- bl_url=(${bl_url[*]} [1]='http://list.iblocklist.com/?list=ghlzqtqxnzctvvajwwag&fileformat=p2p&archiveformat=gz')
- bl_name=(${bl_name[*]} [2]='spider')
- bl_url=(${bl_url[*]} [2]='http://list.iblocklist.com/?list=bt_spider&fileformat=p2p&archiveformat=gz')
- bl_name=(${bl_name[*]} [3]='hijacked')
- bl_url=(${bl_url[*]} [3]='http://list.iblocklist.com/?list=bt_hijacked&fileformat=p2p&archiveformat=gz')
- bl_name=(${bl_name[*]} [4]='dshield')
- bl_url=(${bl_url[*]} [4]='http://list.iblocklist.com/?list=bt_dshield&fileformat=p2p&archiveformat=gz')
- bl_name=(${bl_name[*]} [5]='bogon')
- bl_url=(${bl_url[*]} [5]='http://list.iblocklist.com/?list=bt_bogon&fileformat=p2p&archiveformat=gz')
- # For each blacklist set above
- for i in {0..5}; do
- # Download blacklist
- wget --output-document=/tmp/blacklist_${bl_name[$i]}.gz -w 3 ${bl_url[$i]}
- # Extract list
- gzip -d /tmp/blacklist_${bl_name[$i]}.gz
- done
- mv /tmp/blacklist_* /etc/pgl/blocklists.local/
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment