diff --git a/Makefile b/Makefile index e5b262a..d4b77ec 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all : all_blacklists BarbBlock.txt -blacklists/% : src/generate_blacklist.py blacklist.json templates/%.tmpl +blacklists/% : src/generate_blacklist.py blacklist.yaml templates/%.tmpl python $^ $@ package : diff --git a/blacklist.json b/blacklist.json deleted file mode 100644 index 28da99c..0000000 --- a/blacklist.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "name": "BarbBlock", - "version": "1.1", - "description": "Blocks requests to sites which have used legal threats to remove themselves from other blacklists.", - "last_update": "2017-08-13", - "url_base": "https://ssl.bblck.me/blacklists", - "page_url": "https://ssl.bblck.me/", - - "blacklist": [ - { - "issues": [1], - "takedown": "https://github.com/github/dmca/blob/master/2017/2017-08-02-LevenLabs.md", - "domains": [ - "functionalclam.com" - ] - }, - { - "issues": [8], - "domains": [ - "2znp09oa.com", - "4jnzhl0d0.com", - "6ldu6qa.com", - "82o9v830.com", - "abandonedclover.com", - "abruptroad.com", - "actuallysheep.com", - "ak0gsh40.com", - "ambitiousagreement.com", - "anxiousapples.com", - "argyresthia.com", - "awzbijw.com", - "balloontexture.com", - "baskettexture.com", - "bawdybeast.com", - "beamincrease.com", - "beamkite.com", - "boilingbeetle.com", - "boredcrown.com", - "brassrule.com", - "broadboundary.com", - "broadcastbed.com", - "calmfoot.com", - "cherrythread.com", - "chiefcurrent.com", - "chinchickens.com", - "comfortablecheese.com", - "commandwalk.com", - "concernrain.com", - "consciouscabbage.com", - "copperchickens.com", - "copycarpenter.com", - "copyrightaccesscontrols.com", - "crawlclocks.com", - "critictruck.com", - "crownclam.com", - "curtaincows.com", - "cutecushion.com", - "decisiveducks.com", - "delightdriving.com", - "differentdesk.com", - "dk4ywix.com", - "docksalmon.com", - "doubtfulrainstorm.com", - "dragzebra.com", - "elasticchange.com", - "elephantqueue.com", - "exclusivebrass.com", - "flavordecision.com", - "floodprincipal.com", - "functionalclam.com", - "futuristicfairies.com", - "fuzzyflavor.com", - "ga87z2o.com", - "giddycoat.com", - "gorgeousground.com", - "greetzebra.com", - "greyinstrument.com", - "guardedgovernor.com", - "guitarbelieve.com", - "h78xb.pw", - "hfc195b.com", - "hilariouszinc.com", - "illustriousoatmeal.com", - "incrediblesugar.com", - "ivykiosk.com", - "j93557g.com", - "jewelcheese.com", - "karisimbi.net", - "limpingline.com", - "lizardslaugh.com", - "lopsidedspoon.com", - "loudloss.com", - "lp3tdqle.com", - "lumpyleaf.com", - "matchcows.com", - "messagenovice.com", - "mixedreading.com", - "mowfruit.com", - "ovalpigs.com", - "peacepowder.com", - "photographpan.com", - "pietexture.com", - "possibleboats.com", - "practicetoothpaste.com", - "presetrabbits.com", - "profitrumour.com", - "provideplant.com", - "quaintcan.com", - "quicksandear.com", - "readgoldfish.com", - "rebelsubway.com", - "receptiveink.com", - "resolutekey.com", - "rulerabbit.com", - "saysidewalk.com", - "scarcestream.com", - "scrubsky.com", - "scrubswim.com", - "separatesilver.com", - "shakesea.com", - "shakytaste.com", - "shallowschool.com", - "shelterstraw.com", - "shiveringsail.com", - "shockingswing.com", - "simplisticnose.com", - "sinceresofa.com", - "snakesort.com", - "sneaklevel.com", - "sneakystamp.com", - "spectacularsnail.com", - "spillvacation.com", - "squeamishscarecrow.com", - "storesurprise.com", - "stormyachiever.com", - "stormyshock.com", - "stormysponge.com", - "straightnest.com", - "strivesidewalk.com", - "structuresofa.com", - "succeedscene.com", - "superficialsink.com", - "terribleturkey.com", - "thirdrespect.com", - "throattrees.com", - "tidytrail.com", - "tracedesire.com", - "trickycelery.com", - "tritetongue.com", - "truckstomatoes.com", - "unknowntray.com", - "unusualtitle.com", - "voicevegetable.com", - "wateryvan.com", - "wirecomic.com", - "xovq5nemr.com", - "zbwp6ghm.com" - ] - } - ] -} diff --git a/blacklist.yaml b/blacklist.yaml new file mode 100644 index 0000000..d3d2b48 --- /dev/null +++ b/blacklist.yaml @@ -0,0 +1,155 @@ +--- +name: BarbBlock +version: '1.1' +description: Blocks requests to sites which have used legal threats to remove themselves + from other blacklists. +last_update: '2017-08-13' +url_base: https://ssl.bblck.me/blacklists +page_url: https://ssl.bblck.me/ +blacklist: +- issues: + - 1 + takedown: https://github.com/github/dmca/blob/master/2017/2017-08-02-LevenLabs.md + domains: + - functionalclam.com +- issues: + - 8 + domains: + - 2znp09oa.com + - 4jnzhl0d0.com + - 6ldu6qa.com + - 82o9v830.com + - abandonedclover.com + - abruptroad.com + - actuallysheep.com + - ak0gsh40.com + - ambitiousagreement.com + - anxiousapples.com + - argyresthia.com + - awzbijw.com + - balloontexture.com + - baskettexture.com + - bawdybeast.com + - beamincrease.com + - beamkite.com + - boilingbeetle.com + - boredcrown.com + - brassrule.com + - broadboundary.com + - broadcastbed.com + - calmfoot.com + - cherrythread.com + - chiefcurrent.com + - chinchickens.com + - comfortablecheese.com + - commandwalk.com + - concernrain.com + - consciouscabbage.com + - copperchickens.com + - copycarpenter.com + - copyrightaccesscontrols.com + - crawlclocks.com + - critictruck.com + - crownclam.com + - curtaincows.com + - cutecushion.com + - decisiveducks.com + - delightdriving.com + - differentdesk.com + - dk4ywix.com + - docksalmon.com + - doubtfulrainstorm.com + - dragzebra.com + - elasticchange.com + - elephantqueue.com + - exclusivebrass.com + - flavordecision.com + - floodprincipal.com + - functionalclam.com + - futuristicfairies.com + - fuzzyflavor.com + - ga87z2o.com + - giddycoat.com + - gorgeousground.com + - greetzebra.com + - greyinstrument.com + - guardedgovernor.com + - guitarbelieve.com + - h78xb.pw + - hfc195b.com + - hilariouszinc.com + - illustriousoatmeal.com + - incrediblesugar.com + - ivykiosk.com + - j93557g.com + - jewelcheese.com + - karisimbi.net + - limpingline.com + - lizardslaugh.com + - lopsidedspoon.com + - loudloss.com + - lp3tdqle.com + - lumpyleaf.com + - matchcows.com + - messagenovice.com + - mixedreading.com + - mowfruit.com + - ovalpigs.com + - peacepowder.com + - photographpan.com + - pietexture.com + - possibleboats.com + - practicetoothpaste.com + - presetrabbits.com + - profitrumour.com + - provideplant.com + - quaintcan.com + - quicksandear.com + - readgoldfish.com + - rebelsubway.com + - receptiveink.com + - resolutekey.com + - rulerabbit.com + - saysidewalk.com + - scarcestream.com + - scrubsky.com + - scrubswim.com + - separatesilver.com + - shakesea.com + - shakytaste.com + - shallowschool.com + - shelterstraw.com + - shiveringsail.com + - shockingswing.com + - simplisticnose.com + - sinceresofa.com + - snakesort.com + - sneaklevel.com + - sneakystamp.com + - spectacularsnail.com + - spillvacation.com + - squeamishscarecrow.com + - storesurprise.com + - stormyachiever.com + - stormyshock.com + - stormysponge.com + - straightnest.com + - strivesidewalk.com + - structuresofa.com + - succeedscene.com + - superficialsink.com + - terribleturkey.com + - thirdrespect.com + - throattrees.com + - tidytrail.com + - tracedesire.com + - trickycelery.com + - tritetongue.com + - truckstomatoes.com + - unknowntray.com + - unusualtitle.com + - voicevegetable.com + - wateryvan.com + - wirecomic.com + - xovq5nemr.com + - zbwp6ghm.com diff --git a/blacklists/adblock-plus.txt b/blacklists/adblock-plus.txt index 30536b1..12d67f1 100644 --- a/blacklists/adblock-plus.txt +++ b/blacklists/adblock-plus.txt @@ -148,4 +148,4 @@ ||wateryvan.com^ ||wirecomic.com^ ||xovq5nemr.com^ -||zbwp6ghm.com^ +||zbwp6ghm.com^ \ No newline at end of file diff --git a/blacklists/hosts-file.txt b/blacklists/hosts-file.txt index 0e1ff1a..feae572 100644 --- a/blacklists/hosts-file.txt +++ b/blacklists/hosts-file.txt @@ -1,5 +1,5 @@ # BarbBlock -# Version: 1.0 +# Version: 1.1 # Last Update: 2017-08-13 # Homepage: https://ssl.bblck.me/ # Canonical URL for this file: https://ssl.bblck.me/blacklists/hosts-file.txt diff --git a/src/generate_blacklist.py b/src/generate_blacklist.py index 1f3de4f..ad38e90 100644 --- a/src/generate_blacklist.py +++ b/src/generate_blacklist.py @@ -1,6 +1,6 @@ import argparse import os -import json +import yaml import jinja2 @@ -9,7 +9,7 @@ def run_template_engine(blacklist_file, template_file, output_file): template_path, template_file = os.path.split(template_file) with open(blacklist_file) as bf: - context = json.load(bf) + context = yaml.load(bf) result = jinja2.Environment( loader=jinja2.FileSystemLoader(template_path or './')