Skip to content

Commit

Permalink
Fix #87
Browse files Browse the repository at this point in the history
Credit to @T145
  • Loading branch information
iam-py-test committed Oct 1, 2021
1 parent 220baa1 commit ee01b85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions update.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def isipdomain(domain):
pass
return False
for line in List:
if line.startswith("! Format notes: "):
if line.startswith("! Format notes:"):
altfile.write('# Format notes: This format is designed for a system wide HOSTS file, and can also be used with tools that support this format. Not recommended for uBlock Origin or AdGuard\n')
continue
if line.startswith("!"):
Expand All @@ -64,7 +64,7 @@ def isipdomain(domain):
if isip == True:
altfile.write("#IP address: {}".format(domain))
if isip == False and domain != "" and domain not in donedomains:
altfile.write("127.0.0.1 {}".format(domain))
altfile.write("0.0.0.0 {}".format(domain))
donedomains.append(domain)
altfile.write("\n")

Expand Down Expand Up @@ -148,7 +148,7 @@ def isipdomain(domain):
def mkpurehosts(file,altname):
altfile = open(altname,"w")
for domain in alldomains[file]:
altfile.write("127.0.0.1 {}\n".format(domain))
altfile.write("0.0.0.0 {}\n".format(domain))

try:
mkpurehosts("porn.txt","Alternative list formats/porn_pure_hosts.txt")
Expand Down

0 comments on commit ee01b85

Please sign in to comment.