mirror of
https://github.com/StevenBlack/hosts.git
synced 2024-07-02 18:45:52 +02:00
Change update.info files to update.json, update the python generators, and docs.
This commit is contained in:
parent
6d414b758a
commit
a6fcff9f22
|
@ -1 +0,0 @@
|
|||
https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt
|
3
data/KADhosts/update.json
Normal file
3
data/KADhosts/update.json
Normal file
|
@ -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
|
3
data/SpotifyAds/update.json
Normal file
3
data/SpotifyAds/update.json
Normal file
|
@ -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
|
3
data/StevenBlack/update.json
Normal file
3
data/StevenBlack/update.json
Normal file
|
@ -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
|
3
data/Telemetry/update.json
Normal file
3
data/Telemetry/update.json
Normal file
|
@ -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
|
3
data/UncheckyAds/update.json
Normal file
3
data/UncheckyAds/update.json
Normal file
|
@ -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
|
3
data/adaway.org/update.json
Normal file
3
data/adaway.org/update.json
Normal file
|
@ -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
|
3
data/add.2o7Net/update.json
Normal file
3
data/add.2o7Net/update.json
Normal file
|
@ -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
|
3
data/add.Dead/update.json
Normal file
3
data/add.Dead/update.json
Normal file
|
@ -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
|
3
data/add.Risk/update.json
Normal file
3
data/add.Risk/update.json
Normal file
|
@ -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
|
3
data/add.Spam/update.json
Normal file
3
data/add.Spam/update.json
Normal file
|
@ -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
|
3
data/malwaredomainlist.com/update.json
Normal file
3
data/malwaredomainlist.com/update.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"url": "https://www.malwaredomainlist.com/hostslist/hosts.txt"
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
http://winhelp2002.mvps.org/hosts.txt
|
3
data/mvps.org/update.json
Normal file
3
data/mvps.org/update.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"url": "http://winhelp2002.mvps.org/hosts.txt"
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
http://someonewhocares.org/hosts/zero/hosts
|
3
data/someonewhocares.org/update.json
Normal file
3
data/someonewhocares.org/update.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"url": "http://someonewhocares.org/hosts/zero/hosts"
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts
|
3
data/tyzbit/update.json
Normal file
3
data/tyzbit/update.json
Normal file
|
@ -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
|
3
data/yoyo.org/update.json
Normal file
3
data/yoyo.org/update.json
Normal file
|
@ -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
|
3
extensions/gambling/update.json
Normal file
3
extensions/gambling/update.json
Normal file
|
@ -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
|
3
extensions/porn/update.json
Normal file
3
extensions/porn/update.json
Normal file
|
@ -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
|
3
extensions/social/update.json
Normal file
3
extensions/social/update.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"url": "https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/social-hosts"
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user