Commit Graph

223 Commits

Author SHA1 Message Date
Zaur Molotnikov
6f6693c17a Migrated to Python 3 2015-10-26 23:16:55 +01:00
qqo
10c4449774 'suffix' in regex matches empty string on all the data files, except
one (incorrect) line containing port:
0.0.0.0 telemetry.appex.bing.net:443
The resulting entry in hosts file generated like this:
0.0.0.0 telemetry.appex.bing.net :443
which is incorrect. The bug was not spotted only because the incorrect
line in the data source was after the correct line without port,
thus it was ignored and not added to resulting hosts file.
2015-10-24 01:43:18 +03:00
qqo
d810d25178 Explicitly lowercase hostname to prevent mixed-case duplicates. 2015-10-24 00:58:12 +03:00
Zaur Molotnikov
7e8b1674fb os.path.join introduced 2015-10-19 12:27:41 +02:00
Steven Black
cdb945e45e Prettier formatting of the number of host records. 2015-10-17 20:23:33 -04:00
Steven Black
4998b31f24 Host file now lists 127.0.0.1 localhost, 0.0.0.0 the others. 2015-10-06 17:05:09 -04:00
Steven Black
da11d3239c Reverting the target host back to 0.0.0.0. 2015-10-02 21:06:51 -04:00
Steven Black
71499a4153 Fix the update script so we don't write any dupes.
Signed-off-by: Steven Black <steveb@stevenblack.com>
2015-09-23 23:55:36 -04:00
Steven Black
a03314573c Replace the target host from 0.0.0.0 with 0. 2015-09-23 19:02:26 -04:00
Steven Black
f5d622a413 Issue #8: fix - Update the stripRule() function to be smarter about whitespace preceding comments. Thanks @caneylan. 2015-01-01 21:35:11 -05:00
Peter Naudus
f459f1a765 Normalizing hosts and better duplicate detction added 2014-05-16 08:13:11 -04:00
Peter Naudus
8d0a7bb783 Added support for ZIP compressed files 2014-05-14 21:55:29 -04:00
Ben Limmer
16e922cdd6 Added query to user for moving the hosts file into place. 2013-07-30 10:59:31 -06:00
Ben Limmer
3e6a5c42c8 Correcting syntax error with elif. 2013-07-13 16:24:06 -06:00
Ben Limmer
4b8995a9af Added back instructions for Windows users on where to move their hosts file to.
Resolves #5. I'm opening a new issue for adding this for Windows.
2013-07-13 16:08:31 -06:00
Ben Limmer
f2f3e29e3f Added support for automatically moving the hosts file into place and flushing the DNS Cache for Mac and Linux.
This addresses part of Issue #5, but I still need to do Windows.
2013-07-13 15:57:11 -06:00
Ben Limmer
1e180e78be Write out how many unique entries were generated in the readme.md file.
Resolves #3.
2013-07-13 14:59:29 -06:00
Ben Limmer
02efc707f1 Print out copy locations on success.
Now it's easy to copy/paste where the host file needs to go.
2013-05-29 21:28:49 -06:00
Ben Limmer
9e1b5505c2 Colorized prompts for readability.
This commit closes #2.
2013-02-17 14:49:16 -07:00
Ben Limmer
0f942662cf Resolves infinite loop error introduced in 997606b.
Whether you entered yes or no to the "more entries" dialog, you'd still be in the loop. Also, we now check to see if the custom domain is blank
2013-02-17 14:39:40 -07:00
Ben Limmer
c722160a9c Woops, left debug logic in last commit. 2013-02-17 13:55:46 -07:00
Ben Limmer
997606b3f0 Added ability to exclude domains.
This commit closes #1. I always hated that Hulu would freak out when I generated a new hosts file. It checks to make sure that it can access its ad servers before it will start streaming. I'm assuming people have other sites similar to this, so the script now can be extended with common and custom domains to exclude.
2013-02-17 13:51:49 -07:00
Ben Limmer
47f8f40b92 Added script to handle updates to hosts sources.
updateHostsFile.py can handle either simply combining local hosts files you have checked in, or it can
go out to the Internet to update your source files. It also handles automatically generating a header
and removing duplicates from the list.
2013-02-09 19:55:04 -07:00