mirror of
https://github.com/StevenBlack/hosts.git
synced 2026-09-24 14:20:09 +01:00
Change update.info files to update.json, update the python generators, and docs.
This commit is contained in:
@@ -1 +0,0 @@
|
||||
https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/SpotifyAds/hosts
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/SpotifyAds/hosts"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/Telemetry/hosts
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/Telemetry/hosts"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
https://www.malwaredomainlist.com/hostslist/hosts.txt
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "https://www.malwaredomainlist.com/hostslist/hosts.txt"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
http://winhelp2002.mvps.org/hosts.txt
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "http://winhelp2002.mvps.org/hosts.txt"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
http://someonewhocares.org/hosts/zero/hosts
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "http://someonewhocares.org/hosts/zero/hosts"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/gambling-hosts
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/gambling-hosts"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/pornography-hosts
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/pornography-hosts"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/social-hosts
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"url": "https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/social-hosts"
|
||||
}
|
||||
+8
-7
@@ -87,7 +87,7 @@ defaults = {
|
||||
"datafilenames" : "hosts",
|
||||
"targetip" : "0.0.0.0",
|
||||
"ziphosts" : False,
|
||||
"updateurlfilename" : "update.info",
|
||||
"sourcedatafilename" : "update.json",
|
||||
"readmefilename" : "readme.md",
|
||||
"readmetemplate" : os.path.join(BASEDIR_PATH, "readme_template.md"),
|
||||
"readmedata" : {},
|
||||
@@ -260,14 +260,14 @@ def updateAllSources():
|
||||
print ("Skipping.")
|
||||
|
||||
def getUpdateURLsFromFile(source):
|
||||
pathToUpdateFile = os.path.join(settings["datapath"], source, settings["updateurlfilename"])
|
||||
pathToUpdateFile = os.path.join(settings["datapath"], source, settings["sourcedatafilename"])
|
||||
if os.path.exists(pathToUpdateFile):
|
||||
updateFile = open(pathToUpdateFile, "r")
|
||||
retURLs = updateFile.readlines()
|
||||
# .strip()
|
||||
updateData = json.load(updateFile)
|
||||
retURLs = [updateData["url"]]
|
||||
updateFile.close()
|
||||
else:
|
||||
retURL = None
|
||||
retURLs = None
|
||||
printFailure("Warning: Can't find the update file for source " + source + "\n" +
|
||||
"Make sure that there's a file at " + pathToUpdateFile)
|
||||
return retURLs
|
||||
@@ -275,10 +275,11 @@ def getUpdateURLsFromFile(source):
|
||||
|
||||
|
||||
def getUpdateURLFromFile(source):
|
||||
pathToUpdateFile = os.path.join(settings["datapath"], source, settings["updateurlfilename"])
|
||||
pathToUpdateFile = os.path.join(settings["datapath"], source, settings["sourcedatafilename"])
|
||||
if os.path.exists(pathToUpdateFile):
|
||||
with open(pathToUpdateFile, "r") as updateFile:
|
||||
return updateFile.readline().strip()
|
||||
updateData = json.load(updateFile)
|
||||
return [updateData["url"]]
|
||||
printFailure("Warning: Can't find the update file for source " + source + "\n" +
|
||||
"Make sure that there's a file at " + pathToUpdateFile)
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user