Compare commits

...
570 Commits
Author SHA1 Message Date
Steven Black 52d759a680 Release 3.7.13 2021-07-04 14:09:27 -04:00
Steven Black cfb18f4cd3 Updates from yoyo.org, URLHaus, shady-hosts, digitalside.it, KADhosts, and Adaway. 2021-07-04 14:09:03 -04:00
Steven Black 71d4fc0d25 Release 3.7.12 2021-07-01 13:58:48 -04:00
Steven Black 1164db81ca Updates from yoyo.org, URLHaus, digitalside.it, KADHosts, and AdAway. 2021-07-01 13:58:31 -04:00
Steven Black 7f97ee0bbd Merge pull request #1700 from ProgramComputer/patch-1
Update hosts
2021-07-01 13:07:22 -04:00
Paul a8d4a6b2fd Update hosts 2021-06-30 17:13:27 -05:00
Steven Black 1c5c2dc676 Issue ##1699 — add Chase Bank scam domains. 2021-06-30 16:45:17 -04:00
Steven Black faed7b300f Release 3.7.11 2021-06-28 10:26:39 -04:00
Steven Black f69ec27dc4 Updates from yoyo.org, URLHaus, digitalside.it, orca.pet, KADhosts, hostsVN, Adguard, and AdAway. 2021-06-28 10:26:10 -04:00
Steven Black 926b3ca967 Merge pull request #1694 from FadeMind/patch-1
whynotwin11.com
2021-06-28 09:26:46 -04:00
FadeMind a5e20414db add Title to data/StevenBlack/hosts
provide title for ublock origin usage
2021-06-28 09:38:23 +02:00
FadeMind 78dd986279 whynotwin11.com 2021-06-28 08:04:21 +02:00
Steven Black 150d84202d Issue #1692: add dealabs.digidip.net. 2021-06-27 12:04:47 -04:00
Steven Black 2beb1050cc Release 3.7.10 2021-06-22 20:28:45 -04:00
Steven Black 8da7e542e5 Updates from yoyo.org, URLHaus, digitalside.it, KADHosts, Adguard, and AdAway. 2021-06-22 20:28:28 -04:00
Steven Black e9c636cf42 Add coinjoin.io. 2021-06-22 17:42:54 -04:00
Steven Black 2512291d86 Add google analytics domains from https://github.com/lightswitch05/hosts/issues/287 2021-06-17 16:23:34 -04:00
Steven Black bc45e3fb99 Release 3.7.9 2021-06-16 23:57:10 -04:00
Steven Black 89dcee98bd Updates from clefspeare13, yoyo.org, URLHaus, tiuxo, someonewhocares.org, digitalside.it, orca.pet, KADhosts, hostsVN, AdGuard, and Adaway. 2021-06-16 23:56:51 -04:00
Steven Black 2c24227ea1 Issue #1678 — add s.clcktrax.com. 2021-06-16 23:44:42 -04:00
Steven Black 9cca4f1506 Issue #1679 — add c.hrzn-nxt.com. 2021-06-16 23:40:45 -04:00
Steven Black 36e7022307 Issue #1675 — add vlitag.com domains. 2021-06-16 23:34:38 -04:00
Steven Black f67b8cfcec Issue #1683 — add gmial.com domains. 2021-06-16 23:24:24 -04:00
Steven Black c74ad7c588 Release 3.7.8 2021-06-07 09:37:05 -04:00
Steven Black 723f0ac68d Updates from yoyo.org, URLHaus, digitalside.it, orca.pet, KADhosts, hostsVN, Adguard, and Adaway. 2021-06-07 09:36:39 -04:00
Steven Black badb91ba78 Merge pull request #1676 from DandelionSprout/patch-1
Ran PyFunceble on «Steven Black's ad-hoc list»; ~42% of the domains are dead or down
2021-06-07 09:27:37 -04:00
Imre Kristoffer Eilertsen 35860c801a Ran PyFunceble on this list 2021-06-03 21:39:17 +02:00
Steven Black 433049d905 Release 3.7.7 2021-05-31 12:03:18 -04:00
Steven Black 70884b069e Updates from yoyo.org, URLHaus, someonewhocares.org, shady-hosts, digitalside.it, orca.pet, KADhosts, Adguard, and AdAway. 2021-05-31 12:02:57 -04:00
Steven Black a6d995d94d Issue 1672: add speakol.com domains. 2021-05-31 11:56:13 -04:00
Steven Black 8b677f273d Release 3.7.6 2021-05-25 12:52:27 -04:00
Steven Black 80a049b36d Updates from yoyo.org, URLHaus, shady-hosts, digitalside.it, KADhosts, adguard, and AdAway. 2021-05-25 12:51:56 -04:00
Steven Black c4f7936057 Merge pull request #1665 from SageBrushes/patch-1
remove JW Player entries
2021-05-25 12:44:05 -04:00
SageBrushes 8da1f68409 Removed JW Player entries
The JW Player entries below are not used to serve ads, but video content on the JW platform. While it is possible for a video ad creative to be served by the JW platform,  it is not a major use-case of the JW platform  and should not be included in an ad blocker.

0.0.0.0 videos-cloudflare.jwpsrv.com  # video ads
0.0.0.0 videos-fms.jwpsrv.com  # video ads
2021-05-25 11:29:41 -04:00
Steven Black ad34acf46b Release 3.7.5 2021-05-22 10:50:16 -04:00
Steven Black bd72b10add Updates from yoyo.org, URLHaus, digitalside.it, orca.pet, KADHosts, and AdAway. 2021-05-22 10:49:42 -04:00
Steven Black 7ad72d7615 Added from Issue #1661. 2021-05-22 10:38:50 -04:00
Steven Black b96b4b596c Issue #1646: add two domains. 2021-05-22 10:36:09 -04:00
Steven Black 74606d0545 Release 3.7.4 2021-05-17 15:05:33 -04:00
Steven Black dcc468f7f2 Updates from yoyo.org, URLHaus, someonewhocares.org, digitalside.it, KADHosts, Adguard, and AdAway. 2021-05-17 15:05:12 -04:00
Steven Black ce669d0591 Release 3.7.3 2021-05-15 23:22:02 -04:00
Steven Black 18f1298eb7 Updated from clefspeare13, yoyo.org, URLHaus, someonewhocares.org, digitalside.it, orca.pet, and KADhosts. 2021-05-15 23:20:11 -04:00
Steven Black cd011f88f6 Release 3.7.2 2021-05-12 09:24:58 -04:00
Steven Black fda33828bd Updates from yoyo.org, URLHaus, someonewhocares.org, digitalside.it, orca.pet, KADhosts, hostsVN, Badd-Boyz, and Adguard. 2021-05-12 09:24:39 -04:00
Steven Black 9cd1d30dec Add urgente.eu. 2021-05-12 09:14:28 -04:00
Steven Black 63fb683ca6 Issue #1643: Fix typo im host file comment. 2021-05-10 11:47:07 -04:00
Steven Black f974eb031a Issue #1643: fix — add 28 .cn domains from ookangzheng-blacklist-cname. 2021-05-10 00:04:03 -04:00
Steven Black e0487c132b Updates from URLHaus, and regenerate the readme files. 2021-05-06 15:56:17 -04:00
Steven Black c2ceaa1721 Move the new Windows-related text and make it a subpart of the previous section. 2021-05-06 15:54:45 -04:00
Steven Black 567590f914 Remove separator line, which isn't needed. 2021-05-06 15:52:39 -04:00
Steven Black b933b7dc3f Release 3.7.1 2021-05-06 15:51:28 -04:00
Steven Black 60daf1b4ea Updates from yoyo.org, URLHaus, orca.pet, and KADhosts. 2021-05-06 15:51:08 -04:00
Steven Black 84a9a2fbe3 Soft edits to the Windows instructions in the readme. 2021-05-06 15:49:14 -04:00
Steven Black 18b6f49b0c Merge pull request #1640 from FadeMind/patch-1121
add disable-dnscache-service-win.cmd
2021-05-06 13:27:21 -04:00
FadeMind 94dacdc288 readme_template.md dnscache notice 2021-05-06 19:10:01 +02:00
FadeMind 9d8a4f0597 add disable-dnscache-service-win.cmd 2021-05-06 18:09:37 +02:00
Steven Black 30128036d3 Release 3.7.0 2021-05-06 09:25:12 -04:00
Steven Black 27213aebbd Add minecraft-hosts list. 2021-05-06 09:24:51 -04:00
Steven Black 58ed572ba7 Updates from yoyo.org, URLHaus, digitalside.it, KADhosts, and hostsVN. 2021-05-06 09:24:19 -04:00
Steven Black 40c5d2806d Merge pull request #1639 from jamierocks/minecraft-hosts
Add minecraft-hosts tracking domains
2021-05-06 09:20:20 -04:00
Jamie Mansfield 4a6715f035 Add minecraft-hosts tracking domains 2021-05-06 10:57:56 +01:00
Steven Black cc382ca70f Release 3.6.11 2021-05-05 15:19:47 -04:00
Steven Black b4b611e55a Updates from KADhosts, URLHaus, digitalside.it, and Adaway. 2021-05-05 15:19:29 -04:00
Steven Black 36ebe82fe0 Release 3.6.10 2021-05-04 23:36:40 -04:00
Steven Black 628ef5ef74 Updates from yoyo.org, URLHaus, shady-hosts, digitalside.it, KADHosts, hostsVN, Badd-Boyz, and Adguard. 2021-05-04 23:36:22 -04:00
Steven Black 708fc8ad43 Issue #1635: add docs.pipenv.org. 2021-05-04 13:42:25 -04:00
Steven Black b7f0f0a8aa Release 3.6.9 2021-05-01 09:56:29 -04:00
Steven Black 143761d99b Updates from yoyo.org, URLHaus, digitalside.it, and KADhosts. 2021-05-01 09:56:03 -04:00
Steven Black 4f32220ea6 Merge pull request #1633 from PromoFaux/tweak/readme_template
Remove dead link (alt to #1632)
2021-05-01 09:34:52 -04:00
Adam Warner 189e5b0551 Dead link - this is no longer an officially endorsed product
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-05-01 10:58:05 +01:00
Steven Black 037f143f2d Release 3.6.8 2021-04-29 19:53:38 -04:00
Steven Black 122360c1c9 Updates from yoyo.org, URLHaus, digitalside.it, KADhosts, and hostsVN. 2021-04-29 19:53:21 -04:00
Steven Black 97766531df Issue #1631: added 4 new domains. 2021-04-29 19:49:22 -04:00
Steven Black 19302c4975 Merge pull request #1629 from XhmikosR/patch-1
Fix URLHaus/update.json
2021-04-27 10:35:23 -04:00
XhmikosR b813657131 Fix URLHaus/update.json 2021-04-27 15:47:29 +03:00
Steven Black 13f9433284 Release 3.6.7 2021-04-26 18:03:12 -04:00
Steven Black 560e40c1e5 Updates from URLHaus, and KADhost. 2021-04-26 18:00:29 -04:00
Steven Black 8804c324a2 Issue #1628: fix — re-add URLHaus. 2021-04-26 17:58:26 -04:00
Steven Black 023eb7faa7 Issue #1628: fix — parse out @ characters from lists. 2021-04-26 17:55:39 -04:00
Steven Black 2b167dcce8 Better name for is_valid_user_provided_domain_format. 2021-04-26 17:08:38 -04:00
Steven Black 1d515c1de3 Standardize the exclusionregexs symbol. 2021-04-26 16:39:07 -04:00
Steven Black f87007cc61 Release 3.6.6 2021-04-26 12:46:46 -04:00
Steven Black 0a022ab381 Updates from yoyo.org, digitalside.it, KADhosts, and Adguard. 2021-04-26 12:46:28 -04:00
Steven Black 783764d0b4 Issue #1628: fix — temporarily drop URLHaus due to formatting issues. 2021-04-26 12:44:06 -04:00
Steven Black 227c83fbdf Release 3.6.5 2021-04-24 12:03:02 -04:00
Steven Black 8c24637605 Updates from yoyo.org, URLHaus, someonewhocares.org, digitalside.it, orca.pet, KADhosts, hostsVN, Badd-Boyz, Adguard, and AdAway. 2021-04-24 12:02:39 -04:00
Steven Black 33823d682c Release 3.6.4 2021-04-19 23:49:08 -04:00
Steven Black e58b6f2cff Updates from sinfonietta, yoyo.org, URLHaus, someonewhocares.org, digitalside.it, orca.pet, KADHosts, hostsVN, Badd-Boyz, Adguard, and Adaway. 2021-04-19 23:48:24 -04:00
Steven Black c202dbda75 Release 3.6.3 2021-04-13 10:10:21 -04:00
Steven Black 3753195d75 Updates from yoyo.org, URLHaus, someonewhocares.org, digitalside.it, KADHosts, hostsVN, Badd-Boyz, and AdAway. 2021-04-13 10:09:39 -04:00
Steven Black cdbcd45689 Release 3.6.2 2021-04-09 13:23:30 -04:00
Steven Black 4dbe23da78 Updates from yoyo.org, URLHaus, someonewhocares.org, gigitalside.it, orca.pet, KADhosts, , Badd-Boyz, and AdAway. 2021-04-09 13:23:10 -04:00
Steven Black 358526ed78 Release 3.6.1 2021-04-04 21:14:48 -04:00
Steven Black 66a7f9b2c6 Updates from yoyo.org, URLHaus, someonewhocares.org, digitalside.it, orca.pet, KADhosts, Badd-Boyz, and AdAway. 2021-04-04 21:14:22 -04:00
Steven Black 777ffdea9d Issue #1591: Add domains from this issue. 2021-04-02 19:47:34 -04:00
Steven Black 65a12dcfa2 Release 3.6.0 2021-03-31 16:02:05 -04:00
Steven Black b7b29261db Updates from URLHaus, someonewhocares.org, shady-hosts, digitalside.it, KADhosts, hostsVN, Badd-Boyz, and AdAway. 2021-03-31 16:01:37 -04:00
Steven Black 2b29fa67b5 @StevenBlack Issue #1563: fix — add hosts file from AdguardTeam cname-trackers. 2021-03-31 15:58:36 -04:00
Steven Black 5f5db225c9 Issue #1563: fix — new data subfolder for AdguardTeam cname trackers 2021-03-31 15:56:04 -04:00
Steven Black 71a7b2be4a Merge pull request #1588 from funilrys/support-raw
Introduction of the support of RAW lines/sources
2021-03-31 15:45:00 -04:00
funilrys d3c34ed854 Add black recommended configuration. 2021-03-31 14:58:18 +02:00
funilrys 4b1a939668 Apply black+isort 2021-03-31 14:57:56 +02:00
funilrys 7971a0cbc9 Introduction of the support of RAW lines.
This patch fixes https://github.com/StevenBlack/hosts/issues/1563#issuecomment-810688754

Indeed, before this patch, the updater was not supporting a RAW (not
hosts) list of domains as input.

Changes:

    matches_exclusions():
        (new) Support for rule formatted as 'example.com' along with
              the pre-existing '0.0.0.0 example.com'.

    normalize_rule():
        (edit) Apply DRY.

        (new) Support the normalization of the rule formatted as
              'example.com' along with the pre-existing '0.0.0.0
              example.com'.

    strip_rule():
        (new) Complete rewrite in order to strip all possible lines.
2021-03-31 14:53:22 +02:00
Steven Black 261acf1dfa Release 3.5.3 2021-03-28 17:07:02 -04:00
Steven Black 6e92030388 Updates from yoyo.org, URLHaus, someonewhocares.org, digitalside.it, orca.pet, KADhosts, hostsVN, Badd-Boyz. 2021-03-28 17:06:28 -04:00
Steven Black ab40f585ed Merge pull request #1581 from esadkrs/master
Happy New Year
2021-03-23 09:52:03 -04:00
esadkrs 8d805df2b2 Happy New Year 2021-03-23 00:08:02 -04:00
Steven Black 0977726aa3 Release 3.5.2 2021-03-21 22:56:21 -04:00
Steven Black 470308d391 Updates from yoyo.org, URLHaus, shady-hosts.com, digitalside.it, orca.pet, KADHosts, hostsVN, and Badd-Boyz. 2021-03-21 22:56:03 -04:00
Steven Black 8a6d3f49e3 Release 3.5.1 2021-03-16 11:55:34 -04:00
Steven Black 385e7de3da Updates from clefspeare13, yoyo.org, URLHaus, digitalside.it, KADhosts, hostsVN, Badd-Boyz, and AdAway. 2021-03-16 11:55:16 -04:00
Steven Black 54ccdaa119 Merge pull request #1577 from FadeMind/patch-1
ADD facilitategovernor.com
2021-03-15 16:22:30 -04:00
FadeMind 22d1a77116 ADD variants facilitategovernor.com 2021-03-15 20:54:37 +01:00
FadeMind 1dfd397901 ADD facilitategovernor.com
Annoying lots of popups with this domain. Default blocked by ESET.
2021-03-15 12:53:26 +01:00
Steven Black 76ea58a705 Release 3.5.0 2021-03-10 21:13:10 -05:00
Steven Black 8bf7c52923 Updates from MetaMask, URLHaus, digitalside.it, KADhosts, and AdAway. 2021-03-10 21:12:41 -05:00
Steven Black 0d740f4f33 Issue #1418: fix the metabask raw hosts url. 2021-03-10 21:09:48 -05:00
Steven Black 8f49b0667a Merge pull request #1570 from StevenBlack/metamask.inclusion
Issue #1418: prepare for inclusion of MetaMask/eth-phishing-detect into the base list.
2021-03-10 21:03:20 -05:00
Steven Black f002fb33a3 Issue #1418: prepare for inclusion of MetaMask/eth-phishing-detect into the base list. 2021-03-10 00:43:20 -05:00
Steven Black e38b2f4ac7 Release 3.4.6 2021-03-09 14:37:59 -05:00
Steven Black 81bd99cb19 Updates from yoyo.org, URLHaus, someonewhocares.org, digitalside.it, orca.pet. KADhosts, hostsVN, Badd-Boyz, and AdAway. 2021-03-09 14:37:42 -05:00
Steven Black f790da9067 Release 3.4.5 2021-03-06 17:51:42 -05:00
Steven Black 82c18786de Updates from yoyo.org, URLHaus, someonewhocares.org, shady-hosts, digitalside.it, orca.pet, mvps.org, KADHosts, hostsVN, Badd-Boyz, add.risk, and AddAway. 2021-03-06 17:51:15 -05:00
Steven Black df10691d81 Release 3.4.4 2021-02-28 14:27:59 -05:00
Steven Black d2be343994 Updates from URLHaus, digitalside.it, KADhosts, hostsVN, and Badd-Boyz. 2021-02-28 14:27:41 -05:00
Steven Black 16070f1a77 Issue #1559 — add scam phish site. 2021-02-28 13:54:55 -05:00
Steven Black c4df4ceb28 Release 3.4.3 2021-02-26 11:12:34 -05:00
Steven Black eff4dbe62e Updates from yoyo.org, URLHaus, digitalside.it, KADhosts, Badd-Boyz, and AdAway. 2021-02-26 11:12:15 -05:00
Steven Black 1485491816 Issue #1558: add new hosts. 2021-02-26 11:02:51 -05:00
Steven Black 99f3890c2f Release 3.4.2 2021-02-22 09:15:37 -05:00
Steven Black 6aa31cb4ad Updates from URLHaus, someonewhocares.org, digitalside.it, KADhosts, hostsVN, and Badd-Boyz. 2021-02-22 09:15:10 -05:00
Steven Black b8c1ead93f Release 3.4.1 2021-02-21 18:15:00 -05:00
Steven Black d4fd41f558 Updates from yoyo.org, URLHaus, shady-hosts, digitalside.it, orca.pet, KADHosts, and hostsVN.
Holding off on publishing Badd-Boyz' latest update.  See https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues/85
2021-02-21 18:14:19 -05:00
Steven Black 23097a29af Release 3.4.0 2021-02-16 17:50:52 -05:00
Steven Black cbf8924292 Updates from clefspeare, yoyo.org, URLHaus, someonewhocares.org, gigitalside.it, KADhosts, Badd-Boyz, AdAway, and introducing orca.pet. 2021-02-16 17:50:13 -05:00
Steven Black 5fe1f0c874 Issue #1439: Add the orca.pet “Not On My Shift” curated source, maintained by @socram8888 2021-02-16 17:45:45 -05:00
Steven Black f4e7733873 Release 3.3.14 2021-02-14 17:03:48 -05:00
Steven Black 3c38a5f666 Updates from yoyo.org, sinfonietta, someonewhocares.org, shady-hosts, digitalside.it, KADhosts, Badd-Boyz, and AdAway. 2021-02-14 17:03:25 -05:00
Steven Black f5790a9017 Release 3.3.13 2021-02-09 10:31:22 -05:00
Steven Black b1ab45ebdf Updates from URLHaus, someonewhocares.org, digitalside, and KADhosts. 2021-02-09 10:31:06 -05:00
Steven Black 3be28f5986 Issue #1536: add vkcache dot com. 2021-02-09 10:15:56 -05:00
Steven Black 72fd592e61 Fix typo I introduced in commit cba09a9cbf. 2021-02-09 09:53:46 -05:00
Steven Black 6f0edd6767 Release 3.3.12 2021-02-08 16:09:42 -05:00
Steven Black b0edd803fc Updated from clefspeare13, yoyo.org, URLHaus, someonewhocares.org, digitalside.it, KADhosts, hostsVN, Badd-Boyz, and AdAway. 2021-02-08 16:09:21 -05:00
Steven Black c6c6cb4463 Merge pull request #1529 from XhmikosR/patch-1
Update CI config
2021-02-07 14:11:43 -05:00
Steven Black fd783d4551 Merge pull request #1530 from XhmikosR/patch-2
readme_template: link to the master actions
2021-02-07 14:10:51 -05:00
XhmikosR 649034d269 readme_template: link to the master actions 2021-02-06 17:15:06 +02:00
XhmikosR cbeadb1e2b Update CI config
* remove unneeded `CI: true` env var since it's already set by the runner
* update to `actions/setup-python@v2`
* remove `x64` architecture since it's the default
2021-02-06 17:06:48 +02:00
Steven Black cba09a9cbf Added hosts from https://supunkavinda.blog/disqus article (Disqus). 2021-02-05 10:02:29 -05:00
Steven Black 963c0def7e Release 3.3.11 2021-02-03 13:45:35 -05:00
Steven Black 3f7e0b6b9a Updates from yoyo.org, URLHaus, digitalside.it, KADhosts, and AdAway. 2021-02-03 13:45:15 -05:00
Steven Black 6f15c4a81a Release 3.3.10 2021-02-02 10:08:18 -05:00
Steven Black 423cda56f0 Updates from yoyo.org, URLHaus, digitalside.it, KADhosts, HostsVN, and Badd-Boyz. 2021-02-02 10:07:58 -05:00
Steven Black 26704e1b29 Issue #1522 add eu1-spiky.wzrkt.com. 2021-02-02 09:45:35 -05:00
Steven Black 17915dc98e Release 3.3.9 2021-01-31 13:29:59 -05:00
Steven Black 840ee7d5be Updates from URLHaus, shady-hosts, digitalside.it, KADhosts, hostsVN, Badd-Boyz, and add.Risk. 2021-01-31 13:29:38 -05:00
Steven Black 6bf1f000d6 Merge pull request #1515 from nalekberov/master
Add adviad.com domain
2021-01-29 10:26:48 -05:00
Nurlan Alakbarov 725f977d04 Remove main domain adviad.com 2021-01-29 08:00:08 +01:00
Nurlan Alakbarov 54be8d0be7 Add subdomains for adviad.com 2021-01-27 20:27:41 +01:00
Nurlan Alakbarov 5a1b192fcd Add adviad.com 2021-01-27 14:23:38 +01:00
Steven Black 62d6b8c6cd Release 3.3.8 2021-01-24 16:05:00 -05:00
Steven Black 3c50aed4ed Updates from URLHaus, digitalside.it, and KADHosts. 2021-01-24 16:04:44 -05:00
Steven Black 7ac09a4f4d Release 3.3.7 2021-01-23 20:18:55 -05:00
Steven Black a4e722bf57 Add a bunch of livejasmin domains. 2021-01-23 20:17:32 -05:00
Steven Black 642e3d1b6a Addendum to commit 54a3d647 — three more domains. 2021-01-23 10:23:13 -05:00
Steven Black 3418ef2cf3 Addendum to comit 5a500b1f16, add two more domains. 2021-01-23 09:47:19 -05:00
Steven Black 69909796ec Release 3.3.6 2021-01-22 21:53:50 -05:00
Steven Black 72233bbbec Refresh readme files, and regenerate hosts files. 2021-01-22 21:53:32 -05:00
Steven Black a946fb96c8 Minor edits to the readme_template. 2021-01-22 21:51:26 -05:00
Steven Black 84e4dc1e0b The Python 3.5+ constraint is now mentioned only under 'Generate your own...' 2021-01-22 21:45:51 -05:00
Steven Black 5c38598d2d Sort my own list just the way I like it. 2021-01-22 21:38:34 -05:00
Steven Black ee3bf86a36 Release 3.3.5 2021-01-22 21:27:59 -05:00
Steven Black e3505409a3 Updates from yoyo.org, URLHaus, someonewhocares.org, shady-hosts, digitalside.it, and KADHosts. 2021-01-22 21:27:29 -05:00
Steven Black 5a500b1f16 Add two pop-under domains. 2021-01-22 16:27:27 -05:00
Steven Black 54a3d64743 Add creative.alxbgo.com. 2021-01-22 16:25:27 -05:00
Steven Black 140beebcb5 Merge pull request #1508 from FadeMind/patch-3
Adware domain: resumersvo.fun
2021-01-19 22:45:07 -05:00
FadeMind e1fbf7cd5f Adware domain: lismcanalys.fun 2021-01-19 15:58:29 +01:00
FadeMind b384f3d324 Adware domain: resumersvo.fun
Adware domain. Blocked in default by ESET.
2021-01-19 15:49:48 +01:00
Steven Black 82685dc144 Release 3.3.4 2021-01-17 17:45:24 -05:00
Steven Black 46ff6ae276 Updates from AdAway, hostsVN, KADhosts, digitalside.it, someonewhocares.org, URLHaus, and youo.org. 2021-01-17 17:44:53 -05:00
Steven Black 90eb6858cb Release 3.3.3 2021-01-12 12:58:11 -05:00
Steven Black bfa3607c29 Updates from yoyo.org, URLHaus, shady-hosts, digitalside.it, KADhosts, hostsVN, and AdAway. 2021-01-12 12:57:48 -05:00
Steven Black 186c6aca5f Bump release-it to version 14.2.2. 2021-01-06 22:55:30 -05:00
Steven Black b840587775 Release 3.3.2 2021-01-05 15:39:43 -05:00
Steven Black 885d870134 Updates from yoyo.org, URLHaus, shady-hosts, digitalside.it, KADhosts, hostsVN, and Badd-Boyz. 2021-01-05 15:39:20 -05:00
Steven Black 91b65a8b79 Release 3.3.1 2021-01-02 17:33:11 -05:00
Steven Black db488f56f9 Updates from yoyo.org, URLHaus, shady-hosts, digitalside.it, KADhosts, and badd-boyz. 2021-01-02 17:32:51 -05:00
Steven Black 15ea6d0f6d Release 3.3.0 2020-12-31 14:23:18 -05:00
Steven Black 0cee7eb988 Updates from shady-hosts, URLHaus, digitalside.it, KADHosts, HostsVN, Badd-Boyz, and AdAway. 2020-12-31 14:22:49 -05:00
Steven Black 0692e44515 New locator for KADHosts. 2020-12-31 14:19:09 -05:00
Steven Black 69ea323cf6 Merge pull request #1492 from shreyasminocha/shady-hosts
Add source shady-hosts
2020-12-31 13:54:42 -05:00
Shreyas Minocha a3abfc86d6 Move shady-hosts to GitHub 2021-01-01 00:12:55 +05:30
Shreyas Minocha 626711d2ba Issue #1491: add shady-hosts source to the repo. 2020-12-31 21:51:17 +05:30
Steven Black 56f6051c2e Release 3.2.13 2020-12-26 18:52:23 -05:00
Steven Black 1f52e1fd6e Updates from yoyo.org, URLHaus, someonewhocares.org, digitalside.it, KADHosts, and BaddBoyz. 2020-12-26 18:49:48 -05:00
Steven Black a204d5a1e9 Merge pull request #1486 from timgates42/bugfix_typo_separator
docs: fix simple typo, seprator -> separator
2020-12-22 00:26:06 -05:00
Tim Gates f6d8977748 docs: fix simple typo, seprator -> separator
There is a small typo in testUpdateHostsFile.py.

Should read `separator` rather than `seprator`.
2020-12-22 08:16:04 +11:00
Steven Black 458804c51c Upgrade the congratulations on merging message to first time contributors. 2020-12-19 18:05:19 -05:00
Steven Black 2741273b20 Release 3.2.12 2020-12-19 13:42:23 -05:00
Steven Black 38ab6803b0 Updates from yoyo.org, URLHaus, digitalside.it, mvps.org, KADhosts, hostsVN, Badd-Boyz, and AdAway. 2020-12-19 13:42:05 -05:00
Steven Black 575813f15f Merge pull request #1485 from Lateralus138/master
Added BlackHosts link to the "Interesting Applications" section
2020-12-19 00:15:01 -05:00
Ian Pride 92ffe9fc14 Added BlackHosts link to the "Interesting Applications" section
Hope someone gets good use of this!
2020-12-18 23:00:47 -06:00
Steven Black b19a01ef73 Release 3.2.11 2020-12-14 11:27:52 -05:00
Steven Black bee8521bc6 Updates from clefspeare13, yoyo.org, URLHaus, someonewhocares.org, KADhosts, Badd-Boyz, and AdAway. 2020-12-14 11:27:35 -05:00
Steven Black 5e4813cf9b Add osint.digitalside.it source to the repo.
Ref: https://github.com/StevenBlack/hosts/commit/9b412a7cbfd726faed9019c27f660b15972598b1
2020-12-14 11:19:20 -05:00
Steven Black 69fa29ffaa Release 3.2.10 2020-12-09 01:18:59 -05:00
Steven Black 5e6f3d86b6 updates from yoyo.org, URLHaus, tiuxo, someonewhocares.org, KADhosts, hostsVN, Badd-Boyz, and AdAway. 2020-12-09 01:18:27 -05:00
Steven Black b553a9f7fc Release 3.2.9 2020-12-02 14:22:03 -05:00
Steven Black 2595829922 Updates from yoyo.org, URLHaus, KADHosts, hostsVN, and AdAway. 2020-12-02 14:21:39 -05:00
Steven Black 9b412a7cbf Remove osint.digitalside.it from this repo. 2020-12-02 14:18:46 -05:00
Steven Black 80b0ee1c4c Release 3.2.8 2020-11-28 23:37:07 -05:00
Steven Black 1b62b56d99 Updates from yoyo.org, URLHaus, digitalside.it, KADhosts, Badd-Boyz, and AdAway. 2020-11-28 23:36:49 -05:00
Steven Black aa377ddd14 Release 3.2.7 2020-11-25 17:12:09 -05:00
Steven Black dfb50bf3cf Updates from clefspeare, yoyo.org, URLHaus, someonewhocares.org, digitalside.it, KADhosts, and AdAway. 2020-11-25 17:11:47 -05:00
Steven Black 420113fb8d Bump release-it to v.14.2.1. 2020-11-22 12:23:55 -05:00
Steven Black e1af4f45d9 Release 3.2.6 2020-11-22 12:22:58 -05:00
Steven Black f6a45ec8a2 Updates from yoyo.org, URLHaus, someovewhocares.org, digitalside.it, KADhost, hostsVN, and AdAway. 2020-11-22 12:22:40 -05:00
Steven Black 7846075c25 Issue #1466: add pamsg.online. 2020-11-22 12:12:32 -05:00
Steven Black 5c614ca1d8 Release 3.2.5 2020-11-19 09:20:54 -05:00
Steven Black 5c058ce332 Updates from yoyo.org, URLHaus, digitalside.it, KADhosts, hostsVN, Badd-Boyz, and AdAway. 2020-11-19 09:20:34 -05:00
Steven Black ee8868cb65 Release 3.2.4 2020-11-19 09:15:42 -05:00
Steven Black d9273762bf Issue #1465: add opengapps.com. 2020-11-19 09:14:45 -05:00
Steven Black 88ca32af94 Release 3.2.3 2020-11-16 14:09:42 -05:00
Steven Black 372c65f703 Updates from yoyo.org, URLHaus, digitalside.it, KADhosts, hostsVN, and AdAway. 2020-11-16 14:09:11 -05:00
Steven Black 2e115c35d2 Issue #1463: fix — remove problem domain. 2020-11-16 14:00:18 -05:00
Steven Black 43ac279435 Release 3.2.2 2020-11-15 13:44:59 -05:00
Steven Black e200e600d5 Updates from URLHaus, digitalside.it, KADhosts, Badd-Boyz, and AdAway. 2020-11-15 13:44:41 -05:00
Steven Black de32eb3d33 Issue #1463: fix — add diacritics.com subdomains. 2020-11-15 13:35:04 -05:00
Steven Black af9cc115a9 Issue #1464: fix — force a new line prior to the End comment statement. 2020-11-15 13:32:36 -05:00
Steven Black ac175ae7ac Release 3.2.1 2020-11-14 11:05:33 -05:00
Steven Black 048e83221b Updates from clefspeare13, yoyo.org, URLHaus, digitalside.it, KADhosts, and AdAway. 2020-11-14 11:05:14 -05:00
Steven Black 8d617d299e Release 3.2.0 2020-11-10 15:18:46 -05:00
Steven Black f6f5a6c6a6 Updates from URLHaus, someonewhocares.org, digitalside.it, KADhosts, hostsVN, and AdAway. 2020-11-10 15:18:19 -05:00
Steven Black 91b00d9ff7 Issues #1455, #1403, #1367 and others: remove malwaredomainlist from the repo. 2020-11-10 15:12:06 -05:00
Steven Black 193c668aeb Release 3.1.5 2020-11-08 20:42:54 -05:00
Steven Black 881fa64e6d Updates from yoyo.org, URLHaus, tiuxo, someonewhocares.org, digitalside.it, KADhosts, and AdAway. 2020-11-08 20:40:41 -05:00
Steven Black b72648459c Release 3.1.4 2020-11-03 10:55:45 -05:00
Steven Black bc05e49afa Updates from yoyo.org, URLHaus, digitalside.it, KADhosts, hostsVN, and AdAway. 2020-11-03 10:55:25 -05:00
Steven Black e90044563d Release 3.1.3 2020-11-01 15:42:07 -05:00
Steven Black 59d57e910d Updates from yoyo.org, URLHaus, someonewhocares.org, digitalside.it, KADhosts, hostsVN, and AdAway. 2020-11-01 15:41:21 -05:00
Steven Black f109912442 Remove inactive domains. 2020-11-01 15:30:08 -05:00
Steven Black 833e3f8ef5 Merge pull request #1446 from XhmikosR/patch-2
Create codeql-analysis.yml
2020-10-31 16:34:23 -04:00
Steven Black 38abfff268 Merge pull request #1445 from XhmikosR/patch-1
CI: add Python 3.9
2020-10-31 16:29:57 -04:00
XhmikosR dea68fc51d Create codeql-analysis.yml 2020-10-31 18:58:49 +02:00
XhmikosR c95763d3e1 CI: add Python 3.9 2020-10-31 18:38:40 +02:00
Steven Black 422ce949c7 Bump release-it package to v14.2. 2020-10-29 10:52:36 -04:00
Steven Black bc0b418251 Release 3.1.2 2020-10-29 10:51:18 -04:00
Steven Black b5da9af576 Updates from clefspeare13, fakenews, yoyo.org, URLHaus, someonewhocares.org, digitalside, mvps.org, KADhosts, hostsVN, and Badd-Boyz. 2020-10-29 10:50:43 -04:00
Steven Black 1cd35b6c75 Issue #1437: add gameads.io domains. 2020-10-23 15:00:12 -04:00
Steven Black b021448cfe Reapply the commit for Issue #1433. 2020-10-20 11:41:39 -04:00
Steven Black 079471f39a Release 3.1.1 2020-10-19 19:54:09 -04:00
Steven Black d8591c3294 Updates from clefspeare13, yoyo.org, URLHaus, someonewhocares.org, KADHosts, Badd-Boyz, and AdAway. 2020-10-19 19:53:35 -04:00
Steven Black d06c30d05f Issue #1433: add four new hosts. 2020-10-19 19:41:32 -04:00
Steven Black 69a95807e4 Merge pull request #1434 from FadeMind/master
ADD:osint.digitalside.it
2020-10-19 19:15:00 -04:00
fademind e774b39101 ADD:osint.digitalside.it 2020-10-19 13:48:51 +02:00
Steven Black 750faf4b12 Release 3.1.0 2020-10-14 23:20:36 -04:00
Steven Black 6547447448 Updates from clefspeare13, yoyo.org, URLHaus, KADhosts, Badd-Boyz, and AdAway. 2020-10-14 23:19:59 -04:00
Steven Black babe52a977 Update the readme_template with Docker instructions. 2020-10-14 23:14:47 -04:00
Steven Black 9fcac05480 Change the WORKDIR after the git clone step. 2020-10-13 23:53:15 -04:00
Steven Black cce7894b3a Add some basic run instructions (comments) in the Dockerfile 2020-10-13 23:44:32 -04:00
Steven Black aef9829fd7 Add a first-pass Dockerfile. 2020-10-13 23:36:40 -04:00
Steven Black e772566dc3 Release 3.0.7 2020-10-13 21:25:25 -04:00
Steven Black 0d2f7da5d5 Updates from clefspeare13, yoyo.org, URLHaus, someonewhocares.org, KADhosts, hostsVN, and Badd-Boyz. 2020-10-13 21:25:08 -04:00
Steven Black 5a5016ab5b Release 3.0.6 2020-10-08 23:53:18 -04:00
Steven Black 663fb2d434 Updates from yoyo.org, URLHaus, someonewhocares.org, KADHosts, hostsVN, and AdAway. 2020-10-08 23:52:51 -04:00
Steven Black 586f4c2942 Release 3.0.5 2020-10-03 00:17:35 -04:00
Steven Black 6faa4d8296 Updates from sinfonietta, yoyo.org, URLHaus, someonewhocares.org, KADhosts, hostsVN, and Badd-Boyz. 2020-10-03 00:17:17 -04:00
Steven Black 9876dde1c2 Issue #1414: add two new domains. 2020-10-02 13:41:35 -04:00
Steven Black 468ba5547a Merge pull request #1413 from FadeMind/patch-2
updateHostsWindows.bat: fix python exe cmd
2020-09-30 16:57:15 -04:00
FadeMind 7c1365787b updateHostsWindows.bat: fix python exe cmd
Python for Windows using py.exe launcher command and should be used here as well.
2020-09-30 16:27:01 +02:00
Steven Black dccdf794a2 Release 3.0.4 2020-09-26 16:01:32 -04:00
Steven Black 611c4a0bf7 Updates from yoyo.org, URLHaus, someonewhocares.org, KADhosts, hostsVN, and Badd-Boyz. 2020-09-26 16:01:04 -04:00
Steven Black 6ebfc1ed2d Issue #1409: fix — remove unnecessary and confusing Windows flush DNS instructions. 2020-09-26 15:54:34 -04:00
Steven Black 32242792ba Release 3.0.3 2020-09-20 22:36:21 -04:00
Steven Black f60686d0ff Issue #1392 — set the minimum version of Requests to v2.20. 2020-09-20 22:36:00 -04:00
Steven Black dc595848b1 Updates from yoyo.org, URLHaus, someonewhocares.org, KADhosts, hostsVN, and Badd-Boyz. 2020-09-20 22:28:59 -04:00
Steven Black d06f3d2c1a Release 3.0.2 2020-09-14 22:28:59 -04:00
Steven Black 9ae4f735ca Updates from yoyo.org, URLHaus, someonewhocares.org, mvps.org, KADhosts, hostsVM, Badd-Boyz, and AdAway. 2020-09-14 22:28:40 -04:00
Steven Black f45e7e459a Release 3.0.1 2020-09-07 21:21:04 -04:00
Steven Black ea69ee1498 Updates from yoyo.org, URLHaus, KADhosts, hostsVN, and Badd-Boyz. 2020-09-07 21:20:44 -04:00
Steven Black 0060ef11a6 Release 3.0.0 2020-09-02 22:05:42 -04:00
Steven Black 393b7c3bec Updates from yoyo.org, URLHaus, someonewhocares.org, KADhosts, Badd-Boyz, and AdAway. 2020-09-02 22:05:16 -04:00
Steven Black a0e2e39a3f Merge pull request #1392 from AlexanderCecile/introduce-requests
Introduce the Requests library
2020-09-02 21:58:51 -04:00
Alexander Cecile b350c68540 Improved tests for get_file_by_url 2020-09-02 20:25:01 -04:00
Alexander Cecile d85c96576a Remove unused test code 2020-08-28 03:18:41 -04:00
Alexander Cecile ad35681244 Improve tests for get_file_by_url 2020-08-28 03:17:06 -04:00
Alexander Cecile 59ddd34d0e Changed dependency-related exception to be compatible with Python versions < 3.6 2020-08-28 01:51:14 -04:00
Alexander Cecile 1019c6ae00 Improve the error raised when the new dependency is missing 2020-08-28 00:17:50 -04:00
Steven Black 099954eb46 Release 2.7.13 2020-08-25 21:01:49 -04:00
Steven Black 942aaae90c Updates from sinfonietta, fakenews, yoyo.org, URLHaus, KADhosts, hostsVN, and AdAway. 2020-08-25 21:01:16 -04:00
Alexander Cecile 06483cca1d Update error handling in get_file_by_url
I don't believe the the .text could actually raise that exception. Oops.
2020-08-25 20:48:35 -04:00
Alexander Cecile 26b2ab9e5a Add basic tests for get_file_by_url 2020-08-25 20:40:30 -04:00
Alexander Cecile 083db6955e Implement error handling and improve documentation in get_file_by_url 2020-08-25 18:28:21 -04:00
Steven Black 556545a612 Issue #1394 — add collect.installeranalytics.com. 2020-08-24 19:03:44 -04:00
Steven Black b8c4dfdcc6 Merge pull request #1396 from tanrax/patch-3
Add Maza in readme_template
2020-08-24 18:09:09 -04:00
Andros Fenollosa edb9eed554 Remove bad text 2020-08-24 23:33:16 +02:00
Andros Fenollosa 9b8cce7b99 Add Maza in readme_template 2020-08-24 23:24:44 +02:00
Steven Black 5c2a30d57f Merge pull request #1393 from tanrax/patch-2
Add maza ad blocker
2020-08-24 17:17:05 -04:00
Andros Fenollosa 7823133745 Add maza ad blocker 2020-08-23 20:03:54 +02:00
Alexander Cecile aa9da1ee0d Remove unused import in tests 2020-08-21 17:30:47 -04:00
Alexander Cecile 9380fe534e Tweak output formatting of get_file_by_url 2020-08-21 14:44:27 -04:00
Alexander Cecile beca76acfe Tweak get_file_by_url 2020-08-20 20:00:36 -04:00
Alexander Cecile 4fefecf2e3 Document get_file_by_url 2020-08-20 18:42:31 -04:00
Alexander Cecile 44f41c317b Document get_file_by_url 2020-08-20 17:01:11 -04:00
Alexander Cecile 4c8cab12ef Re-add flake8 to requirements.txt 2020-08-20 16:29:37 -04:00
Alexander Cecile 140c0bd29e Use domain_to_idna in get_file_by_url 2020-08-20 16:15:37 -04:00
Steven Black 2814997df5 Release 2.7.12 2020-08-19 22:18:57 -04:00
Steven Black b40e703f52 Updates from sinfonietta, clefspeafre13, yoyo.org, URLHaus, someonewhocares.org, KADhosts, and hostsVN. 2020-08-19 22:18:09 -04:00
Alexander Cecile 79bd7d4122 Tell requests to detect encoding.
Changed the get_file_by_url function to infer/guess the encoding of the content we receive.
2020-08-18 19:36:47 -04:00
Alexander Cecile 5186071948 Introduce the requests library.
Replace the combination of urllib, beautifulsoup and lxml with the requests library.
2020-08-17 19:52:11 -04:00
Steven Black 5340f9adfe Still more email phish. 2020-08-17 14:59:12 -04:00
Steven Black bdaf8e8c50 Release 2.7.11 2020-08-17 11:34:35 -04:00
Steven Black 31e3085a4c Updates from yoyo.org, URLHaus, someonewhocares.org, KADhosts, and hostsVN. 2020-08-17 11:34:17 -04:00
Steven Black 7fd3ef6213 Add korfo.org. 2020-08-17 11:12:08 -04:00
Steven Black fe3a74b6b3 More email phish. 2020-08-16 11:22:50 -04:00
Steven Black a4e7c902ed Release 2.7.10 2020-08-15 16:31:00 -04:00
Steven Black da8c70744e Updates from clefspeare13, yoyo.org, URLHaus, and KADhosts. 2020-08-15 16:29:52 -04:00
Steven Black 37154d3b4f It's a bad idea to email phish me. 2020-08-15 16:26:25 -04:00
Steven Black cc50ac4c5a Add domain from Issue #1384. 2020-08-15 16:18:27 -04:00
Steven Black e041213cc5 Release 2.7.9 2020-08-14 11:49:51 -04:00
Steven Black 20056218db Updates from yoyo.org, URLHaus, KADhosts, and AdAway. 2020-08-14 11:49:33 -04:00
Steven Black 4892cf350e Release 2.7.8 2020-08-13 10:07:10 -04:00
Steven Black 588fa4b1d5 Updates from clefspeare13,yoyo.org, URLHaus, KADhosts, hostsVN, and AdAway. 2020-08-13 10:06:51 -04:00
Steven Black 30764ced55 Add domains from Issue #1381. 2020-08-12 18:06:08 -04:00
Steven Black 539433a68e Add domains from Issue #1380. 2020-08-12 18:01:56 -04:00
Steven Black 8796eff357 Merge pull request #1375 from bigdargon/master
Add purpleads.io
2020-08-10 15:19:19 -04:00
BigDargon 8a1908114f Add purpleads.io
The advertising domain is not in any source yet.
2020-08-10 09:47:10 +07:00
Steven Black 44273a5867 Merge pull request #1373 from forking-repos/setup-cfg
Extract flake8 config in setup.cfg
2020-08-09 09:06:07 -04:00
Steven Black 5fb6263090 Merge pull request #1374 from forking-repos/reset-mock-simplify
Remove unnecessary reset_mock calls
2020-08-09 09:05:50 -04:00
gfyoung 24f7482fc6 Remove unnecessary reset_mock calls 2020-08-09 00:42:24 -07:00
gfyoung ab1bbe7b53 Extract flake8 config in setup.cfg
Now you can just run "flake8" when linting
2020-08-09 00:22:23 -07:00
Steven Black 2583decb40 Release 2.7.7 2020-08-06 22:44:56 -04:00
Steven Black 6a85b83444 Updates from URLHaus, someonewhocares.org, KADhosts, Badd-Boyz, add.Risk, and AdAway. 2020-08-06 22:44:20 -04:00
Steven Black 051689c5ea Merge pull request #1371 from bremich/runativepixel
Adding pixel.runative-syndicate.com
2020-08-06 21:12:25 -04:00
user 0f72470ae6 Added pixel.runative-syndicate.com 2020-08-06 12:45:31 -07:00
Steven Black 7e7e3954c0 Add api.fouanalytics.com. 2020-08-04 14:45:33 -04:00
Steven Black 275562c6f9 Remove sandboxie.findmysoft.com as the culprit is downstream; the culprit was added in commit 11cff28668. 2020-08-03 12:06:55 -04:00
Steven Black af409a9c15 Release 2.7.6 2020-08-03 11:59:13 -04:00
Steven Black b548b13d89 Remove *.fouanalytics.com 2020-08-03 11:57:27 -04:00
Steven Black 3d06f890b4 Release 2.7.5 2020-08-03 11:31:15 -04:00
Steven Black a1d34bdcc3 Updates from tiuxo, yoyo.org, URLHaus, and KADhosts. 2020-08-03 11:30:53 -04:00
Steven Black 11cff28668 Add instui201.info. 2020-08-03 11:26:45 -04:00
Steven Black e95c816691 Release 2.7.4 2020-08-01 01:22:29 -04:00
Steven Black a4ff58d4cb Updates from sinfonietta, yoyo.org, URLHaus, someonewhocares.org, mvps.org, KADhosts, Badd-Boyz, and AdAway. 2020-08-01 01:21:36 -04:00
Steven Black 06a7cd5876 Merge pull request #1358 from bigdargon/add-domain
Add new domain servenobid.com
2020-07-30 14:35:15 -04:00
BigDargon 9af02df877 Add new domain servenobid.com
I see this ad domain has not been added. This domain does not have a server in Vietnam, so I created this PR to add.
2020-07-30 09:36:13 +07:00
Steven Black a7d60624bf Release 2.7.3 2020-07-29 15:44:28 -04:00
Steven Black 917579a7f4 Updates from sinfonietta, clefspeare13, yoyo.org, URLHaus, KADhosts, hostsVN, Badd-Boyz, and AdAway. 2020-07-29 15:44:09 -04:00
Steven Black 9adfcd4ea4 Release 2.7.2 2020-07-24 22:21:36 -04:00
Steven Black 1531b62139 Updates from clefspeare13, yoyo.org, URLHaus, tiuxo, someonewhocares.org, KADhosts, Badd-Boyz, and AdAway. 2020-07-24 22:20:10 -04:00
Steven Black 3788f5845f Issue #1357: add pub.trads.io. 2020-07-24 11:10:15 -04:00
Steven Black 178ea64f2d Merge pull request #1355 from XhmikosR/windows-ci
Remove miniconda and add Windows CI support
2020-07-24 10:30:44 -04:00
XhmikosR 6940b842e7 requirements.txt: tighten ranges 2020-07-24 07:36:17 +03:00
XhmikosR 8b4c837d59 Remove miniconda and add Windows CI support 2020-07-24 07:36:17 +03:00
Steven Black 58b36a7e01 Add domains from Issue #790. 2020-07-23 10:05:43 -04:00
Steven Black d14541971b Clarify that we'll take pull requests. 2020-07-19 13:23:48 -04:00
Steven Black fdd7e3f34a Release 2.7.1 2020-07-18 18:21:31 -04:00
Steven Black bfe24eb87b Maintenance - sort, deduplicate my ad-hoc list. 2020-07-18 18:19:21 -04:00
Steven Black 5cf23a4cc3 Updates from tiuxo, yoyo.org, URLHaus, someonewhocares.org, KADhosts, Badd-Boyz, and AdAway. 2020-07-18 18:07:01 -04:00
Steven Black 337e5ada28 Fix duplicate inserted by Issue #1352. Ass domains from Issue 1328. 2020-07-18 17:52:35 -04:00
Steven Black 55f05d275c Add domains from Issue #1328. 2020-07-18 17:48:35 -04:00
Steven Black 84fc36e3b8 Add domain from Issue #1350. 2020-07-18 17:44:15 -04:00
Steven Black 3cbdc64998 Add domain from Issue #1352. 2020-07-18 17:42:40 -04:00
Steven Black afce9ec8f5 Add domains from Issue #1353. 2020-07-18 17:40:42 -04:00
Steven Black 0f0465919a Add domains from Issue #1354. 2020-07-18 17:38:31 -04:00
Steven Black ca3a99a049 Release 2.7.0 2020-07-13 22:37:36 -04:00
Steven Black bdab2fbf78 Updates from Tiuxo, Sinfonietta, yoyo.org, URLHaus, someonewhocares.org, KADhosts, hostsVN, and AdAway. 2020-07-13 22:36:55 -04:00
Steven Black f11b0c6cb3 Add domain from Issue #1349. 2020-07-13 21:33:25 -04:00
Steven Black a09e408c8a Merge pull request #1342 from codeswhite/patch-network-retry
Implemented connectivity check (Fixed #1038)
2020-07-13 13:41:19 -04:00
Steven Black 323174e45d Merge pull request #1336 from funilrys/issue-1332
Fix directory separator under Windows.
2020-07-13 11:14:43 -04:00
Max G 2abefc7cfa Fixed retrying 2020-07-13 18:05:35 +03:00
funilrys abf763e9a0 Change strategy regarding #1332.
Instead of changing the directory separator globally, we change it only
when we generate/update the readme data file.
2020-07-13 15:35:16 +02:00
funilrys b8b067b6ab Replace the returned separator under Windows. 2020-07-13 11:29:11 +02:00
funilrys c756858a1b Merge branch 'master' into issue-1332 2020-07-13 11:23:45 +02:00
Steven Black 82791b30c4 Merge pull request #1341 from codeswhite/patch-systemctl-multiple-restarts
Check if a service has already been restarted (Fixes #1338)
2020-07-12 13:36:15 -04:00
Steven Black aea2e921b5 Issue #1346: add domains from usefathom.com. 2020-07-12 12:49:07 -04:00
Steven Black de3a3d9cb9 Issue #1346: add CNAME aliases for fathomseo.com. 2020-07-12 12:46:26 -04:00
Steven Black 4f93a59b8b Issue #1346: add Fathom CDN. 2020-07-11 22:49:51 -04:00
Steven Black c9986cc960 Merge pull request #1339 from codeswhite/patch-systemctl-restart-check
Check if a service is running (Fixed #1337)
2020-07-11 10:39:13 -04:00
Max G f26168194b Retry to get file from URL once failed
(Resolves #1038)
2020-07-11 14:09:51 +03:00
Max G 0a96dcad34 Use 'with' to not leave a resource open 2020-07-11 13:58:44 +03:00
Max G 0f727b8bed Revert "Implemented connectivity check (Fixed #1038)"
This reverts commit bc8e4c92b8.
2020-07-11 13:57:42 +03:00
Max G 12ee4e0218 Changed to .append() as requested 2020-07-11 13:37:08 +03:00
Steven Black be57b6208b Add one domain from Issue #1343. 2020-07-10 19:21:18 -04:00
Steven Black aa5637dc7f Added four new domains from Issue #1335. 2020-07-10 19:13:15 -04:00
Max G bc8e4c92b8 Implemented connectivity check (Fixed #1038) 2020-07-11 00:23:31 +03:00
Max G bb1b8e81ae Check if a service has already been restarted (Fixes #1338) 2020-07-10 23:48:36 +03:00
Max G 9e3db93d92 Updated test 2020-07-10 23:43:09 +03:00
Max G 43fe30181b Check if a service is running (Fixed #1337) 2020-07-10 22:47:47 +03:00
Steven Black c2ebad946e Merge pull request #1333 from XhmikosR/patch-1
Update readme_template.md
2020-07-10 10:52:19 -04:00
funilrys 73479bc632 Fix directory separtor under Windows.
This patch fix #1332.
2020-07-10 01:04:44 +02:00
Steven Black ddafbadaf6 Add domains from user @beerisgood. 2020-07-08 16:46:37 -04:00
XhmikosR cf92814f1d Update readme_template.md 2020-07-08 18:16:28 +03:00
Steven Black a9a4aa2fe7 Release 2.6.29 2020-07-06 19:20:41 -04:00
Steven Black a907bc6477 Updates from tiuxo, URLHaus, and KADhosts 2020-07-06 19:20:24 -04:00
Steven Black 6337998706 Include domains from Issue #1331. 2020-07-06 18:44:11 -04:00
Steven Black fd5fd3f05d Release 2.6.28 2020-07-05 14:44:14 -04:00
Steven Black 6906938b48 Updates from clefspeare13, yoyo.org, URLHaus, KADhosts, and HostsVN. 2020-07-05 14:43:52 -04:00
Steven Black 5bab40d686 Merge pull request #1329 from mullinsmikey/patch-1
Update StevenBlack hosts
2020-07-05 14:34:44 -04:00
Michael Mullins ad45f75de2 Update StevenBlack hosts
Added several Samsung Smart TV taking part in distributing ads or collecting telemetry
2020-07-04 23:43:26 +04:00
Steven Black 7fcfacf7d0 Release 2.6.27 2020-07-02 20:35:42 -04:00
Steven Black 32fe8e0862 Update from URLHaus. 2020-07-02 20:35:14 -04:00
Steven Black 541841e8c6 Add missing comment character in a prior commit. 2020-07-02 20:33:47 -04:00
Steven Black 8847a730e6 Release 2.6.26 2020-07-02 20:25:52 -04:00
Steven Black 719cc0b086 Updates from yoyo.org, URLHaus, someonewhocares, KADhosts, hostsVN, and AdAway. 2020-07-02 20:25:31 -04:00
Steven Black 490e4f835c Issue #1324: fix — add ndjambo.com. 2020-07-02 20:19:37 -04:00
Steven Black fab5809c97 Issue #1325: fix — add ads1.opensubtitles.org. 2020-07-02 20:17:03 -04:00
Steven Black ddb8a61788 Release 2.6.25 2020-06-27 12:55:37 -04:00
Steven Black 85112c9a48 Updates from yoyo.org, URLHaus, someonewhocares.org, hostsVN, and AdAway. 2020-06-27 12:55:20 -04:00
Steven Black dc68f96f8a Merge pull request #1321 from taobojlen/add-mailspring-tracking
add link.getmailspring.com
2020-06-25 17:53:32 -04:00
Steven Black a59f18a380 Release 2.6.24 2020-06-25 10:21:26 -04:00
Steven Black 7ec3533725 Updates from clefspeare13, yoyo.org, URLHaus, hostsVN, Badd-Boyz, and AdAway. 2020-06-25 10:21:02 -04:00
Tao Bojlén 4e2796aaa9 add link.getmailspring.com 2020-06-24 17:52:48 +01:00
Steven Black c7537d2b45 Release 2.6.23 2020-06-22 10:22:02 -04:00
Steven Black 9a8b5df4f7 Updates from yoyo.org, URLHaus, KADhosts, HostsVN, Badd-Boyz, and AdAway. 2020-06-22 10:21:40 -04:00
Steven Black de675b71a9 Issue #1315: add italiapagamen.com. 2020-06-17 10:19:36 -04:00
Steven Black 6283d54d41 Release 2.6.22 2020-06-16 22:56:33 -04:00
Steven Black d9f031fd46 Updates from yoyo.org, URLHaus, mvps.org, KADhosts, hostsVN, Badd-Boyz, and AdAway. 2020-06-16 22:56:12 -04:00
Steven Black 71dbcebe52 Release 2.6.21 2020-06-09 13:27:29 -04:00
Steven Black 3fea881296 Updates from yoyo.org, URLHaus, someonewhocares.org, KADhosts, hostsVN, Badd-Boyz, and AdAway. 2020-06-09 13:27:07 -04:00
Steven Black c92151d237 Merge pull request #1308 from XhmikosR/patch-1
Update CI config
2020-06-07 14:35:20 -04:00
XhmikosR eb4d002f13 Update CI config
* update to `actions/cache@v2`
* change cache key to take into account requirements.txt
2020-06-07 21:29:06 +03:00
Steven Black 2565d15719 Merge pull request #1307 from funilrys/issue-1166-bis
Fix location issue under windows
2020-06-07 14:22:44 -04:00
funilrys 15df541200 Fix linting issue. 2020-06-07 20:11:57 +02:00
funilrys 5798b17132 Fix location issue under windows.
This patch fix https://github.com/StevenBlack/hosts/issues/1166#issuecomment-634686875
2020-06-07 18:28:32 +02:00
funilrys 6a216bf28d Merge remote-tracking branch 'upstream/master' into issue-1166-bis 2020-06-07 18:04:21 +02:00
Steven Black 4fe6a30cc1 Merge pull request #1305 from jnguyen1098/master
Add blasze.tk / blasze.com IP logger links
2020-06-06 17:26:58 -04:00
Jason e9fdfc5445 Update hosts 2020-06-06 15:44:40 -04:00
Steven Black 308fce3413 Release 2.6.20 2020-06-02 20:38:21 -04:00
Steven Black 8bc7172637 Updates from sinfonietta, yoyo.org, URLHaus, someonewhocares.org, KADhosts, hostsVN, Badd-Boyz, and AdAway. 2020-06-02 20:38:03 -04:00
Steven Black d6fc6efd04 Merge pull request #1297 from SuperSandro2000/patch-1
Fix someonewhocares issue link
2020-05-28 06:01:54 -04:00
Sandro Jäckel 40f4a1a695 Fix someonewhocares issue link 2020-05-28 11:00:51 +02:00
Steven Black 00eb68b4fc Release 2.6.19 2020-05-27 21:19:30 -04:00
Steven Black 6bdacd7936 Updates from yoyo.org, URLHaus, and KADhosts. 2020-05-27 21:19:11 -04:00
funilrys a2008b78f9 First, format with black. 2020-05-27 21:59:34 +02:00
Steven Black 3e06d4b8b5 Merge pull request #1296 from XhmikosR/patch-2
Always use LF in README files
2020-05-27 11:44:23 -04:00
Steven Black a468781125 Merge pull request #1295 from XhmikosR/patch-1
Update updateHostsFile.py
2020-05-27 11:42:21 -04:00
XhmikosR d232ef9a0c Always use LF in README files 2020-05-27 16:40:55 +03:00
XhmikosR 877814eb22 Update updateHostsFile.py
Escape backslashes
2020-05-27 10:54:15 +03:00
Steven Black a4f21ffe18 Release 2.6.18 2020-05-26 22:13:35 -04:00
Steven Black 2aa2903d92 Updates from clefspeare12, yoyo.org, URLHaus, someonewhocares.org, KADhosts, hostsVN, and Badd-Boyz. 2020-05-26 22:13:16 -04:00
Steven Black c72ec82aca Merge pull request #1292 from CodingSpiderFox/patch-1
Switch to https
2020-05-26 21:59:54 -04:00
Steven Black 805f50b2a0 Merge pull request #1294 from breucode/master
Issue #1293: Add seemascakes.com
2020-05-26 21:58:35 -04:00
Pascal Breuer 3a36077486 Issue #1293: Add seemascakes.com 2020-05-26 14:58:48 +02:00
CodingSpiderFox 7181a06681 Switch to https 2020-05-24 19:59:20 +02:00
Steven Black 85564f8ccd Release 2.6.17 2020-05-20 21:01:38 -04:00
Steven Black 2f9b11bae7 Updates from clefspeare13, yoyo.org, URLHaus, someonewhocares.org, KADHosts, Badd-Boyz, and AdAway. 2020-05-20 21:01:17 -04:00
Steven Black f9657f924c Release 2.6.16 2020-05-15 19:50:37 -04:00
Steven Black f72248b745 Updates from yoyo.org, URLHaus, KADHosts, , hostsVN, Badd-Boyz, and AdAway. 2020-05-15 19:50:19 -04:00
Steven Black e2a23e8d10 Issue #1284: add www.govrefund-uk.com. 2020-05-15 11:28:19 -04:00
Steven Black b0e1d2b8a0 Release 2.6.15 2020-05-13 21:36:12 -04:00
Steven Black 4d4ede2a23 Updates from URLHaus. 2020-05-13 21:35:54 -04:00
Steven Black 87faa578be Sorry, I dropped the ball, re-removing rollbar website domains. 2020-05-13 19:58:10 -04:00
Steven Black 9ef031ba4a Release 2.6.14 2020-05-13 15:19:53 -04:00
Steven Black f217546d30 Updates from URLHaus, StevenBlack, KADhosts, hostsVN, and Badd-Boyz. 2020-05-13 15:19:34 -04:00
Steven Black 376ff41cf3 Merge pull request #1283 from izn/patch-1
Remove *.rollbar.com from blacklist
2020-05-13 15:15:38 -04:00
Thaynã Moretti fcf74d2903 Restore api.rollbar.com 2020-05-13 16:12:08 -03:00
Thaynã Moretti 525f77236c Remove *.rollbar.com from blacklist 2020-05-13 13:55:46 -03:00
Steven Black 45af8fd56b Release 2.6.13 2020-05-12 15:03:52 -04:00
Steven Black 1fd99387e4 Updates from yoyo.org, URLHaus, KADhosts, hostsVN, Badd-Boyz, and AdAway. 2020-05-12 15:03:31 -04:00
Steven Black b24947d77a Merge pull request #1275 from scafroglia93/master
hosts: malware IoC
2020-05-12 14:56:40 -04:00
Steven Black 9328098363 Merge pull request #1277 from sheepfleece/NixOS_Config
Add Usage for NixOS
2020-05-12 01:41:09 -04:00
sheepfleece 990766f5ba Use default hosts file 2020-05-12 08:08:05 +03:00
sheepfleece 0bd364f096 Add Usage for NixOS 2020-05-12 07:48:37 +03:00
Steven Black 9edf42d819 Issue #1278: fix — Remove 6×66.com, invalid character in the domain. 2020-05-11 12:37:14 -04:00
scafroglia93 ac44b4444c hosts: malware IoC
Signed-off-by: scafroglia93 <scafroglia57@gmail.com>
2020-05-10 19:33:41 +02:00
Steven Black 8dcbf8a3c2 Add domain from Issue #1269. 2020-05-09 19:19:51 -04:00
Steven Black 52a04335a8 Merge pull request #1273 from scafroglia93/master
hosts: malware IoC
2020-05-09 19:14:20 -04:00
scafroglia93 8bb05550be hosts: malware IoC
Signed-off-by: scafroglia93 <scafroglia57@gmail.com>
2020-05-10 00:46:28 +02:00
Steven Black e0f3bfd2de Trim lines at EOF; lowercase domain names, add a date marker prior to new domains. 2020-05-08 20:44:04 -04:00
Steven Black f47fafedaa Merge pull request #1271 from scafroglia93/master
hosts: malware IoC
2020-05-08 20:40:38 -04:00
scafroglia93 4164564b2c hosts: malware IoC
Signed-off-by: scafroglia93 <scafroglia57@gmail.com>
2020-05-09 02:30:04 +02:00
scafroglia93 0224b74a6e hosts: malware IoC
Signed-off-by: scafroglia93 <scafroglia57@gmail.com>
2020-05-09 02:22:50 +02:00
Steven Black ea73c698ad Release 2.6.12 2020-05-05 19:27:12 -04:00
Steven Black 2cdc7cd5f9 Updates from clefspeare13, yoyo.org, URLHaus, KADhosts, hostsVN, Badd-Boyz, and AdAway. 2020-05-05 19:26:55 -04:00
Steven Black c8f10f9ffa Sorted my hosts file. 2020-05-05 19:15:58 -04:00
Steven Black 0be07583d5 adding hosts in Issue #1263. 2020-05-05 19:10:15 -04:00
Steven Black 547cf2161a Release 2.6.11 2020-05-05 01:37:13 -04:00
Steven Black 7a82c707cd Updates from clefspeare13, yoyo.org, URLHaus, mvps.org, KADhosts, hostsVN, Badd-Boyz, and AdAway.org. 2020-05-05 01:36:49 -04:00
Steven Black 2b27276629 Add domains from issue #1261. 2020-05-04 13:50:50 -04:00
Steven Black b2f128872c Add domain from Issue #1253. 2020-05-03 12:51:29 -04:00
Steven Black 0d1a3e00e7 Merge pull request #1259 from XhmikosR/patch-1
Make sure we treat any readme assets as `utf-8`
2020-05-03 12:46:47 -04:00
XhmikosR 6709f769e4 Make sure we treat any readme assets as utf-8 2020-05-03 08:57:45 +03:00
Steven Black 454b3c2afa Release 2.6.10 2020-05-02 19:10:21 -04:00
Steven Black a32b5d82bf Updates from clefspeare13, yoyo.org, URLHaus, KADhosts, hostsVN, and Badd-Boyz. 2020-05-02 19:10:00 -04:00
Steven Black f3fbfd2079 Add domain in Issue #1244. 2020-05-02 19:05:45 -04:00
Steven Black e7721d35a8 Add domains in Issue #1245. 2020-05-02 19:04:43 -04:00
Steven Black 652992750e Add domains from Issue #1247. 2020-05-02 19:03:18 -04:00
Steven Black 6e0dbd6447 Add domains from Issue #1254. 2020-05-02 19:01:45 -04:00
Steven Black 0cc3163dda Add domain from Issue #1257. 2020-05-02 18:56:51 -04:00
Steven Black 47f9a28b81 Merge pull request #1258 from XhmikosR/patch-1
Fix domain from #1202
2020-05-02 15:13:36 -04:00
XhmikosR 3ab6d9d5e8 Fix domain from #1202 2020-05-02 22:10:21 +03:00
Steven Black d002c5783e One more domain from Issue #1252. 2020-04-30 10:35:19 -04:00
Steven Black 6c4268bdc7 Add domains from Issue ##1251. 2020-04-30 10:31:51 -04:00
Steven Black 79f628a09f Add domains from Issue #1252. 2020-04-30 10:28:46 -04:00
Steven Black 0d35158c6c Merge pull request #1250 from XhmikosR/gh-actions
Switch to GitHub Actions CI.
2020-04-30 09:59:01 -04:00
XhmikosR ec5723b926 ci/test.sh: add python --version 2020-04-29 15:31:55 +03:00
XhmikosR bdcb4954e9 CI: move lint before test and add Python 3.8 2020-04-29 15:31:55 +03:00
XhmikosR 125d7c8745 Switch to GitHub Actions CI. 2020-04-29 15:31:54 +03:00
Steven Black 5d8275411c Release 2.6.9 2020-04-28 14:41:25 -04:00
Steven Black 96a84da45f Updates from yoyo.org, URLHaus, KADhosts, and AdAway. 2020-04-28 14:41:06 -04:00
Steven Black 5a0a1b53b3 Merge pull request #1248 from PF4Public/master
Absent from other blocklists
2020-04-27 12:11:53 -04:00
PF4Public 4923194ff4 Absent from other blocklists 2020-04-27 15:46:50 +03:00
Steven Black cd50dbb0d0 Release 2.6.8 2020-04-26 22:52:03 -04:00
Steven Black a3d8d83913 Updates from clefspeare13, yoyo.org, URLHaus, someonewhocares.org, KADhosts, Badd-Boyz, and add.risk. 2020-04-26 22:51:44 -04:00
Steven Black 68c9d2f6b1 Merge pull request #1246 from gprestes/gprestes-patch-1
Restore filename to follow the hosts-%Y-%m-%d-%H-%M-%S format
2020-04-24 22:31:18 -04:00
Guilherme Heuser Prestes d7f8d5ef35 Add back the '-' after hosts in the filename 2020-04-24 21:16:07 +02:00
Guilherme Heuser Prestes b40aa38ee6 remove the '-' from mock 2020-04-24 21:13:41 +02:00
Steven Black ef6cff0702 Merge pull request #1236 from adherzog/fix-default-whitelist
Fix default whitelist argument.
2020-04-23 21:38:58 -04:00
Steven Black e7c0ef495e Merge pull request #1243 from XhmikosR/typo
Join a few short lines and fixes a few typos
2020-04-23 21:37:39 -04:00
XhmikosR f5358fd0b4 Join a few short lines and fixes a few typos 2020-04-23 09:02:38 +03:00
Steven Black e2ce21ba3e Issue #1239: add maper.info. 2020-04-22 18:58:15 -04:00
Steven Black 68419f063d Issue #1240: adding domains listed in this issue, 2020-04-22 18:56:05 -04:00
Steven Black 8d00a38425 Release 2.6.7 2020-04-22 10:29:23 -04:00
Steven Black 15e433e5c3 Updates from clefspeare13, yoyo.org, URLHaus, KADhosts, hostsVN, Badd-Boyz, and AdAway. 2020-04-22 10:28:54 -04:00
Steven Black 564141c3a5 Merge pull request #1238 from ScriptTiger/correct-sorting
Unification of the sorting of the sources.
2020-04-22 01:47:36 -04:00
funilrys dd7904dcc8 Add forgotten sorting.
Indeed, I forgot to sort the content of the hosts file.
2020-04-21 23:54:01 +02:00
funilrys 665dc98191 Unification of the sorting of the sources.
Before this patch, there was no proper sorting and the sources.

As @XhmikosR mentioned in StevenBlack/hosts#1166, without this patch,
the output is totally different in Windows. But let's be honest, if it
is like that under Windows, chances are that the same behavior happens
across different OSes or machines around the globe.

Another reason behind this patch is that - desperate the fact that we
certainly trust @StevenBlack - the integrity of the generated files
could not be guarenteed because of the sorting which may be completely
different from an OS to another and a machine to another.

For those reasons, this patch introduces a unification of the sorting of
all sources.

The idea behind this patch is to have @StevenBlack's ad-hoc hosts
file always on top (1st) and the rest of the sources sorted
alphabetically based on the name of the folder inside the `data`
or `extensions` directory.

This will ensure that we get the same result everywhere.

Concretely speaking, I just added the function (`sort_sources`) which
sorts a given list of sources files. And later on, call the new function
everywhere it was necessary. Tests of the newly introduced function
are also included.

Contributors:
  * @ScriptTiger
  * @XhmikosR

Notes:
  * This patch fix (completely ?) ScriptTiger/hosts#1
  * This patch fix https://github.com/StevenBlack/hosts/issues/1166#issuecomment-590511086
2020-04-21 22:54:25 +02:00
Steven Black 6548b1af25 Add domains from Issue #1237. 2020-04-20 23:43:38 -04:00
Steven Black 0c9ec0732d Add domains from Issue #1226. 2020-04-20 23:40:22 -04:00
Steven Black 546a6587cb Merge pull request #1230 from XhmikosR/patch-1
Update KADhosts homeurl
2020-04-20 14:39:49 -04:00
Steven Black 2e9fb614d5 Merge pull request #1231 from XhmikosR/patch-2
Fix FadeMind's lists license
2020-04-20 14:13:41 -04:00
Adam Herzog 2a742e7f99 Fix default whitelist argument. 2020-04-20 10:22:13 -04:00
XhmikosR cd426b4d8e Update KADhosts homeurl 2020-04-20 09:27:42 +03:00
XhmikosR 7b00af4d07 Fix FadeMind's lists license 2020-04-20 09:27:23 +03:00
Steven Black 5b25845933 Release 2.6.6 2020-04-18 22:39:31 -04:00
Steven Black ee37f38580 Fix error I introduced in commit daf16c7eba. 2020-04-18 22:39:13 -04:00
Steven Black 7cb8c82481 Release 2.6.5 2020-04-18 20:41:20 -04:00
Steven Black 58d1cfc3b3 Updates from ypyo.org, URLHaus, StevenBlack, KADHosts, and hostsVN. 2020-04-18 20:40:44 -04:00
Steven Black daf16c7eba Adding domains related to xHelper. 2020-04-18 20:32:12 -04:00
Steven Black 05d4b42737 Issue #1232: fix - adding ikezijik.ga. 2020-04-18 20:23:01 -04:00
Steven Black c34d990cf1 Issue #1234: fix - adding Github phishing domains. 2020-04-18 20:19:36 -04:00
Steven Black 6004c65c41 Release 2.6.4 2020-04-16 21:52:02 -04:00
Steven Black 6e71030b58 Updates from sinfonietta, yoyo.org, URLHaaus, KADhosts, Badd-Boyz, and AdAway. 2020-04-16 21:51:42 -04:00
Steven Black e84761d17d Add domains from Issue #1229. 2020-04-16 14:10:17 -04:00
Steven Black dcb32b0b1e Release 2.6.3 2020-04-13 21:52:11 -04:00
Steven Black a63fa1291b Updates from sinfonietta, yoyo.org, URLHaus, ADhosts, hostsVN, Badd-Boyz, and AdAway. 2020-04-13 21:51:51 -04:00
Steven Black 1a2e8765cc Merge pull request #1227 from djnym/add-wlbl
Allow whitelist/blacklist files to be passed via command line
2020-04-13 20:23:33 -04:00
Anthony Molinaro 4aa8b65cc2 provide defaults for args 2020-04-13 16:20:22 -07:00
Anthony Molinaro dd2d878e95 Allow whitelist/blacklist files to be passed via command line 2020-04-13 12:14:34 -07:00
Steven Black a2ab99d9b1 Sort my ad-hoc list. 2020-04-12 18:14:51 -04:00
Steven Black b655a57e76 Release 2.6.2 2020-04-11 16:37:39 -04:00
Steven Black 6cc5d83fed Updates from sinfonietta, URLHaus, KADhosts, hostsVN, Badd-Boyz, and AdAway. 2020-04-11 16:37:19 -04:00
Steven Black 832138b4bc New domain. 2020-04-11 15:31:23 -04:00
Steven Black 3ea9dc7ca9 Release 2.6.1 2020-04-10 22:54:17 -04:00
Steven Black b91104aa64 Updates from sinfonietta, yoyo.org, URLHaus, KADhosts, and Badd-Boyz. 2020-04-10 22:53:54 -04:00
Steven Black f058719a56 Issue #1220 - add www.traffclick.ru. 2020-04-10 21:20:44 -04:00
Steven Black 3b7c7caa52 Issue #1221: added three domains raised in this issue. 2020-04-10 21:19:15 -04:00
Steven Black f5c028779c Issue #1222: Add globalpagee-prod-webex.com. 2020-04-10 21:17:45 -04:00
Steven Black d281b49b9f Resolving FadeMind/hosts.extras/issues/32. 2020-04-10 13:35:34 -04:00
Steven Black de2de429c8 Release 2.6.0 2020-04-09 15:09:05 -04:00
Steven Black 3e749f1f37 Updates from URLHaus, KADhosts, hostsVN, and add.Risk. 2020-04-09 15:07:59 -04:00
Steven Black e091bcc185 Merge pull request #1216 from djnym/clean-checkout-fixes
Keep checkout unmodified when adding outputpath.
2020-04-08 16:23:58 -04:00
Anthony Molinaro b87c81f796 update template not readme 2020-04-08 11:56:50 -07:00
Steven Black da2c5f86f2 Merge pull request #1217 from XhmikosR/patch-1
Fix typo
2020-04-08 14:54:56 -04:00
Steven Black 8801e184d5 Merge pull request #1218 from PerfectSlayer/patch-1
Update AdAdawy hosts issue report link
2020-04-08 11:44:05 -04:00
PerfectSlayer f3464b98bf Fix adaway metadata according code review 2020-04-08 15:22:35 +02:00
PerfectSlayer 3768103c1e Revert "Update AdAdawy hosts issue report link"
This reverts commit 0581b133b1.
2020-04-08 15:20:52 +02:00
Bruce BUJON 0581b133b1 Update AdAdawy hosts issue report link
Hi @StevenBlack 

I hope you're going well.
I propose a small change about the link to report an issue about AdAway's default hosts. I link it to the site GitHub project, not the application.
Moreover, @jawz101 has taken over the `hosts` file management. There is [more frequent updates](https://github.com/AdAway/adaway.github.io/commits/master) than ever so you might also want to change the _occasionnaly_ frequence label.

I take the opportunity of this PR to announce your hosts will be integrated as default source for the AdAway application! 🎉 
I think some of the users already added it to their configuration but it will be enabled by default for all new users.
I hope it is fine to you. Don't hesitate to tell me if not.

Regards
2020-04-08 13:11:34 +02:00
Anthony Molinaro c6b54e9674 update readme.md with new additional argument 2020-04-07 23:26:38 -07:00
Anthony Molinaro 7dd582dac3 2 blank lines? 2020-04-07 23:07:40 -07:00
Anthony Molinaro cac15b1c11 use nogendata for arg 2020-04-07 22:55:02 -07:00
Anthony Molinaro 37bc3821f8 applied black 2020-04-07 22:44:37 -07:00
Anthony Molinaro 9c1b8b2579 use more succinct name for arg 2020-04-07 22:40:30 -07:00
Anthony Molinaro aec3738838 fix unit test 2020-04-07 22:18:35 -07:00
XhmikosR 787022fea2 Fix typo 2020-04-08 07:36:24 +03:00
Steven Black 4c3aa77895 Sorting my personal ad-hoc hosts file. 2020-04-08 00:13:24 -04:00
Anthony Molinaro 699b52e1bd forgot to remove a debug 2020-04-07 20:17:04 -07:00
Anthony Molinaro 2d696a42d9 keep checkout clean 2020-04-07 20:08:23 -07:00
Steven Black 303a3eb63d Add domains from Issue #1214. 2020-04-06 21:52:23 -04:00
94 changed files with 1499120 additions and 967549 deletions
+1 -1
View File
@@ -16,6 +16,6 @@ newPRWelcomeComment: >
# Comment to be posted to on pull requests merged by a first time user
firstPRMergeComment: >
Congratulations on merging your first pull request! 🎉🎉🎉
Congratulations on merging your first pull request here! 🎉🎉🎉 You are now in our [list of contributors](https://github.com/StevenBlack/hosts/graphs/contributors). Welcome!
# It is recommend to include as many gifs and emojis as possible!
+56
View File
@@ -0,0 +1,56 @@
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python:
- 3.5
- 3.6
- 3.7
- 3.8
- 3.9
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- run: python --version
- run: pip --version
- name: Get pip cache directory
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-python-v${{ matrix.python }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-python-v${{ matrix.python }}-${{ hashFiles('**/requirements.txt') }}
${{ runner.os }}-python-v${{ matrix.python }}-
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Run lint
run: flake8
- name: Run tests
run: python testUpdateHostsFile.py
+62
View File
@@ -0,0 +1,62 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: "40 15 * * 4"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ['python']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
-34
View File
@@ -1,34 +0,0 @@
notifications:
email: false
language: generic
cache:
directories:
- $HOME/miniconda3
before_cache:
- rm -rf $HOME/miniconda3/pkgs/cache
- rm -rf $HOME/miniconda3/envs/hosts
- rm -rf $HOME/miniconda3/conda-meta/history
- touch $HOME/miniconda3/conda-meta/history
os:
- linux
- osx
env:
- PYTHON_VERSION="3.5"
- PYTHON_VERSION="3.6"
- PYTHON_VERSION="3.7"
before_install:
- export PATH="$HOME/miniconda3/bin:$PATH"
install:
- ci/install_conda.sh
- ci/setup_conda_env.sh
script:
- ci/test.sh
- ci/lint.sh
+11
View File
@@ -0,0 +1,11 @@
FROM python:3
WORKDIR /usr/src
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
RUN git clone --depth 1 https://github.com/StevenBlack/hosts.git
WORKDIR /usr/src/hosts
# Now you launch this with
# $ docker build ./
# $ docker run -it (containerid) bash
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -21,11 +21,10 @@
This repository consolidates several reputable `hosts` files, and merges them
into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided.
* Last updated: **April 07 2020**.
* Here's the [raw hosts file with fakenews, gambling, porn, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) containing 77,274 entries.
* Last updated: **July 04 2021**.
* Here's the [raw hosts file with fakenews, gambling, porn, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) containing 115,364 entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -36,22 +35,22 @@ with GitHub download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non GitHub mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 54,456 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 55,398 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 56,777 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 71,261 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 57,207 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 57,719 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 72,203 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 58,149 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 73,582 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 59,528 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 74,011 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 74,524 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 60,470 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 74,953 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 76,332 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 77,274 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 81,747 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 83,942 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 84,204 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 107,898 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 84,562 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 86,399 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 110,093 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 86,757 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 110,355 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 87,019 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 110,712 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 112,550 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,214 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 112,907 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 113,169 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 115,364 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
@@ -65,32 +64,36 @@ included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
Steven Black's ad-hoc list | Additional sketch domains as I come across them. |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | occasionally | MIT | [issues](https://github.com/StevenBlack/hosts/issues)
Malware Domain List | Malware Domain List is a non-commercial community project. |[link](https://www.malwaredomainlist.com/) | [raw](https://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](https://www.malwaredomainlist.com/contact.php)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](hosts@someonewhocares.org)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](http://winhelp2002.mvps.org/) | [raw](http://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | frequently | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
AdguardTeam cname trackers | CNAME-cloaked tracking abuses. |[link](https://github.com/AdguardTeam/cname-trackers) | [raw](https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt) | occasionally | MIT | [issues](https://github.com/AdguardTeam/cname-trackers/issues)
Mitchell Krog's - Badd Boyz Hosts | Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | weekly | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:cosntacptamem@abuse.ch)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.com/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | occasionally | CC BY 3.0 | [issues](https://github.com/AdAway/AdAway/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
MetaMask eth-phishing-detect | Phishing domains targeting Ethereum users. |[link](https://github.com/MetaMask/eth-phishing-detect) | [raw](https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt) | frequent | DON'T BE A DICK PUBLIC LICENSE | [issues](https://github.com/MetaMask/eth-phishing-detect/issues)
minecraft-hosts | Minecraft related tracker hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | occasionally | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
orca.pet | This is a domain list for blocking phishing and malware sites . |[link](https://orca.pet/notonmyshift/) | [raw](https://orca.pet/notonmyshift/hosts.txt) | frequent | ISC | [issues](https://github.com/socram8888/not-on-my-shift)
osint.digitalside.it | DigitalSide Threat-Intel malware domains list. |[link](https://github.com/davidonzo/Threat-Intel) | [raw](https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt) | daily | MIT | [issues](https://github.com/davidonzo/Threat-Intel/issues)
shady-hosts | Analytics, ad, and activity monitoring hosts |[link](https://github.com/shreyasminocha/shady-hosts) | [raw](https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts) | occasionally | CC0-1.0 | [issues](https://github.com/shreyasminocha/shady-hosts/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](mailto:hosts@someonewhocares.org)
Tiuxo hostlist - ads | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:contactme@abuse.ch)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
Fake News | An in-progress collection of fake news outlets. |[link](https://github.com/marktron/fakenews) | [raw](https://raw.githubusercontent.com/marktron/fakenews/master/fakenews) | occasional | MIT | [issues](https://github.com/marktron/fakenews/issues)
Sinfonietta's gambling blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/gambling-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Sinfonietta's snuff-site blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
pornhosts -- a consolidated anti porn hosts file | This is an endeavour to find all porn domains and compile them into a single hosts to allow for easy blocking of porn on your local machine or on a network. |[link](https://github.com/Clefspeare13/pornhosts) | [raw](https://raw.githubusercontent.com/Clefspeare13/pornhosts/master/0.0.0.0/hosts) | occasional | MIT | [issues](https://github.com/Clefspeare13/pornhosts/issues)
Sinfonietta's porn blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/pornography-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Sinfonietta's snuff-site blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Tiuxo hostlist - pornography | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/porn) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
Sinfonietta's social media blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/social-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Tiuxo hostlist - social | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/social) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
## Extensions
The unified hosts file is optionally extensible. Extensions are used to include domains by category. Currently, we offer the following categories: `fakenews`, `social`, `gambling`, and `porn`.
@@ -102,7 +105,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -112,7 +136,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -123,10 +149,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -171,6 +193,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -181,6 +208,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -227,8 +277,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -240,7 +289,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -279,7 +327,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -326,13 +373,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -342,13 +396,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -427,11 +474,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -441,6 +490,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
File diff suppressed because it is too large Load Diff
+108 -57
View File
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -21,11 +21,10 @@
This repository consolidates several reputable `hosts` files, and merges them
into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided.
* Last updated: **April 07 2020**.
* Here's the [raw hosts file with fakenews, gambling, porn extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) containing 74,524 entries.
* Last updated: **July 04 2021**.
* Here's the [raw hosts file with fakenews, gambling, porn extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) containing 112,550 entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -36,22 +35,22 @@ with GitHub download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non GitHub mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 54,456 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 55,398 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 56,777 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 71,261 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 57,207 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 57,719 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 72,203 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 58,149 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 73,582 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 59,528 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 74,011 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 74,524 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 60,470 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 74,953 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 76,332 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 77,274 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 81,747 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 83,942 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 84,204 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 107,898 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 84,562 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 86,399 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 110,093 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 86,757 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 110,355 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 87,019 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 110,712 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 112,550 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,214 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 112,907 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 113,169 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 115,364 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
@@ -65,30 +64,34 @@ included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
Steven Black's ad-hoc list | Additional sketch domains as I come across them. |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | occasionally | MIT | [issues](https://github.com/StevenBlack/hosts/issues)
Malware Domain List | Malware Domain List is a non-commercial community project. |[link](https://www.malwaredomainlist.com/) | [raw](https://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](https://www.malwaredomainlist.com/contact.php)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](hosts@someonewhocares.org)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](http://winhelp2002.mvps.org/) | [raw](http://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | frequently | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
AdguardTeam cname trackers | CNAME-cloaked tracking abuses. |[link](https://github.com/AdguardTeam/cname-trackers) | [raw](https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt) | occasionally | MIT | [issues](https://github.com/AdguardTeam/cname-trackers/issues)
Mitchell Krog's - Badd Boyz Hosts | Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | weekly | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:cosntacptamem@abuse.ch)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.com/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | occasionally | CC BY 3.0 | [issues](https://github.com/AdAway/AdAway/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
MetaMask eth-phishing-detect | Phishing domains targeting Ethereum users. |[link](https://github.com/MetaMask/eth-phishing-detect) | [raw](https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt) | frequent | DON'T BE A DICK PUBLIC LICENSE | [issues](https://github.com/MetaMask/eth-phishing-detect/issues)
minecraft-hosts | Minecraft related tracker hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | occasionally | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
orca.pet | This is a domain list for blocking phishing and malware sites . |[link](https://orca.pet/notonmyshift/) | [raw](https://orca.pet/notonmyshift/hosts.txt) | frequent | ISC | [issues](https://github.com/socram8888/not-on-my-shift)
osint.digitalside.it | DigitalSide Threat-Intel malware domains list. |[link](https://github.com/davidonzo/Threat-Intel) | [raw](https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt) | daily | MIT | [issues](https://github.com/davidonzo/Threat-Intel/issues)
shady-hosts | Analytics, ad, and activity monitoring hosts |[link](https://github.com/shreyasminocha/shady-hosts) | [raw](https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts) | occasionally | CC0-1.0 | [issues](https://github.com/shreyasminocha/shady-hosts/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](mailto:hosts@someonewhocares.org)
Tiuxo hostlist - ads | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:contactme@abuse.ch)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
Fake News | An in-progress collection of fake news outlets. |[link](https://github.com/marktron/fakenews) | [raw](https://raw.githubusercontent.com/marktron/fakenews/master/fakenews) | occasional | MIT | [issues](https://github.com/marktron/fakenews/issues)
Sinfonietta's gambling blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/gambling-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Sinfonietta's snuff-site blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
pornhosts -- a consolidated anti porn hosts file | This is an endeavour to find all porn domains and compile them into a single hosts to allow for easy blocking of porn on your local machine or on a network. |[link](https://github.com/Clefspeare13/pornhosts) | [raw](https://raw.githubusercontent.com/Clefspeare13/pornhosts/master/0.0.0.0/hosts) | occasional | MIT | [issues](https://github.com/Clefspeare13/pornhosts/issues)
Sinfonietta's porn blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/pornography-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Sinfonietta's snuff-site blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Tiuxo hostlist - pornography | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/porn) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
## Extensions
The unified hosts file is optionally extensible. Extensions are used to include domains by category. Currently, we offer the following categories: `fakenews`, `social`, `gambling`, and `porn`.
@@ -100,7 +103,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -110,7 +134,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -121,10 +147,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -169,6 +191,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -179,6 +206,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -225,8 +275,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -238,7 +287,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -277,7 +325,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -324,13 +371,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -340,13 +394,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -425,11 +472,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -439,6 +488,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
File diff suppressed because it is too large Load Diff
+107 -56
View File
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -21,11 +21,10 @@
This repository consolidates several reputable `hosts` files, and merges them
into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided.
* Last updated: **April 07 2020**.
* Here's the [raw hosts file with fakenews, gambling, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) containing 60,470 entries.
* Last updated: **July 04 2021**.
* Here's the [raw hosts file with fakenews, gambling, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) containing 89,214 entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -36,22 +35,22 @@ with GitHub download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non GitHub mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 54,456 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 55,398 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 56,777 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 71,261 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 57,207 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 57,719 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 72,203 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 58,149 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 73,582 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 59,528 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 74,011 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 74,524 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 60,470 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 74,953 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 76,332 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 77,274 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 81,747 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 83,942 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 84,204 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 107,898 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 84,562 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 86,399 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 110,093 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 86,757 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 110,355 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 87,019 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 110,712 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 112,550 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,214 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 112,907 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 113,169 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 115,364 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
@@ -65,28 +64,32 @@ included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
Steven Black's ad-hoc list | Additional sketch domains as I come across them. |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | occasionally | MIT | [issues](https://github.com/StevenBlack/hosts/issues)
Malware Domain List | Malware Domain List is a non-commercial community project. |[link](https://www.malwaredomainlist.com/) | [raw](https://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](https://www.malwaredomainlist.com/contact.php)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](hosts@someonewhocares.org)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](http://winhelp2002.mvps.org/) | [raw](http://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | frequently | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
AdguardTeam cname trackers | CNAME-cloaked tracking abuses. |[link](https://github.com/AdguardTeam/cname-trackers) | [raw](https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt) | occasionally | MIT | [issues](https://github.com/AdguardTeam/cname-trackers/issues)
Mitchell Krog's - Badd Boyz Hosts | Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | weekly | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:cosntacptamem@abuse.ch)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.com/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | occasionally | CC BY 3.0 | [issues](https://github.com/AdAway/AdAway/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
MetaMask eth-phishing-detect | Phishing domains targeting Ethereum users. |[link](https://github.com/MetaMask/eth-phishing-detect) | [raw](https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt) | frequent | DON'T BE A DICK PUBLIC LICENSE | [issues](https://github.com/MetaMask/eth-phishing-detect/issues)
minecraft-hosts | Minecraft related tracker hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | occasionally | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
orca.pet | This is a domain list for blocking phishing and malware sites . |[link](https://orca.pet/notonmyshift/) | [raw](https://orca.pet/notonmyshift/hosts.txt) | frequent | ISC | [issues](https://github.com/socram8888/not-on-my-shift)
osint.digitalside.it | DigitalSide Threat-Intel malware domains list. |[link](https://github.com/davidonzo/Threat-Intel) | [raw](https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt) | daily | MIT | [issues](https://github.com/davidonzo/Threat-Intel/issues)
shady-hosts | Analytics, ad, and activity monitoring hosts |[link](https://github.com/shreyasminocha/shady-hosts) | [raw](https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts) | occasionally | CC0-1.0 | [issues](https://github.com/shreyasminocha/shady-hosts/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](mailto:hosts@someonewhocares.org)
Tiuxo hostlist - ads | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:contactme@abuse.ch)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
Fake News | An in-progress collection of fake news outlets. |[link](https://github.com/marktron/fakenews) | [raw](https://raw.githubusercontent.com/marktron/fakenews/master/fakenews) | occasional | MIT | [issues](https://github.com/marktron/fakenews/issues)
Sinfonietta's gambling blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/gambling-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Sinfonietta's social media blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/social-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Tiuxo hostlist - social | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/social) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
## Extensions
The unified hosts file is optionally extensible. Extensions are used to include domains by category. Currently, we offer the following categories: `fakenews`, `social`, `gambling`, and `porn`.
@@ -98,7 +101,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -108,7 +132,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -119,10 +145,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -167,6 +189,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -177,6 +204,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -223,8 +273,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -236,7 +285,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -275,7 +323,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -322,13 +369,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -338,13 +392,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -423,11 +470,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -437,6 +486,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
File diff suppressed because it is too large Load Diff
+107 -56
View File
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -21,11 +21,10 @@
This repository consolidates several reputable `hosts` files, and merges them
into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided.
* Last updated: **April 07 2020**.
* Here's the [raw hosts file with fakenews, gambling extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) containing 57,719 entries.
* Last updated: **July 04 2021**.
* Here's the [raw hosts file with fakenews, gambling extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) containing 86,399 entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -36,22 +35,22 @@ with GitHub download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non GitHub mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 54,456 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 55,398 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 56,777 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 71,261 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 57,207 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 57,719 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 72,203 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 58,149 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 73,582 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 59,528 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 74,011 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 74,524 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 60,470 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 74,953 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 76,332 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 77,274 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 81,747 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 83,942 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 84,204 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 107,898 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 84,562 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 86,399 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 110,093 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 86,757 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 110,355 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 87,019 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 110,712 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 112,550 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,214 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 112,907 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 113,169 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 115,364 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
@@ -65,26 +64,30 @@ included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
Steven Black's ad-hoc list | Additional sketch domains as I come across them. |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | occasionally | MIT | [issues](https://github.com/StevenBlack/hosts/issues)
Malware Domain List | Malware Domain List is a non-commercial community project. |[link](https://www.malwaredomainlist.com/) | [raw](https://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](https://www.malwaredomainlist.com/contact.php)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](hosts@someonewhocares.org)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](http://winhelp2002.mvps.org/) | [raw](http://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | frequently | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
AdguardTeam cname trackers | CNAME-cloaked tracking abuses. |[link](https://github.com/AdguardTeam/cname-trackers) | [raw](https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt) | occasionally | MIT | [issues](https://github.com/AdguardTeam/cname-trackers/issues)
Mitchell Krog's - Badd Boyz Hosts | Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | weekly | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:cosntacptamem@abuse.ch)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.com/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | occasionally | CC BY 3.0 | [issues](https://github.com/AdAway/AdAway/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
MetaMask eth-phishing-detect | Phishing domains targeting Ethereum users. |[link](https://github.com/MetaMask/eth-phishing-detect) | [raw](https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt) | frequent | DON'T BE A DICK PUBLIC LICENSE | [issues](https://github.com/MetaMask/eth-phishing-detect/issues)
minecraft-hosts | Minecraft related tracker hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | occasionally | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
orca.pet | This is a domain list for blocking phishing and malware sites . |[link](https://orca.pet/notonmyshift/) | [raw](https://orca.pet/notonmyshift/hosts.txt) | frequent | ISC | [issues](https://github.com/socram8888/not-on-my-shift)
osint.digitalside.it | DigitalSide Threat-Intel malware domains list. |[link](https://github.com/davidonzo/Threat-Intel) | [raw](https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt) | daily | MIT | [issues](https://github.com/davidonzo/Threat-Intel/issues)
shady-hosts | Analytics, ad, and activity monitoring hosts |[link](https://github.com/shreyasminocha/shady-hosts) | [raw](https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts) | occasionally | CC0-1.0 | [issues](https://github.com/shreyasminocha/shady-hosts/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](mailto:hosts@someonewhocares.org)
Tiuxo hostlist - ads | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:contactme@abuse.ch)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
Fake News | An in-progress collection of fake news outlets. |[link](https://github.com/marktron/fakenews) | [raw](https://raw.githubusercontent.com/marktron/fakenews/master/fakenews) | occasional | MIT | [issues](https://github.com/marktron/fakenews/issues)
Sinfonietta's gambling blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/gambling-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
## Extensions
The unified hosts file is optionally extensible. Extensions are used to include domains by category. Currently, we offer the following categories: `fakenews`, `social`, `gambling`, and `porn`.
@@ -96,7 +99,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -106,7 +130,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -117,10 +143,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -165,6 +187,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -175,6 +202,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -221,8 +271,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -234,7 +283,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -273,7 +321,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -320,13 +367,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -336,13 +390,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -421,11 +468,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -435,6 +484,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
File diff suppressed because it is too large Load Diff
+108 -57
View File
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -21,11 +21,10 @@
This repository consolidates several reputable `hosts` files, and merges them
into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided.
* Last updated: **April 07 2020**.
* Here's the [raw hosts file with fakenews, porn, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) containing 74,953 entries.
* Last updated: **July 04 2021**.
* Here's the [raw hosts file with fakenews, porn, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) containing 112,907 entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -36,22 +35,22 @@ with GitHub download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non GitHub mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 54,456 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 55,398 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 56,777 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 71,261 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 57,207 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 57,719 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 72,203 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 58,149 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 73,582 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 59,528 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 74,011 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 74,524 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 60,470 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 74,953 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 76,332 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 77,274 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 81,747 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 83,942 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 84,204 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 107,898 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 84,562 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 86,399 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 110,093 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 86,757 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 110,355 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 87,019 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 110,712 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 112,550 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,214 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 112,907 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 113,169 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 115,364 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
@@ -65,31 +64,35 @@ included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
Steven Black's ad-hoc list | Additional sketch domains as I come across them. |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | occasionally | MIT | [issues](https://github.com/StevenBlack/hosts/issues)
Malware Domain List | Malware Domain List is a non-commercial community project. |[link](https://www.malwaredomainlist.com/) | [raw](https://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](https://www.malwaredomainlist.com/contact.php)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](hosts@someonewhocares.org)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](http://winhelp2002.mvps.org/) | [raw](http://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | frequently | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
AdguardTeam cname trackers | CNAME-cloaked tracking abuses. |[link](https://github.com/AdguardTeam/cname-trackers) | [raw](https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt) | occasionally | MIT | [issues](https://github.com/AdguardTeam/cname-trackers/issues)
Mitchell Krog's - Badd Boyz Hosts | Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | weekly | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:cosntacptamem@abuse.ch)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.com/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | occasionally | CC BY 3.0 | [issues](https://github.com/AdAway/AdAway/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
MetaMask eth-phishing-detect | Phishing domains targeting Ethereum users. |[link](https://github.com/MetaMask/eth-phishing-detect) | [raw](https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt) | frequent | DON'T BE A DICK PUBLIC LICENSE | [issues](https://github.com/MetaMask/eth-phishing-detect/issues)
minecraft-hosts | Minecraft related tracker hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | occasionally | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
orca.pet | This is a domain list for blocking phishing and malware sites . |[link](https://orca.pet/notonmyshift/) | [raw](https://orca.pet/notonmyshift/hosts.txt) | frequent | ISC | [issues](https://github.com/socram8888/not-on-my-shift)
osint.digitalside.it | DigitalSide Threat-Intel malware domains list. |[link](https://github.com/davidonzo/Threat-Intel) | [raw](https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt) | daily | MIT | [issues](https://github.com/davidonzo/Threat-Intel/issues)
shady-hosts | Analytics, ad, and activity monitoring hosts |[link](https://github.com/shreyasminocha/shady-hosts) | [raw](https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts) | occasionally | CC0-1.0 | [issues](https://github.com/shreyasminocha/shady-hosts/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](mailto:hosts@someonewhocares.org)
Tiuxo hostlist - ads | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:contactme@abuse.ch)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
Fake News | An in-progress collection of fake news outlets. |[link](https://github.com/marktron/fakenews) | [raw](https://raw.githubusercontent.com/marktron/fakenews/master/fakenews) | occasional | MIT | [issues](https://github.com/marktron/fakenews/issues)
Sinfonietta's snuff-site blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
pornhosts -- a consolidated anti porn hosts file | This is an endeavour to find all porn domains and compile them into a single hosts to allow for easy blocking of porn on your local machine or on a network. |[link](https://github.com/Clefspeare13/pornhosts) | [raw](https://raw.githubusercontent.com/Clefspeare13/pornhosts/master/0.0.0.0/hosts) | occasional | MIT | [issues](https://github.com/Clefspeare13/pornhosts/issues)
Sinfonietta's porn blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/pornography-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Sinfonietta's snuff-site blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Tiuxo hostlist - pornography | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/porn) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
Sinfonietta's social media blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/social-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Tiuxo hostlist - social | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/social) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
## Extensions
The unified hosts file is optionally extensible. Extensions are used to include domains by category. Currently, we offer the following categories: `fakenews`, `social`, `gambling`, and `porn`.
@@ -101,7 +104,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -111,7 +135,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -122,10 +148,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -170,6 +192,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -180,6 +207,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -226,8 +276,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -239,7 +288,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -278,7 +326,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -325,13 +372,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -341,13 +395,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -426,11 +473,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -440,6 +489,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
+98604 -62833
View File
File diff suppressed because it is too large Load Diff
+108 -57
View File
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -21,11 +21,10 @@
This repository consolidates several reputable `hosts` files, and merges them
into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided.
* Last updated: **April 07 2020**.
* Here's the [raw hosts file with fakenews, porn extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) containing 72,203 entries.
* Last updated: **July 04 2021**.
* Here's the [raw hosts file with fakenews, porn extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) containing 110,093 entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -36,22 +35,22 @@ with GitHub download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non GitHub mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 54,456 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 55,398 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 56,777 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 71,261 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 57,207 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 57,719 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 72,203 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 58,149 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 73,582 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 59,528 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 74,011 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 74,524 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 60,470 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 74,953 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 76,332 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 77,274 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 81,747 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 83,942 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 84,204 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 107,898 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 84,562 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 86,399 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 110,093 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 86,757 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 110,355 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 87,019 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 110,712 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 112,550 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,214 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 112,907 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 113,169 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 115,364 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
@@ -65,29 +64,33 @@ included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
Steven Black's ad-hoc list | Additional sketch domains as I come across them. |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | occasionally | MIT | [issues](https://github.com/StevenBlack/hosts/issues)
Malware Domain List | Malware Domain List is a non-commercial community project. |[link](https://www.malwaredomainlist.com/) | [raw](https://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](https://www.malwaredomainlist.com/contact.php)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](hosts@someonewhocares.org)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](http://winhelp2002.mvps.org/) | [raw](http://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | frequently | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
AdguardTeam cname trackers | CNAME-cloaked tracking abuses. |[link](https://github.com/AdguardTeam/cname-trackers) | [raw](https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt) | occasionally | MIT | [issues](https://github.com/AdguardTeam/cname-trackers/issues)
Mitchell Krog's - Badd Boyz Hosts | Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | weekly | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:cosntacptamem@abuse.ch)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.com/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | occasionally | CC BY 3.0 | [issues](https://github.com/AdAway/AdAway/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
MetaMask eth-phishing-detect | Phishing domains targeting Ethereum users. |[link](https://github.com/MetaMask/eth-phishing-detect) | [raw](https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt) | frequent | DON'T BE A DICK PUBLIC LICENSE | [issues](https://github.com/MetaMask/eth-phishing-detect/issues)
minecraft-hosts | Minecraft related tracker hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | occasionally | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
orca.pet | This is a domain list for blocking phishing and malware sites . |[link](https://orca.pet/notonmyshift/) | [raw](https://orca.pet/notonmyshift/hosts.txt) | frequent | ISC | [issues](https://github.com/socram8888/not-on-my-shift)
osint.digitalside.it | DigitalSide Threat-Intel malware domains list. |[link](https://github.com/davidonzo/Threat-Intel) | [raw](https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt) | daily | MIT | [issues](https://github.com/davidonzo/Threat-Intel/issues)
shady-hosts | Analytics, ad, and activity monitoring hosts |[link](https://github.com/shreyasminocha/shady-hosts) | [raw](https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts) | occasionally | CC0-1.0 | [issues](https://github.com/shreyasminocha/shady-hosts/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](mailto:hosts@someonewhocares.org)
Tiuxo hostlist - ads | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:contactme@abuse.ch)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
Fake News | An in-progress collection of fake news outlets. |[link](https://github.com/marktron/fakenews) | [raw](https://raw.githubusercontent.com/marktron/fakenews/master/fakenews) | occasional | MIT | [issues](https://github.com/marktron/fakenews/issues)
Sinfonietta's snuff-site blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
pornhosts -- a consolidated anti porn hosts file | This is an endeavour to find all porn domains and compile them into a single hosts to allow for easy blocking of porn on your local machine or on a network. |[link](https://github.com/Clefspeare13/pornhosts) | [raw](https://raw.githubusercontent.com/Clefspeare13/pornhosts/master/0.0.0.0/hosts) | occasional | MIT | [issues](https://github.com/Clefspeare13/pornhosts/issues)
Sinfonietta's porn blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/pornography-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Sinfonietta's snuff-site blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Tiuxo hostlist - pornography | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/porn) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
## Extensions
The unified hosts file is optionally extensible. Extensions are used to include domains by category. Currently, we offer the following categories: `fakenews`, `social`, `gambling`, and `porn`.
@@ -99,7 +102,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -109,7 +133,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -120,10 +146,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -168,6 +190,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -178,6 +205,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -224,8 +274,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -237,7 +286,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -276,7 +324,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -323,13 +370,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -339,13 +393,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -424,11 +471,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -438,6 +487,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
+77259 -50781
View File
File diff suppressed because it is too large Load Diff
+107 -56
View File
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -21,11 +21,10 @@
This repository consolidates several reputable `hosts` files, and merges them
into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided.
* Last updated: **April 07 2020**.
* Here's the [raw hosts file with fakenews, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) containing 58,149 entries.
* Last updated: **July 04 2021**.
* Here's the [raw hosts file with fakenews, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) containing 86,757 entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -36,22 +35,22 @@ with GitHub download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non GitHub mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 54,456 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 55,398 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 56,777 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 71,261 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 57,207 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 57,719 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 72,203 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 58,149 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 73,582 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 59,528 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 74,011 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 74,524 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 60,470 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 74,953 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 76,332 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 77,274 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 81,747 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 83,942 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 84,204 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 107,898 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 84,562 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 86,399 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 110,093 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 86,757 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 110,355 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 87,019 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 110,712 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 112,550 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,214 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 112,907 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 113,169 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 115,364 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
@@ -65,27 +64,31 @@ included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
Steven Black's ad-hoc list | Additional sketch domains as I come across them. |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | occasionally | MIT | [issues](https://github.com/StevenBlack/hosts/issues)
Malware Domain List | Malware Domain List is a non-commercial community project. |[link](https://www.malwaredomainlist.com/) | [raw](https://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](https://www.malwaredomainlist.com/contact.php)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](hosts@someonewhocares.org)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](http://winhelp2002.mvps.org/) | [raw](http://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | frequently | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
AdguardTeam cname trackers | CNAME-cloaked tracking abuses. |[link](https://github.com/AdguardTeam/cname-trackers) | [raw](https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt) | occasionally | MIT | [issues](https://github.com/AdguardTeam/cname-trackers/issues)
Mitchell Krog's - Badd Boyz Hosts | Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | weekly | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:cosntacptamem@abuse.ch)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.com/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | occasionally | CC BY 3.0 | [issues](https://github.com/AdAway/AdAway/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
MetaMask eth-phishing-detect | Phishing domains targeting Ethereum users. |[link](https://github.com/MetaMask/eth-phishing-detect) | [raw](https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt) | frequent | DON'T BE A DICK PUBLIC LICENSE | [issues](https://github.com/MetaMask/eth-phishing-detect/issues)
minecraft-hosts | Minecraft related tracker hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | occasionally | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
orca.pet | This is a domain list for blocking phishing and malware sites . |[link](https://orca.pet/notonmyshift/) | [raw](https://orca.pet/notonmyshift/hosts.txt) | frequent | ISC | [issues](https://github.com/socram8888/not-on-my-shift)
osint.digitalside.it | DigitalSide Threat-Intel malware domains list. |[link](https://github.com/davidonzo/Threat-Intel) | [raw](https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt) | daily | MIT | [issues](https://github.com/davidonzo/Threat-Intel/issues)
shady-hosts | Analytics, ad, and activity monitoring hosts |[link](https://github.com/shreyasminocha/shady-hosts) | [raw](https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts) | occasionally | CC0-1.0 | [issues](https://github.com/shreyasminocha/shady-hosts/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](mailto:hosts@someonewhocares.org)
Tiuxo hostlist - ads | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:contactme@abuse.ch)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
Fake News | An in-progress collection of fake news outlets. |[link](https://github.com/marktron/fakenews) | [raw](https://raw.githubusercontent.com/marktron/fakenews/master/fakenews) | occasional | MIT | [issues](https://github.com/marktron/fakenews/issues)
Sinfonietta's social media blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/social-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Tiuxo hostlist - social | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/social) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
## Extensions
The unified hosts file is optionally extensible. Extensions are used to include domains by category. Currently, we offer the following categories: `fakenews`, `social`, `gambling`, and `porn`.
@@ -97,7 +100,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -107,7 +131,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -118,10 +144,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -166,6 +188,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -176,6 +203,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -222,8 +272,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -235,7 +284,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -274,7 +322,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -321,13 +368,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -337,13 +391,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -422,11 +469,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -436,6 +485,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
+77156 -50747
View File
File diff suppressed because it is too large Load Diff
+107 -56
View File
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -21,11 +21,10 @@
This repository consolidates several reputable `hosts` files, and merges them
into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided.
* Last updated: **April 07 2020**.
* Here's the [raw hosts file with fakenews extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) containing 55,398 entries.
* Last updated: **July 04 2021**.
* Here's the [raw hosts file with fakenews extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) containing 83,942 entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -36,22 +35,22 @@ with GitHub download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non GitHub mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 54,456 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 55,398 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 56,777 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 71,261 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 57,207 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 57,719 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 72,203 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 58,149 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 73,582 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 59,528 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 74,011 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 74,524 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 60,470 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 74,953 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 76,332 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 77,274 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 81,747 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 83,942 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 84,204 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 107,898 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 84,562 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 86,399 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 110,093 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 86,757 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 110,355 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 87,019 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 110,712 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 112,550 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,214 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 112,907 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 113,169 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 115,364 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
@@ -65,25 +64,29 @@ included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
Steven Black's ad-hoc list | Additional sketch domains as I come across them. |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | occasionally | MIT | [issues](https://github.com/StevenBlack/hosts/issues)
Malware Domain List | Malware Domain List is a non-commercial community project. |[link](https://www.malwaredomainlist.com/) | [raw](https://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](https://www.malwaredomainlist.com/contact.php)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](hosts@someonewhocares.org)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](http://winhelp2002.mvps.org/) | [raw](http://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | frequently | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
AdguardTeam cname trackers | CNAME-cloaked tracking abuses. |[link](https://github.com/AdguardTeam/cname-trackers) | [raw](https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt) | occasionally | MIT | [issues](https://github.com/AdguardTeam/cname-trackers/issues)
Mitchell Krog's - Badd Boyz Hosts | Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | weekly | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:cosntacptamem@abuse.ch)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.com/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | occasionally | CC BY 3.0 | [issues](https://github.com/AdAway/AdAway/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
MetaMask eth-phishing-detect | Phishing domains targeting Ethereum users. |[link](https://github.com/MetaMask/eth-phishing-detect) | [raw](https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt) | frequent | DON'T BE A DICK PUBLIC LICENSE | [issues](https://github.com/MetaMask/eth-phishing-detect/issues)
minecraft-hosts | Minecraft related tracker hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | occasionally | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
orca.pet | This is a domain list for blocking phishing and malware sites . |[link](https://orca.pet/notonmyshift/) | [raw](https://orca.pet/notonmyshift/hosts.txt) | frequent | ISC | [issues](https://github.com/socram8888/not-on-my-shift)
osint.digitalside.it | DigitalSide Threat-Intel malware domains list. |[link](https://github.com/davidonzo/Threat-Intel) | [raw](https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt) | daily | MIT | [issues](https://github.com/davidonzo/Threat-Intel/issues)
shady-hosts | Analytics, ad, and activity monitoring hosts |[link](https://github.com/shreyasminocha/shady-hosts) | [raw](https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts) | occasionally | CC0-1.0 | [issues](https://github.com/shreyasminocha/shady-hosts/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](mailto:hosts@someonewhocares.org)
Tiuxo hostlist - ads | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:contactme@abuse.ch)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
Fake News | An in-progress collection of fake news outlets. |[link](https://github.com/marktron/fakenews) | [raw](https://raw.githubusercontent.com/marktron/fakenews/master/fakenews) | occasional | MIT | [issues](https://github.com/marktron/fakenews/issues)
## Extensions
The unified hosts file is optionally extensible. Extensions are used to include domains by category. Currently, we offer the following categories: `fakenews`, `social`, `gambling`, and `porn`.
@@ -95,7 +98,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -105,7 +129,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -116,10 +142,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -164,6 +186,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -174,6 +201,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -220,8 +270,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -233,7 +282,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -272,7 +320,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -319,13 +366,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -335,13 +389,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -420,11 +467,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -434,6 +483,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
File diff suppressed because it is too large Load Diff
+108 -57
View File
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -21,11 +21,10 @@
This repository consolidates several reputable `hosts` files, and merges them
into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided.
* Last updated: **April 07 2020**.
* Here's the [raw hosts file with gambling, porn, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) containing 76,332 entries.
* Last updated: **July 04 2021**.
* Here's the [raw hosts file with gambling, porn, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) containing 113,169 entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -36,22 +35,22 @@ with GitHub download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non GitHub mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 54,456 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 55,398 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 56,777 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 71,261 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 57,207 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 57,719 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 72,203 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 58,149 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 73,582 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 59,528 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 74,011 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 74,524 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 60,470 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 74,953 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 76,332 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 77,274 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 81,747 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 83,942 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 84,204 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 107,898 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 84,562 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 86,399 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 110,093 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 86,757 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 110,355 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 87,019 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 110,712 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 112,550 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,214 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 112,907 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 113,169 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 115,364 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
@@ -65,31 +64,35 @@ included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
Steven Black's ad-hoc list | Additional sketch domains as I come across them. |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | occasionally | MIT | [issues](https://github.com/StevenBlack/hosts/issues)
Malware Domain List | Malware Domain List is a non-commercial community project. |[link](https://www.malwaredomainlist.com/) | [raw](https://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](https://www.malwaredomainlist.com/contact.php)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](hosts@someonewhocares.org)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](http://winhelp2002.mvps.org/) | [raw](http://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | frequently | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
AdguardTeam cname trackers | CNAME-cloaked tracking abuses. |[link](https://github.com/AdguardTeam/cname-trackers) | [raw](https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt) | occasionally | MIT | [issues](https://github.com/AdguardTeam/cname-trackers/issues)
Mitchell Krog's - Badd Boyz Hosts | Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | weekly | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:cosntacptamem@abuse.ch)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.com/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | occasionally | CC BY 3.0 | [issues](https://github.com/AdAway/AdAway/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
MetaMask eth-phishing-detect | Phishing domains targeting Ethereum users. |[link](https://github.com/MetaMask/eth-phishing-detect) | [raw](https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt) | frequent | DON'T BE A DICK PUBLIC LICENSE | [issues](https://github.com/MetaMask/eth-phishing-detect/issues)
minecraft-hosts | Minecraft related tracker hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | occasionally | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
orca.pet | This is a domain list for blocking phishing and malware sites . |[link](https://orca.pet/notonmyshift/) | [raw](https://orca.pet/notonmyshift/hosts.txt) | frequent | ISC | [issues](https://github.com/socram8888/not-on-my-shift)
osint.digitalside.it | DigitalSide Threat-Intel malware domains list. |[link](https://github.com/davidonzo/Threat-Intel) | [raw](https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt) | daily | MIT | [issues](https://github.com/davidonzo/Threat-Intel/issues)
shady-hosts | Analytics, ad, and activity monitoring hosts |[link](https://github.com/shreyasminocha/shady-hosts) | [raw](https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts) | occasionally | CC0-1.0 | [issues](https://github.com/shreyasminocha/shady-hosts/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](mailto:hosts@someonewhocares.org)
Tiuxo hostlist - ads | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:contactme@abuse.ch)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
Sinfonietta's gambling blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/gambling-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Sinfonietta's snuff-site blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
pornhosts -- a consolidated anti porn hosts file | This is an endeavour to find all porn domains and compile them into a single hosts to allow for easy blocking of porn on your local machine or on a network. |[link](https://github.com/Clefspeare13/pornhosts) | [raw](https://raw.githubusercontent.com/Clefspeare13/pornhosts/master/0.0.0.0/hosts) | occasional | MIT | [issues](https://github.com/Clefspeare13/pornhosts/issues)
Sinfonietta's porn blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/pornography-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Sinfonietta's snuff-site blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Tiuxo hostlist - pornography | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/porn) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
Sinfonietta's social media blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/social-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Tiuxo hostlist - social | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/social) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
## Extensions
The unified hosts file is optionally extensible. Extensions are used to include domains by category. Currently, we offer the following categories: `fakenews`, `social`, `gambling`, and `porn`.
@@ -101,7 +104,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -111,7 +135,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -122,10 +148,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -170,6 +192,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -180,6 +207,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -226,8 +276,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -239,7 +288,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -278,7 +326,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -325,13 +372,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -341,13 +395,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -426,11 +473,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -440,6 +489,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
+99391 -64741
View File
File diff suppressed because it is too large Load Diff
+108 -57
View File
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -21,11 +21,10 @@
This repository consolidates several reputable `hosts` files, and merges them
into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided.
* Last updated: **April 07 2020**.
* Here's the [raw hosts file with gambling, porn extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) containing 73,582 entries.
* Last updated: **July 04 2021**.
* Here's the [raw hosts file with gambling, porn extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) containing 110,355 entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -36,22 +35,22 @@ with GitHub download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non GitHub mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 54,456 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 55,398 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 56,777 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 71,261 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 57,207 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 57,719 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 72,203 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 58,149 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 73,582 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 59,528 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 74,011 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 74,524 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 60,470 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 74,953 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 76,332 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 77,274 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 81,747 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 83,942 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 84,204 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 107,898 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 84,562 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 86,399 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 110,093 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 86,757 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 110,355 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 87,019 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 110,712 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 112,550 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,214 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 112,907 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 113,169 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 115,364 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
@@ -65,29 +64,33 @@ included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
Steven Black's ad-hoc list | Additional sketch domains as I come across them. |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | occasionally | MIT | [issues](https://github.com/StevenBlack/hosts/issues)
Malware Domain List | Malware Domain List is a non-commercial community project. |[link](https://www.malwaredomainlist.com/) | [raw](https://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](https://www.malwaredomainlist.com/contact.php)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](hosts@someonewhocares.org)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](http://winhelp2002.mvps.org/) | [raw](http://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | frequently | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
AdguardTeam cname trackers | CNAME-cloaked tracking abuses. |[link](https://github.com/AdguardTeam/cname-trackers) | [raw](https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt) | occasionally | MIT | [issues](https://github.com/AdguardTeam/cname-trackers/issues)
Mitchell Krog's - Badd Boyz Hosts | Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | weekly | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:cosntacptamem@abuse.ch)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.com/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | occasionally | CC BY 3.0 | [issues](https://github.com/AdAway/AdAway/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
MetaMask eth-phishing-detect | Phishing domains targeting Ethereum users. |[link](https://github.com/MetaMask/eth-phishing-detect) | [raw](https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt) | frequent | DON'T BE A DICK PUBLIC LICENSE | [issues](https://github.com/MetaMask/eth-phishing-detect/issues)
minecraft-hosts | Minecraft related tracker hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | occasionally | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
orca.pet | This is a domain list for blocking phishing and malware sites . |[link](https://orca.pet/notonmyshift/) | [raw](https://orca.pet/notonmyshift/hosts.txt) | frequent | ISC | [issues](https://github.com/socram8888/not-on-my-shift)
osint.digitalside.it | DigitalSide Threat-Intel malware domains list. |[link](https://github.com/davidonzo/Threat-Intel) | [raw](https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt) | daily | MIT | [issues](https://github.com/davidonzo/Threat-Intel/issues)
shady-hosts | Analytics, ad, and activity monitoring hosts |[link](https://github.com/shreyasminocha/shady-hosts) | [raw](https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts) | occasionally | CC0-1.0 | [issues](https://github.com/shreyasminocha/shady-hosts/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](mailto:hosts@someonewhocares.org)
Tiuxo hostlist - ads | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:contactme@abuse.ch)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
Sinfonietta's gambling blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/gambling-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Sinfonietta's snuff-site blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
pornhosts -- a consolidated anti porn hosts file | This is an endeavour to find all porn domains and compile them into a single hosts to allow for easy blocking of porn on your local machine or on a network. |[link](https://github.com/Clefspeare13/pornhosts) | [raw](https://raw.githubusercontent.com/Clefspeare13/pornhosts/master/0.0.0.0/hosts) | occasional | MIT | [issues](https://github.com/Clefspeare13/pornhosts/issues)
Sinfonietta's porn blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/pornography-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Sinfonietta's snuff-site blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Tiuxo hostlist - pornography | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/porn) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
## Extensions
The unified hosts file is optionally extensible. Extensions are used to include domains by category. Currently, we offer the following categories: `fakenews`, `social`, `gambling`, and `porn`.
@@ -99,7 +102,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -109,7 +133,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -120,10 +146,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -168,6 +190,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -178,6 +205,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -224,8 +274,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -237,7 +286,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -276,7 +324,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -323,13 +370,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -339,13 +393,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -424,11 +471,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -438,6 +487,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
+78046 -52689
View File
File diff suppressed because it is too large Load Diff
+107 -56
View File
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -21,11 +21,10 @@
This repository consolidates several reputable `hosts` files, and merges them
into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided.
* Last updated: **April 07 2020**.
* Here's the [raw hosts file with gambling, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) containing 59,528 entries.
* Last updated: **July 04 2021**.
* Here's the [raw hosts file with gambling, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) containing 87,019 entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -36,22 +35,22 @@ with GitHub download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non GitHub mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 54,456 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 55,398 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 56,777 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 71,261 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 57,207 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 57,719 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 72,203 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 58,149 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 73,582 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 59,528 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 74,011 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 74,524 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 60,470 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 74,953 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 76,332 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 77,274 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 81,747 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 83,942 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 84,204 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 107,898 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 84,562 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 86,399 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 110,093 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 86,757 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 110,355 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 87,019 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 110,712 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 112,550 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,214 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 112,907 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 113,169 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 115,364 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
@@ -65,27 +64,31 @@ included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
Steven Black's ad-hoc list | Additional sketch domains as I come across them. |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | occasionally | MIT | [issues](https://github.com/StevenBlack/hosts/issues)
Malware Domain List | Malware Domain List is a non-commercial community project. |[link](https://www.malwaredomainlist.com/) | [raw](https://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](https://www.malwaredomainlist.com/contact.php)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](hosts@someonewhocares.org)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](http://winhelp2002.mvps.org/) | [raw](http://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | frequently | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
AdguardTeam cname trackers | CNAME-cloaked tracking abuses. |[link](https://github.com/AdguardTeam/cname-trackers) | [raw](https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt) | occasionally | MIT | [issues](https://github.com/AdguardTeam/cname-trackers/issues)
Mitchell Krog's - Badd Boyz Hosts | Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | weekly | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:cosntacptamem@abuse.ch)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.com/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | occasionally | CC BY 3.0 | [issues](https://github.com/AdAway/AdAway/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
MetaMask eth-phishing-detect | Phishing domains targeting Ethereum users. |[link](https://github.com/MetaMask/eth-phishing-detect) | [raw](https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt) | frequent | DON'T BE A DICK PUBLIC LICENSE | [issues](https://github.com/MetaMask/eth-phishing-detect/issues)
minecraft-hosts | Minecraft related tracker hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | occasionally | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
orca.pet | This is a domain list for blocking phishing and malware sites . |[link](https://orca.pet/notonmyshift/) | [raw](https://orca.pet/notonmyshift/hosts.txt) | frequent | ISC | [issues](https://github.com/socram8888/not-on-my-shift)
osint.digitalside.it | DigitalSide Threat-Intel malware domains list. |[link](https://github.com/davidonzo/Threat-Intel) | [raw](https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt) | daily | MIT | [issues](https://github.com/davidonzo/Threat-Intel/issues)
shady-hosts | Analytics, ad, and activity monitoring hosts |[link](https://github.com/shreyasminocha/shady-hosts) | [raw](https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts) | occasionally | CC0-1.0 | [issues](https://github.com/shreyasminocha/shady-hosts/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](mailto:hosts@someonewhocares.org)
Tiuxo hostlist - ads | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:contactme@abuse.ch)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
Sinfonietta's gambling blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/gambling-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Sinfonietta's social media blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/social-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Tiuxo hostlist - social | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/social) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
## Extensions
The unified hosts file is optionally extensible. Extensions are used to include domains by category. Currently, we offer the following categories: `fakenews`, `social`, `gambling`, and `porn`.
@@ -97,7 +100,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -107,7 +131,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -118,10 +144,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -166,6 +188,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -176,6 +203,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -222,8 +272,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -235,7 +284,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -274,7 +322,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -321,13 +368,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -337,13 +391,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -422,11 +469,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -436,6 +485,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
+77943 -52655
View File
File diff suppressed because it is too large Load Diff
+107 -56
View File
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -21,11 +21,10 @@
This repository consolidates several reputable `hosts` files, and merges them
into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided.
* Last updated: **April 07 2020**.
* Here's the [raw hosts file with gambling extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) containing 56,777 entries.
* Last updated: **July 04 2021**.
* Here's the [raw hosts file with gambling extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) containing 84,204 entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -36,22 +35,22 @@ with GitHub download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non GitHub mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 54,456 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 55,398 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 56,777 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 71,261 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 57,207 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 57,719 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 72,203 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 58,149 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 73,582 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 59,528 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 74,011 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 74,524 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 60,470 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 74,953 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 76,332 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 77,274 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 81,747 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 83,942 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 84,204 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 107,898 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 84,562 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 86,399 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 110,093 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 86,757 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 110,355 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 87,019 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 110,712 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 112,550 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,214 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 112,907 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 113,169 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 115,364 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
@@ -65,25 +64,29 @@ included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
Steven Black's ad-hoc list | Additional sketch domains as I come across them. |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | occasionally | MIT | [issues](https://github.com/StevenBlack/hosts/issues)
Malware Domain List | Malware Domain List is a non-commercial community project. |[link](https://www.malwaredomainlist.com/) | [raw](https://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](https://www.malwaredomainlist.com/contact.php)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](hosts@someonewhocares.org)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](http://winhelp2002.mvps.org/) | [raw](http://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | frequently | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
AdguardTeam cname trackers | CNAME-cloaked tracking abuses. |[link](https://github.com/AdguardTeam/cname-trackers) | [raw](https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt) | occasionally | MIT | [issues](https://github.com/AdguardTeam/cname-trackers/issues)
Mitchell Krog's - Badd Boyz Hosts | Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | weekly | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:cosntacptamem@abuse.ch)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.com/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | occasionally | CC BY 3.0 | [issues](https://github.com/AdAway/AdAway/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
MetaMask eth-phishing-detect | Phishing domains targeting Ethereum users. |[link](https://github.com/MetaMask/eth-phishing-detect) | [raw](https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt) | frequent | DON'T BE A DICK PUBLIC LICENSE | [issues](https://github.com/MetaMask/eth-phishing-detect/issues)
minecraft-hosts | Minecraft related tracker hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | occasionally | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
orca.pet | This is a domain list for blocking phishing and malware sites . |[link](https://orca.pet/notonmyshift/) | [raw](https://orca.pet/notonmyshift/hosts.txt) | frequent | ISC | [issues](https://github.com/socram8888/not-on-my-shift)
osint.digitalside.it | DigitalSide Threat-Intel malware domains list. |[link](https://github.com/davidonzo/Threat-Intel) | [raw](https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt) | daily | MIT | [issues](https://github.com/davidonzo/Threat-Intel/issues)
shady-hosts | Analytics, ad, and activity monitoring hosts |[link](https://github.com/shreyasminocha/shady-hosts) | [raw](https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts) | occasionally | CC0-1.0 | [issues](https://github.com/shreyasminocha/shady-hosts/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](mailto:hosts@someonewhocares.org)
Tiuxo hostlist - ads | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:contactme@abuse.ch)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
Sinfonietta's gambling blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/gambling-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
## Extensions
The unified hosts file is optionally extensible. Extensions are used to include domains by category. Currently, we offer the following categories: `fakenews`, `social`, `gambling`, and `porn`.
@@ -95,7 +98,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -105,7 +129,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -116,10 +142,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -164,6 +186,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -174,6 +201,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -220,8 +270,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -233,7 +282,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -272,7 +320,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -319,13 +366,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -335,13 +389,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -420,11 +467,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -434,6 +483,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
+97453 -62866
View File
File diff suppressed because it is too large Load Diff
+108 -57
View File
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -21,11 +21,10 @@
This repository consolidates several reputable `hosts` files, and merges them
into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided.
* Last updated: **April 07 2020**.
* Here's the [raw hosts file with porn, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) containing 74,011 entries.
* Last updated: **July 04 2021**.
* Here's the [raw hosts file with porn, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) containing 110,712 entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -36,22 +35,22 @@ with GitHub download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non GitHub mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 54,456 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 55,398 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 56,777 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 71,261 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 57,207 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 57,719 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 72,203 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 58,149 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 73,582 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 59,528 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 74,011 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 74,524 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 60,470 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 74,953 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 76,332 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 77,274 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 81,747 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 83,942 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 84,204 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 107,898 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 84,562 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 86,399 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 110,093 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 86,757 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 110,355 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 87,019 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 110,712 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 112,550 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,214 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 112,907 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 113,169 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 115,364 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
@@ -65,30 +64,34 @@ included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
Steven Black's ad-hoc list | Additional sketch domains as I come across them. |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | occasionally | MIT | [issues](https://github.com/StevenBlack/hosts/issues)
Malware Domain List | Malware Domain List is a non-commercial community project. |[link](https://www.malwaredomainlist.com/) | [raw](https://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](https://www.malwaredomainlist.com/contact.php)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](hosts@someonewhocares.org)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](http://winhelp2002.mvps.org/) | [raw](http://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | frequently | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
AdguardTeam cname trackers | CNAME-cloaked tracking abuses. |[link](https://github.com/AdguardTeam/cname-trackers) | [raw](https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt) | occasionally | MIT | [issues](https://github.com/AdguardTeam/cname-trackers/issues)
Mitchell Krog's - Badd Boyz Hosts | Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | weekly | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:cosntacptamem@abuse.ch)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.com/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | occasionally | CC BY 3.0 | [issues](https://github.com/AdAway/AdAway/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
MetaMask eth-phishing-detect | Phishing domains targeting Ethereum users. |[link](https://github.com/MetaMask/eth-phishing-detect) | [raw](https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt) | frequent | DON'T BE A DICK PUBLIC LICENSE | [issues](https://github.com/MetaMask/eth-phishing-detect/issues)
minecraft-hosts | Minecraft related tracker hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | occasionally | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
orca.pet | This is a domain list for blocking phishing and malware sites . |[link](https://orca.pet/notonmyshift/) | [raw](https://orca.pet/notonmyshift/hosts.txt) | frequent | ISC | [issues](https://github.com/socram8888/not-on-my-shift)
osint.digitalside.it | DigitalSide Threat-Intel malware domains list. |[link](https://github.com/davidonzo/Threat-Intel) | [raw](https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt) | daily | MIT | [issues](https://github.com/davidonzo/Threat-Intel/issues)
shady-hosts | Analytics, ad, and activity monitoring hosts |[link](https://github.com/shreyasminocha/shady-hosts) | [raw](https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts) | occasionally | CC0-1.0 | [issues](https://github.com/shreyasminocha/shady-hosts/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](mailto:hosts@someonewhocares.org)
Tiuxo hostlist - ads | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
Sinfonietta's snuff-site blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:contactme@abuse.ch)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
pornhosts -- a consolidated anti porn hosts file | This is an endeavour to find all porn domains and compile them into a single hosts to allow for easy blocking of porn on your local machine or on a network. |[link](https://github.com/Clefspeare13/pornhosts) | [raw](https://raw.githubusercontent.com/Clefspeare13/pornhosts/master/0.0.0.0/hosts) | occasional | MIT | [issues](https://github.com/Clefspeare13/pornhosts/issues)
Sinfonietta's porn blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/pornography-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Sinfonietta's snuff-site blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Tiuxo hostlist - pornography | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/porn) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
Sinfonietta's social media blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/social-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Tiuxo hostlist - social | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/social) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
## Extensions
The unified hosts file is optionally extensible. Extensions are used to include domains by category. Currently, we offer the following categories: `fakenews`, `social`, `gambling`, and `porn`.
@@ -100,7 +103,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -110,7 +134,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -121,10 +147,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -169,6 +191,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -179,6 +206,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -225,8 +275,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -238,7 +287,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -277,7 +325,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -324,13 +371,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -340,13 +394,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -425,11 +472,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -439,6 +488,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
+97350 -62832
View File
File diff suppressed because it is too large Load Diff
+108 -57
View File
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -21,11 +21,10 @@
This repository consolidates several reputable `hosts` files, and merges them
into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided.
* Last updated: **April 07 2020**.
* Here's the [raw hosts file with porn extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) containing 71,261 entries.
* Last updated: **July 04 2021**.
* Here's the [raw hosts file with porn extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) containing 107,898 entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -36,22 +35,22 @@ with GitHub download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non GitHub mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 54,456 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 55,398 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 56,777 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 71,261 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 57,207 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 57,719 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 72,203 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 58,149 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 73,582 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 59,528 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 74,011 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 74,524 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 60,470 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 74,953 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 76,332 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 77,274 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 81,747 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 83,942 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 84,204 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 107,898 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 84,562 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 86,399 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 110,093 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 86,757 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 110,355 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 87,019 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 110,712 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 112,550 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,214 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 112,907 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 113,169 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 115,364 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
@@ -65,28 +64,32 @@ included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
Steven Black's ad-hoc list | Additional sketch domains as I come across them. |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | occasionally | MIT | [issues](https://github.com/StevenBlack/hosts/issues)
Malware Domain List | Malware Domain List is a non-commercial community project. |[link](https://www.malwaredomainlist.com/) | [raw](https://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](https://www.malwaredomainlist.com/contact.php)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](hosts@someonewhocares.org)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](http://winhelp2002.mvps.org/) | [raw](http://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | frequently | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
AdguardTeam cname trackers | CNAME-cloaked tracking abuses. |[link](https://github.com/AdguardTeam/cname-trackers) | [raw](https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt) | occasionally | MIT | [issues](https://github.com/AdguardTeam/cname-trackers/issues)
Mitchell Krog's - Badd Boyz Hosts | Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | weekly | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:cosntacptamem@abuse.ch)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.com/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | occasionally | CC BY 3.0 | [issues](https://github.com/AdAway/AdAway/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
MetaMask eth-phishing-detect | Phishing domains targeting Ethereum users. |[link](https://github.com/MetaMask/eth-phishing-detect) | [raw](https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt) | frequent | DON'T BE A DICK PUBLIC LICENSE | [issues](https://github.com/MetaMask/eth-phishing-detect/issues)
minecraft-hosts | Minecraft related tracker hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | occasionally | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
orca.pet | This is a domain list for blocking phishing and malware sites . |[link](https://orca.pet/notonmyshift/) | [raw](https://orca.pet/notonmyshift/hosts.txt) | frequent | ISC | [issues](https://github.com/socram8888/not-on-my-shift)
osint.digitalside.it | DigitalSide Threat-Intel malware domains list. |[link](https://github.com/davidonzo/Threat-Intel) | [raw](https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt) | daily | MIT | [issues](https://github.com/davidonzo/Threat-Intel/issues)
shady-hosts | Analytics, ad, and activity monitoring hosts |[link](https://github.com/shreyasminocha/shady-hosts) | [raw](https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts) | occasionally | CC0-1.0 | [issues](https://github.com/shreyasminocha/shady-hosts/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](mailto:hosts@someonewhocares.org)
Tiuxo hostlist - ads | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
Sinfonietta's snuff-site blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:contactme@abuse.ch)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
pornhosts -- a consolidated anti porn hosts file | This is an endeavour to find all porn domains and compile them into a single hosts to allow for easy blocking of porn on your local machine or on a network. |[link](https://github.com/Clefspeare13/pornhosts) | [raw](https://raw.githubusercontent.com/Clefspeare13/pornhosts/master/0.0.0.0/hosts) | occasional | MIT | [issues](https://github.com/Clefspeare13/pornhosts/issues)
Sinfonietta's porn blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/pornography-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Sinfonietta's snuff-site blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Tiuxo hostlist - pornography | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/porn) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
## Extensions
The unified hosts file is optionally extensible. Extensions are used to include domains by category. Currently, we offer the following categories: `fakenews`, `social`, `gambling`, and `porn`.
@@ -98,7 +101,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -108,7 +132,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -119,10 +145,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -167,6 +189,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -177,6 +204,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -223,8 +273,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -236,7 +285,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -275,7 +323,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -322,13 +369,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -338,13 +392,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -423,11 +470,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -437,6 +486,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
+76006 -50781
View File
File diff suppressed because it is too large Load Diff
+107 -56
View File
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -21,11 +21,10 @@
This repository consolidates several reputable `hosts` files, and merges them
into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided.
* Last updated: **April 07 2020**.
* Here's the [raw hosts file with social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) containing 57,207 entries.
* Last updated: **July 04 2021**.
* Here's the [raw hosts file with social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) containing 84,562 entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -36,22 +35,22 @@ with GitHub download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non GitHub mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 54,456 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 55,398 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 56,777 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 71,261 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 57,207 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 57,719 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 72,203 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 58,149 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 73,582 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 59,528 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 74,011 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 74,524 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 60,470 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 74,953 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 76,332 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 77,274 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 81,747 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 83,942 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 84,204 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 107,898 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 84,562 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 86,399 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 110,093 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 86,757 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 110,355 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 87,019 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 110,712 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 112,550 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,214 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 112,907 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 113,169 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 115,364 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
@@ -65,26 +64,30 @@ included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
Steven Black's ad-hoc list | Additional sketch domains as I come across them. |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | occasionally | MIT | [issues](https://github.com/StevenBlack/hosts/issues)
Malware Domain List | Malware Domain List is a non-commercial community project. |[link](https://www.malwaredomainlist.com/) | [raw](https://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](https://www.malwaredomainlist.com/contact.php)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](hosts@someonewhocares.org)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](http://winhelp2002.mvps.org/) | [raw](http://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | frequently | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
AdguardTeam cname trackers | CNAME-cloaked tracking abuses. |[link](https://github.com/AdguardTeam/cname-trackers) | [raw](https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt) | occasionally | MIT | [issues](https://github.com/AdguardTeam/cname-trackers/issues)
Mitchell Krog's - Badd Boyz Hosts | Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | weekly | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:cosntacptamem@abuse.ch)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.com/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | occasionally | CC BY 3.0 | [issues](https://github.com/AdAway/AdAway/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
MetaMask eth-phishing-detect | Phishing domains targeting Ethereum users. |[link](https://github.com/MetaMask/eth-phishing-detect) | [raw](https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt) | frequent | DON'T BE A DICK PUBLIC LICENSE | [issues](https://github.com/MetaMask/eth-phishing-detect/issues)
minecraft-hosts | Minecraft related tracker hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | occasionally | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
orca.pet | This is a domain list for blocking phishing and malware sites . |[link](https://orca.pet/notonmyshift/) | [raw](https://orca.pet/notonmyshift/hosts.txt) | frequent | ISC | [issues](https://github.com/socram8888/not-on-my-shift)
osint.digitalside.it | DigitalSide Threat-Intel malware domains list. |[link](https://github.com/davidonzo/Threat-Intel) | [raw](https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt) | daily | MIT | [issues](https://github.com/davidonzo/Threat-Intel/issues)
shady-hosts | Analytics, ad, and activity monitoring hosts |[link](https://github.com/shreyasminocha/shady-hosts) | [raw](https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts) | occasionally | CC0-1.0 | [issues](https://github.com/shreyasminocha/shady-hosts/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](mailto:hosts@someonewhocares.org)
Tiuxo hostlist - ads | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:contactme@abuse.ch)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
Sinfonietta's social media blocking hosts file | A collection of category-specific host files. |[link](https://github.com/Sinfonietta/hostfiles) | [raw](https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/social-hosts) | occasional | MIT | [issues](https://github.com/Sinfonietta/hostfiles/issues)
Tiuxo hostlist - social | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/social) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
## Extensions
The unified hosts file is optionally extensible. Extensions are used to include domains by category. Currently, we offer the following categories: `fakenews`, `social`, `gambling`, and `porn`.
@@ -96,7 +99,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -106,7 +130,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -117,10 +143,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -165,6 +187,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -175,6 +202,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -221,8 +271,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -234,7 +283,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -273,7 +321,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -320,13 +367,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -336,13 +390,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -421,11 +468,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -435,6 +484,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
-28
View File
@@ -1,28 +0,0 @@
#!/bin/bash
set -e
if [ -d "$HOME/miniconda3" ] && [ -e "$HOME/miniconda3/bin/conda" ]; then
echo "Miniconda install already present in cache: $HOME/miniconda3"
rm -rf "$HOME"/miniconda3/envs/hosts # Just in case...
else
echo "Installing Miniconda..."
rm -rf "$HOME"/miniconda3 # Just in case...
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
fi
bash miniconda.sh -b -p "$HOME/miniconda3"
fi
echo "Configuring Miniconda..."
conda config --set ssl_verify false
conda config --set always_yes true --set changeps1 false
echo "Updating Miniconda"
conda update conda
conda update --all
conda info -a
-8
View File
@@ -1,8 +0,0 @@
#!/bin/bash
set -e
echo "Linting repository..."
source activate hosts
flake8 --max-line-length 120
-10
View File
@@ -1,10 +0,0 @@
#!/bin/bash
set -e
echo "Creating a Python $PYTHON_VERSION environment"
conda create -n hosts python="$PYTHON_VERSION"
source activate hosts
echo "Installing packages..."
conda install flake8 beautifulsoup4 lxml
-8
View File
@@ -1,8 +0,0 @@
#!/bin/bash
set -e
echo "Running unit tests..."
source activate hosts
python testUpdateHostsFile.py
File diff suppressed because it is too large Load Diff
+9
View File
@@ -0,0 +1,9 @@
{
"name": "AdguardTeam cname trackers",
"description": "CNAME-cloaked tracking abuses.",
"homeurl": "https://github.com/AdguardTeam/cname-trackers",
"frequency": "occasionally",
"issues": "https://github.com/AdguardTeam/cname-trackers/issues",
"url": "https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt",
"license": "MIT"
}
+658 -148
View File
File diff suppressed because it is too large Load Diff
+18728 -5561
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,9 +1,9 @@
{
"name": "KADhosts",
"description": "Fraud/adware/scam websites.",
"homeurl": "https://kadantiscam.netlify.com/",
"homeurl": "https://kadantiscam.netlify.app/",
"frequency": "frequently",
"issues": "https://github.com/PolishFiltersTeam/KADhosts/issues",
"url": "https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt",
"url": "https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt",
"license": "CC BY-SA 4.0"
}
+1071
View File
File diff suppressed because it is too large Load Diff
+9
View File
@@ -0,0 +1,9 @@
{
"name": "MetaMask eth-phishing-detect",
"description": "Phishing domains targeting Ethereum users.",
"homeurl": "https://github.com/MetaMask/eth-phishing-detect",
"frequency": "frequent",
"issues": "https://github.com/MetaMask/eth-phishing-detect/issues",
"url": "https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt",
"license": "DON'T BE A DICK PUBLIC LICENSE"
}
+916 -237
View File
File diff suppressed because it is too large Load Diff
+1604 -815
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -3,7 +3,7 @@
"description": "A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs.",
"homeurl": "https://urlhaus.abuse.ch/",
"frequency": "weekly",
"issues": "mailto:cosntacptamem@abuse.ch",
"issues": "mailto:contactme@abuse.ch",
"url": "https://urlhaus.abuse.ch/downloads/hostfile/",
"license": "CC0"
}
+2 -1
View File
@@ -4,5 +4,6 @@
"homeurl": "https://github.com/FadeMind/hosts.extras",
"frequency": "occasionally",
"issues": "https://github.com/FadeMind/hosts.extras/issues",
"url": "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts"
"url": "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts",
"license": "MIT"
}
+2710 -9372
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -2,8 +2,8 @@
"name": "AdAway",
"description": "AdAway is an open source ad blocker for Android using the hosts file.",
"homeurl": "https://adaway.org/",
"frequency": "occasionally",
"issues": "https://github.com/AdAway/AdAway/issues",
"frequency": "frequently",
"issues": "https://github.com/AdAway/adaway.github.io/issues",
"url": "https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt",
"license": "CC BY 3.0"
}
+1 -1
View File
@@ -5,5 +5,5 @@
"frequency": "occasionally",
"issues": "https://github.com/FadeMind/hosts.extras/issues",
"url": "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts",
"license": "GPLv3+"
"license": "MIT"
}
+1 -1
View File
@@ -5,5 +5,5 @@
"frequency": "occasionally",
"issues": "https://github.com/FadeMind/hosts.extras/issues",
"url": "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts",
"license": "GPLv3+"
"license": "MIT"
}
-22
View File
@@ -15,16 +15,13 @@
0.0.0.0 123go.com
0.0.0.0 188838.parkingcrew.net
0.0.0.0 1gavcom.popunder.ru
0.0.0.0 1.hidemyass.com
0.0.0.0 1xxx.cqcounter.com
0.0.0.0 21750.tctm.co
0.0.0.0 2607.cn
0.0.0.0 2.hidemyass.com
0.0.0.0 2.rubanners.com
0.0.0.0 302br.net
0.0.0.0 32e1dff65ea4eb3627ed-f1ecc94c86a56d3e42e512fcfd192886.r6.cf1.rackcdn.com
0.0.0.0 39dvd-999.com
0.0.0.0 3.hidemyass.com
0.0.0.0 404.xxxymovies.com
0.0.0.0 4133.88.primosearch.com
0.0.0.0 422653.parkingcrew.net
@@ -33,7 +30,6 @@
0.0.0.0 4.collecorvino.org
0.0.0.0 4.dlevo.com
0.0.0.0 4.e-why.net
0.0.0.0 4.hidemyass.com
0.0.0.0 4.whereinitaly.com
0.0.0.0 4.whereinlazio.com
0.0.0.0 4.whereinliguria.com
@@ -51,14 +47,11 @@
0.0.0.0 5490.spedads.primosearch.com
0.0.0.0 5.estasiatica.com
0.0.0.0 5.eventiduepuntozero.com
0.0.0.0 5.hidemyass.com
0.0.0.0 6266.570204.primosearch.com
0.0.0.0 633642.parkingcrew.net
0.0.0.0 6b8a953b2bf7788063d5-6e453f33ecbb90f11a62a5c376375af3.r71.cf5.rackcdn.com
0.0.0.0 6.hidemyass.com
0.0.0.0 6.mamaswishes.com
0.0.0.0 77search.com
0.0.0.0 7.hidemyass.com
0.0.0.0 7metasearch.com
0.0.0.0 7search.com
0.0.0.0 7softwaredreams.com
@@ -200,7 +193,6 @@
0.0.0.0 avis.cm
0.0.0.0 avrakougioumtzi.gr
0.0.0.0 avskype.com
0.0.0.0 ayada.zapto.org
0.0.0.0 ayehcleaners.com
0.0.0.0 a.zeroredirect1.com
0.0.0.0 a.zeroredirect2.com
@@ -320,7 +312,6 @@
0.0.0.0 cdn.adtrace.org
0.0.0.0 cdn.advancedmactools.com
0.0.0.0 cdn.ndparking.com
0.0.0.0 cdn.onesignal.com
0.0.0.0 cdn.opensubcontent.com
0.0.0.0 cecash.com
0.0.0.0 centerfind.com
@@ -695,7 +686,6 @@
0.0.0.0 hapjes-maken.eu
0.0.0.0 harmonyhollow.net
0.0.0.0 haso.pubmatic.com
0.0.0.0 havijrat.zapto.org
0.0.0.0 heaptickets.com
0.0.0.0 hefigo.com
0.0.0.0 helpint.mywebsearch.com
@@ -706,7 +696,6 @@
0.0.0.0 hertzsales.com
0.0.0.0 hgtzz.com
0.0.0.0 hidebux.com
0.0.0.0 hidemyass.com
0.0.0.0 hira.hopto.org
0.0.0.0 historykill.com
0.0.0.0 hitwastedgarden.com
@@ -915,7 +904,6 @@
0.0.0.0 meetyourmessenger.co.uk
0.0.0.0 meiluziai.info
0.0.0.0 merrymilkfoods.com
0.0.0.0 mesopotemia222.zapto.org
0.0.0.0 messagetag.com
0.0.0.0 meta.7search.com
0.0.0.0 m.friendlyduck.com
@@ -1055,7 +1043,6 @@
0.0.0.0 paypal-exchange.com
0.0.0.0 payperclickadvertising.org.uk
0.0.0.0 pay-per-search.com
0.0.0.0 payusatax.com
0.0.0.0 pcash.imlive.com
0.0.0.0 pcbutts1.ourtoolbar.com
0.0.0.0 pcbutts1.software.informer.com
@@ -1278,7 +1265,6 @@
0.0.0.0 setup.advancedcleaner.com
0.0.0.0 sevenstars7.com
0.0.0.0 shareaza.com
0.0.0.0 ships.zapto.org
0.0.0.0 shore-view.com
0.0.0.0 show.onenetworkdirect.net
0.0.0.0 sijmp.com
@@ -1389,7 +1375,6 @@
0.0.0.0 statsv3.gaycash.com
0.0.0.0 stepan007.popunder.ru
0.0.0.0 stephens-laughlin.com
0.0.0.0 stignita.zapto.org
0.0.0.0 stop-sign.com
0.0.0.0 stressx.org
0.0.0.0 stripteas.com
@@ -1503,7 +1488,6 @@
0.0.0.0 trvelocity.com
0.0.0.0 trx625.com
0.0.0.0 t.svtrd.com
0.0.0.0 tttbbbttt.zapto.org
0.0.0.0 ttt.fwq101.tk
0.0.0.0 tube8vidscjk.ddns.name
0.0.0.0 tube8vidscqs.ddns.name
@@ -1569,7 +1553,6 @@
0.0.0.0 upproar.com
0.0.0.0 uprour.com
0.0.0.0 uptodatecontent.net
0.0.0.0 urchman11.zapto.org
0.0.0.0 v0.extreme-dm.com
0.0.0.0 v1.extreme-dm.com
0.0.0.0 v2.urlads.net
@@ -2000,7 +1983,6 @@
0.0.0.0 www.hertzsales.com
0.0.0.0 www.hgtzz.com
0.0.0.0 www.hidebux.com
0.0.0.0 www.hidemyass.com
0.0.0.0 www.historykill.com
0.0.0.0 www.hlserve.com
0.0.0.0 www.hnskorea.co.kr
@@ -2153,7 +2135,6 @@
0.0.0.0 www.paypal-exchange.com
0.0.0.0 www.payperclickadvertising.org.uk
0.0.0.0 www.pay-per-search.com
0.0.0.0 www.payusatax.com
0.0.0.0 www.pccleaner.com
0.0.0.0 www.pccleanerpro.com
0.0.0.0 www.pc-detox.com
@@ -2309,7 +2290,6 @@
0.0.0.0 www.stop-sign.com
0.0.0.0 www.stripteas.com
0.0.0.0 www.sttvisa.com
0.0.0.0 www.sugarsync.com
0.0.0.0 www.sunidaytravel.co.uk
0.0.0.0 www.sunonsunday.com
0.0.0.0 www.super8service.de
@@ -2469,7 +2449,6 @@
0.0.0.0 www.youtuhe.com
0.0.0.0 www.yrals.com
0.0.0.0 www.ytdownloader.com
0.0.0.0 www.zapto.org
0.0.0.0 www.zarrmarketing.co.uk
0.0.0.0 www.zbest.in
0.0.0.0 www.zeroredirect2.com
@@ -2534,7 +2513,6 @@
0.0.0.0 z1.extreme-dm.com
0.0.0.0 za2.zeroredirect8.com
0.0.0.0 zampolit1990.popunder.ru
0.0.0.0 zapto.org
0.0.0.0 zarrmarketing.co.uk
0.0.0.0 za.zeroredirect1.com
0.0.0.0 zbest.in
+1 -1
View File
@@ -5,5 +5,5 @@
"frequency": "occasionally",
"issues": "https://github.com/FadeMind/hosts.extras/issues",
"url": "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts",
"license": "GPLv3+"
"license": "MIT"
}
+1 -1
View File
@@ -5,5 +5,5 @@
"frequency": "occasionally",
"issues": "https://github.com/FadeMind/hosts.extras/issues",
"url": "https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts",
"license": "GPLv3+"
"license": "MIT"
}
+909 -276
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-9
View File
@@ -1,9 +0,0 @@
{
"name": "Malware Domain List",
"description": "Malware Domain List is a non-commercial community project.",
"homeurl": "https://www.malwaredomainlist.com/",
"frequency": "weekly",
"issues": "https://www.malwaredomainlist.com/contact.php",
"url": "https://www.malwaredomainlist.com/hostslist/hosts.txt",
"license": "'can be used for free by anyone'"
}
+9
View File
@@ -0,0 +1,9 @@
# minecraft-hosts - Tracking Domains
# License: CC0
auxilium.ftb.team
bstats.org
mcmc.dev
mcstats.org
metrics.shmeeb.net
openeye.openmods.info
+9
View File
@@ -0,0 +1,9 @@
{
"name": "minecraft-hosts",
"description": "Minecraft related tracker hosts",
"homeurl": "https://github.com/jamiemansfield/minecraft-hosts",
"frequency": "occasionally",
"issues": "https://github.com/jamiemansfield/minecraft-hosts/issues",
"url": "https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt",
"license": "CC0-1.0"
}
+4 -1870
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,9 +1,9 @@
{
"name": "MVPS hosts file",
"description": "The purpose of this site is to provide the user with a high quality custom HOSTS file.",
"homeurl": "http://winhelp2002.mvps.org/",
"homeurl": "https://winhelp2002.mvps.org/",
"frequency": "monthly",
"issues": "mailto:winhelp2002@gmail.com",
"url": "http://winhelp2002.mvps.org/hosts.txt",
"url": "https://winhelp2002.mvps.org/hosts.txt",
"license": "CC BY-NC-SA 4.0"
}
+3449
View File
File diff suppressed because it is too large Load Diff
+9
View File
@@ -0,0 +1,9 @@
{
"name": "orca.pet",
"description": "This is a domain list for blocking phishing and malware sites .",
"homeurl": "https://orca.pet/notonmyshift/",
"frequency": "frequent",
"issues": "https://github.com/socram8888/not-on-my-shift",
"url": "https://orca.pet/notonmyshift/hosts.txt",
"license": "ISC"
}
+61
View File
@@ -0,0 +1,61 @@
#######################################################################
# The list contains uniques domains collected over #
# the last 7 days by OSINT.digitalside.it and shared in piHole format.#
# The list is released without any warranty to the end users. #
# INFO: info@digitalside.it #
# PGP key ID: 30B31BDA #
# PGP fingerprint: 0B4C F801 E8FF E9A3 A602 D2C7 9C36 93B2 30B3 1BDA #
# Every link reported should be considered harmefull and should #
# result in an unwanted malware download. Use this file carefully #
# Generated at: 2021-07-04 08:06:55 #
#######################################################################
0.0.0.0 apponline957.ir
0.0.0.0 belgross.github.io
0.0.0.0 biokeraline.com.br
0.0.0.0 byteweb.xyz
0.0.0.0 ch1.spacermodem.com
0.0.0.0 conver.work
0.0.0.0 devaryan.com
0.0.0.0 dgos.top
0.0.0.0 down.rxgif.cn
0.0.0.0 eer-trading.com
0.0.0.0 enderkitty.net
0.0.0.0 eshu.100xuexi.com
0.0.0.0 exaltmathiasministries.org
0.0.0.0 f0558049.xsph.ru
0.0.0.0 fackerty.info
0.0.0.0 g.kowashitekata.ru
0.0.0.0 grntexpresscourier.com
0.0.0.0 hgastation.com
0.0.0.0 hutyrtit.ydns.eu
0.0.0.0 itacsa.com.co
0.0.0.0 lizzzqua.ac.ug
0.0.0.0 lontorz.xyz
0.0.0.0 loplfu03.top
0.0.0.0 lopoga07.top
0.0.0.0 lopuio01.top
0.0.0.0 maizefucanism.hopto.org
0.0.0.0 marketingintelligence.tech
0.0.0.0 mason-restaurant.de
0.0.0.0 mentodobozforg.hu
0.0.0.0 nidoeastchina.org
0.0.0.0 ninja-chainsaw.nsmatrix3.com
0.0.0.0 okcupid.ydns.eu
0.0.0.0 perfectionscommunication.com
0.0.0.0 promotecksa.com
0.0.0.0 pulsartv.com.ua
0.0.0.0 raybals.com
0.0.0.0 sangariri.github.io
0.0.0.0 sconditebar.com
0.0.0.0 slimtrewer.casacam.net
0.0.0.0 ssei.shop
0.0.0.0 tejanomusicawards.com
0.0.0.0 thebestgourmetsauce.com
0.0.0.0 tools.liankenet.com
0.0.0.0 transfer.sh
0.0.0.0 vargasfarias.com.br
0.0.0.0 workedgames.com
0.0.0.0 www.adorableanimaladventures.co.uk
0.0.0.0 www.guardianemployment.com
0.0.0.0 www.oakcrays.com
0.0.0.0 www.zaidalomar.com
+9
View File
@@ -0,0 +1,9 @@
{
"name": "osint.digitalside.it",
"description": "DigitalSide Threat-Intel malware domains list.",
"homeurl": "https://github.com/davidonzo/Threat-Intel",
"frequency": "daily",
"issues": "https://github.com/davidonzo/Threat-Intel/issues",
"url": "https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt",
"license": "MIT"
}
+441
View File
@@ -0,0 +1,441 @@
0.0.0.0 a.et.nytimes.com
0.0.0.0 a.exdynsrv.com
0.0.0.0 a.omappapi.com
0.0.0.0 a.opmnstr.com
0.0.0.0 a.pub.network
0.0.0.0 abcnews.hb.omtrdc.net
0.0.0.0 abcnews.tt.omtrdc.net
0.0.0.0 acdn.adnxs.com
0.0.0.0 adbserver.doceree.com
0.0.0.0 adpushup.com
0.0.0.0 ads-api.twitter.com
0.0.0.0 ads.holid.io
0.0.0.0 amazonwebservices.d2.sc.omtrdc.net
0.0.0.0 analyti.uber.space
0.0.0.0 analytics.getsocialeyes.com
0.0.0.0 analytics.vadian.net
0.0.0.0 analytics.write.as
0.0.0.0 api-2-0.spot.im
0.0.0.0 api-js.mixpanel.com
0.0.0.0 api.airbrake.io
0.0.0.0 api.b2c.com
0.0.0.0 api.boxever.com
0.0.0.0 api.btloader.com
0.0.0.0 api2.branch.io
0.0.0.0 ascendeum-d.openx.net
0.0.0.0 backfills.ph.affinity.com
0.0.0.0 bid.glass
0.0.0.0 btloader.com
0.0.0.0 by2.uservoice.com
0.0.0.0 cdn-magiclinks.trackonomics.net
0.0.0.0 cdn.engine.spotscenered.info
0.0.0.0 cdn.insurads.com
0.0.0.0 cdn.intergient.com
0.0.0.0 cdn.izooto.com
0.0.0.0 cdn.playwire.com
0.0.0.0 cdn.snigelweb.com
0.0.0.0 cdn.usefathom.com
0.0.0.0 client.px-cloud.net
0.0.0.0 dotmetrics.net
0.0.0.0 ev.kck.st
0.0.0.0 ezodn.com
0.0.0.0 fast.appcues.com
0.0.0.0 gc.zgo.at
0.0.0.0 geo-eu.snigelweb.com
0.0.0.0 geo-us.snigelweb.com
0.0.0.0 go.ezodn.com
0.0.0.0 ip.prvtx.net
0.0.0.0 metrics.readme.io
0.0.0.0 piwik.opendesktop.org
0.0.0.0 pixel-static.spotify.com
0.0.0.0 pixel.ampry.com
0.0.0.0 pixel.spotify.com
0.0.0.0 plus.addkt.com
0.0.0.0 powerad.ai
0.0.0.0 prebid-server-production.herokuapp.com
0.0.0.0 privatestats.whatsapp.net
0.0.0.0 programmatic.doceree.com
0.0.0.0 protected-by.clarium.io
0.0.0.0 scripts.simpleanalyticscdn.com
0.0.0.0 scripttags.justuno.com
0.0.0.0 secure-sts-prod.imrworldwide.com
0.0.0.0 server.ethicalads.io
0.0.0.0 shynet.rmrm.io
0.0.0.0 smetrics.cnn.com
0.0.0.0 smetrics.elsevier.com
0.0.0.0 snigelweb-com.videoplayerhub.com
0.0.0.0 snigelweb.com
0.0.0.0 static.addtoany.com
0.0.0.0 static.cloudflareinsights.com
0.0.0.0 stats.framasoft.org
0.0.0.0 stats.kde.org
0.0.0.0 stats.libretexts.org
0.0.0.0 stats.nextcloud.com
0.0.0.0 t.stripe.com
0.0.0.0 tag.rmp.rakuten.com
0.0.0.0 trackjs.com
0.0.0.0 trapsaminohut.com
0.0.0.0 trk.justanswer.com
0.0.0.0 trk.justanswer.com
0.0.0.0 u.o0bc.com
0.0.0.0 uk-script.dotmetrics.net
0.0.0.0 uk-script.dotmetrics.net
0.0.0.0 us-east-1.prod.pw.analytics.console.aws.a2z.com
0.0.0.0 userreport.com
0.0.0.0 vitals.vercel-insights.com
0.0.0.0 vms.boldchat.com
0.0.0.0 vt.myvisualiq.net
0.0.0.0 web.vortex.data.microsoft.com
0.0.0.0 web.vortex.data.msn.com
0.0.0.0 www.datadoghq-browser-agent.com
0.0.0.0 www.fastly-insights.com
0.0.0.0 www.increaserev.com
0.0.0.0 www.medtargetsystem.com
0.0.0.0 www.npttech.com
0.0.0.0 www.stack-sonar.com
#
# From https://github.com/prebid/Prebid.js
#
0.0.0.0 bidder.7xbid.com
0.0.0.0 bidder.ablida.net
0.0.0.0 mp.4dex.io
0.0.0.0 stat.adfinity.pro
0.0.0.0 api-test.scaleout.jp
0.0.0.0 try.engine.adglare.net
0.0.0.0 api.publishers.adlive.io
0.0.0.0 pub.admanmedia.com
0.0.0.0 ads4.admatic.com.tr
0.0.0.0 prebid.admedia.com
0.0.0.0 delivery.adnuntius.com
0.0.0.0 rtb.adpone.com
0.0.0.0 eu-ads.adpone.com
0.0.0.0 delta.adprime.com
0.0.0.0 ssp.adrelevantis.com
0.0.0.0 rtb.com.ru
0.0.0.0 ghb.console.adtarget.com.tr
0.0.0.0 ghb.adtelligent.com
0.0.0.0 ghb.ads.152media.com
0.0.0.0 ghb.hbmp.mediafuse.com
0.0.0.0 nep.advangelists.com
0.0.0.0 ssp.advenuemedia.co.uk
0.0.0.0 api.advertly.com
0.0.0.0 analytics.wmgroup.us
0.0.0.0 rtb.adwmg.com
0.0.0.0 hbarxs.adxcg.net
0.0.0.0 hbps.adxcg.net
0.0.0.0 adxpremium.services
0.0.0.0 hb-api.omnitagjs.com
0.0.0.0 hb-api-fra01.omnitagjs.com
0.0.0.0 ad.as.amanad.adtdp.com
0.0.0.0 prebid.a-mo.net
0.0.0.0 1x1.a-mo.net
0.0.0.0 useast.quantumdex.io
0.0.0.0 sync.quantumdex.io
0.0.0.0 ad-jp.apx.appier.net
0.0.0.0 mock-bapi.userreport.com
0.0.0.0 bapi.userreport.com
0.0.0.0 ssp.astraone.io
0.0.0.0 d.audiencerun.com
0.0.0.0 rtb2.automatad.com
0.0.0.0 ads.avct.cloud
0.0.0.0 bid.glass
0.0.0.0 service.bidlab.ai
0.0.0.0 exchange.bidphysics.com
0.0.0.0 us-e-node1.bizzclick.com
0.0.0.0 dev.pbs.bluebillywig.com
0.0.0.0 pbs.bluebillywig.com
0.0.0.0 ssp.videowalldirect.com
0.0.0.0 cs.videowalldirect.com
0.0.0.0 prebid.scupio.com
0.0.0.0 brightcombid.marphezis.com
0.0.0.0 console.brightmountainmedia.com
0.0.0.0 px.britepool.com
0.0.0.0 prebid.bksn.se
0.0.0.0 exchange.buzzoola.com
0.0.0.0 tube.buzzoola.com
0.0.0.0 prebid.byplay.net
0.0.0.0 h.cedatoplayer.com
0.0.0.0 bidder.cleanmediaads.com
0.0.0.0 ad.holmesmind.com
0.0.0.0 appspb.cointraffic.io
0.0.0.0 request.czilladx.com
0.0.0.0 publishers.motionspots.com
0.0.0.0 colossusssp.com
0.0.0.0 tech.convergd.com
0.0.0.0 bid.cosmoshq.com
0.0.0.0 sync.cosmoshq.com
0.0.0.0 dev.server.cpmstar.com
0.0.0.0 staging.server.cpmstar.com
0.0.0.0 gacraft.jp
0.0.0.0 pbs.dailyhunt.in
0.0.0.0 qa-pbs-van.dailyhunt.in
0.0.0.0 prebid.datablocks.net
0.0.0.0 supply.decenterads.com
0.0.0.0 dmx.districtm.io
0.0.0.0 cdn.districtm.io
0.0.0.0 ad.divreach.com
0.0.0.0 demo.reviveadservermod.com
0.0.0.0 buyer.dspx.tv
0.0.0.0 dcbuyer.dspx.tv
0.0.0.0 service.e-volution.ai
0.0.0.0 dsp.bnmla.com
0.0.0.0 deep.edgequery.io
0.0.0.0 prebid.emoteev.io
0.0.0.0 prebid-staging.emoteev.io
0.0.0.0 ad.nvivo.tv
0.0.0.0 i.e-planning.net
0.0.0.0 sk.search.etargetnet.com
0.0.0.0 cz.search.etargetnet.com
0.0.0.0 hu.search.etargetnet.com
0.0.0.0 ro.search.etargetnet.com
0.0.0.0 rs.search.etargetnet.com
0.0.0.0 bg.search.etargetnet.com
0.0.0.0 pl.search.etargetnet.com
0.0.0.0 hr.search.etargetnet.com
0.0.0.0 at.search.etargetnet.com
0.0.0.0 co.search.etargetnet.com
0.0.0.0 de.search.etargetnet.com
0.0.0.0 en.search.etargetnet.com
0.0.0.0 fid.agkn.com
0.0.0.0 api.feedad.com
0.0.0.0 content.mql5.com
0.0.0.0 hb.adingo.jp
0.0.0.0 rtb.gamoshi.io
0.0.0.0 s.gamoshi.io
0.0.0.0 wrappers.geoedge.be
0.0.0.0 central.gjirafa.com
0.0.0.0 api.glimpseprotocol.io
0.0.0.0 grid.bidswitch.net
0.0.0.0 bidder.h12-media.com
0.0.0.0 seg.halo.ad.gt
0.0.0.0 balancer.haxmedia.io
0.0.0.0 banner.hpmdnetwork.ru
0.0.0.0 hbe198.hybrid.ai
0.0.0.0 ice.360yield.com
0.0.0.0 px.owneriq.net
0.0.0.0 bid.videostep.com
0.0.0.0 k.r66net.com
0.0.0.0 api.pymx5.com
0.0.0.0 hb.yellowblue.io
0.0.0.0 htlb.casalemedia.com
0.0.0.0 hbtra.jixie.io
0.0.0.0 scripts.jixie.io
0.0.0.0 hb.jixie.io
0.0.0.0 s.komoona.com
0.0.0.0 tracker.konduit.me
0.0.0.0 p.konduit.me
0.0.0.0 ads4.krushmedia.com
0.0.0.0 cs.krushmedia.com
0.0.0.0 kssp.kbntx.ch
0.0.0.0 kdmp.kbntx.ch
0.0.0.0 ads.lemmatechnologies.com
0.0.0.0 sync.lemmatechnologies.com
0.0.0.0 lwadm.com
0.0.0.0 pb.ladsp.com
0.0.0.0 id.crwdcntrl.net
0.0.0.0 nep.advangelists.com
0.0.0.0 player-cdn.beachfrontmedia.com
0.0.0.0 balancer.lmgssp.com
0.0.0.0 rtb.adxpremium.services
0.0.0.0 analytics.adxpremium.services
0.0.0.0 central.mall.tv
0.0.0.0 prebid_stats.mars.media
0.0.0.0 hb.go2speed.media
0.0.0.0 ping-hqx-1.go2speed.media
0.0.0.0 rtb-filter.meazy.co
0.0.0.0 sync.meazy.co
0.0.0.0 rtb-us.mediago.io
0.0.0.0 pb-logs.media.net
0.0.0.0 pbs-front.mediasquare.fr
0.0.0.0 bidder-test.mediasquare.fr
0.0.0.0 mid.rkdms.com
0.0.0.0 rtbtest.send.microad.jp
0.0.0.0 bes.mobfox.com
0.0.0.0 prebid.mobsmart.net
0.0.0.0 tags.mobsmart.net
0.0.0.0 nafdigitalbidder.com
0.0.0.0 ad.audiencemanager.de
0.0.0.0 adn.admixer.co.kr
0.0.0.0 brainlyads.com
0.0.0.0 qa-ads.nobid.com
0.0.0.0 onetag-sys.com
# www.qatarairways.com
0.0.0.0 smetrics.qatarairways.com
0.0.0.0 qatarairways.tt.omtrdc.net
0.0.0.0 api.boxever.com
# openstax.org
0.0.0.0 js.pulseinsights.com
# www.osano.com
0.0.0.0 snap.licdn.com
# www.quizexpo.com
0.0.0.0 demand.supply
0.0.0.0 live.demand.supply
# america.aljazeera.com
0.0.0.0 cdn.gigya.com
# www.cplusplus.com
0.0.0.0 cloud.setupad.com
0.0.0.0 node.setupad.com
0.0.0.0 prebid-stag.setupad.net
# www.jstor.org
0.0.0.0 ja.jstor.org
# brilliant.org
0.0.0.0 in.brilliant.org
# artixlinux.org
0.0.0.0 stats.artixlinux.org
# ywc.thehindu.com
0.0.0.0 csm.cxpublic.com
0.0.0.0 tai.thehindu.com
0.0.0.0 dm.thehindu.com
0.0.0.0 go.automatad.com
0.0.0.0 b2cdn.automatad.com
0.0.0.0 cdn.automatad.com
# www.gourmetads.com
0.0.0.0 bcdn.grmtas.com
# www.msn.com
0.0.0.0 mssl.fwmrm.net
0.0.0.0 visitor.omnitagjs.com
# www.digitalmarketer.com
0.0.0.0 snippet.upviral.com
0.0.0.0 app.upviral.com
# go.pendo.io
0.0.0.0 js.driftt.com
0.0.0.0 api.drift.com
0.0.0.0 account.api.drift.com
0.0.0.0 pages.api.driftqa.com
0.0.0.0 conversation2.api.driftqa.com
0.0.0.0 customer2.api.driftqa.com
0.0.0.0 file2.api.driftqa.com
0.0.0.0 ws.api.driftqa.com
0.0.0.0 drift.click
# jsfiddle.net
0.0.0.0 crbcdn.jsfiddle.net
0.0.0.0 crbsrv.jsfiddle.net
# htwins.net
0.0.0.0 queue.simpleanalyticscdn.com
# linkedin.github.io
0.0.0.0 tracking.eskratch.com
# gizmodo.com
0.0.0.0 sourcepoint.gizmodo.com
# awesomewm.org
0.0.0.0 piwik.awesomewm.org
# www.aljazeera.com
0.0.0.0 tags.aljazeera.com
0.0.0.0 cdn.omnivirt.com
# 65521.org
0.0.0.0 stats.0www.org
# dotcs.me
0.0.0.0 analytics.home.dotcs.me
# speedtest.net.uk
0.0.0.0 stats.custserv.net
# www.openstreetmap.org
0.0.0.0 piwik.openstreetmap.org
# www.babbel.com
0.0.0.0 marketing-tracker.babbel.com
# www.aparnaconstructions.com
0.0.0.0 hspx.hotstar.com
# prepaid.t-mobile.com
0.0.0.0 lptag.liveperson.net
# www.redbubble.com
0.0.0.0 analytics-cdn.redbubble.com
# geeknet.me
0.0.0.0 stats.harbauer.org
# amiunique.org
0.0.0.0 analytics.amiunique.org
# blockchair.com
0.0.0.0 stats.blockchair.com
# greenhost.net
0.0.0.0 livestats.greenhost.nl
# maproulette.org
0.0.0.0 analytics.maproulette.org
# alexei.pesic.dev
0.0.0.0 cdn.panelbear.com
# thisstartupdoesnotexist.com
0.0.0.0 reports.teamemo-solutions.de
# unsplash.com
0.0.0.0 collector.unsplash.com
# musescore.com
0.0.0.0 track.musescore.com
# ecmelberk.com
0.0.0.0 ads.ebc.li
# kevq.uk
0.0.0.0 stats.kevq.uk
# linuxjournal.com
0.0.0.0 analytics.linuxjournal.com
# www.fsf.org
0.0.0.0 piwik.fsf.org
# www.notion.so
0.0.0.0 analytics.pgncs.notion.so
# netsyms.com
0.0.0.0 analytics.netsyms.net
# remix.ethereum.org
0.0.0.0 matomo.ethereum.org
# bazaarvoice.com
0.0.0.0 analytics-static.ugc.bazaarvoice.com
0.0.0.0 bv-analytics-js-prod.s3.amazonaws.com
0.0.0.0 bv-analytics-js-qa.s3.amazonaws.com
# deepl.com
0.0.0.0 s.deepl.com
# dot.gov.in
0.0.0.0 analytics.wrc.nic.in
# qz.com
0.0.0.0 player.mediafuse.com
0.0.0.0 hb.mediafuse.com
# www.dqindia.com
0.0.0.0 qt.cyberads.io
# duckduckgo.com
0.0.0.0 improving.duckduckgo.com
# killedbygoogle.com
0.0.0.0 analytics.bale.media
+9
View File
@@ -0,0 +1,9 @@
{
"name": "shady-hosts",
"description": "Analytics, ad, and activity monitoring hosts",
"homeurl": "https://github.com/shreyasminocha/shady-hosts",
"frequency": "occasionally",
"issues": "https://github.com/shreyasminocha/shady-hosts/issues",
"url": "https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts",
"license": "CC0-1.0"
}
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -3,7 +3,7 @@
"description": "How to make the internet not suck (as much).",
"homeurl": "https://someonewhocares.org/hosts/",
"frequency": "frequently",
"issues": "hosts@someonewhocares.org",
"issues": "mailto:hosts@someonewhocares.org",
"url": "https://someonewhocares.org/hosts/zero/hosts",
"license": "non-commercial with attribution"
}
+18 -486
View File
File diff suppressed because it is too large Load Diff
+555 -207
View File
File diff suppressed because it is too large Load Diff
+49
View File
@@ -0,0 +1,49 @@
@ECHO OFF
:: Check if we are administrator. If not, exit immediately.
:: BatchGotAdmin
:-------------------------------------
REM --> Check for permissions
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
)
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params= %*
echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B
:gotAdmin
pushd "%CD%"
CD /D "%~dp0"
goto SCset
:SCset
:: https://superuser.com/a/1217703
:: https://stackoverflow.com/a/133926
::sc config Dnscache start= disabled
::sc stop Dnscache
:: VALUE
:: 2 (Automatic) (DEFAULT)
:: 4 (Disabled) (prevent freeze network after applying huge hosts file)
::
:: Latest changes in security Windows 10 denied access to changing services via other tools except registry hack
::
:: See https://superuser.com/a/1277960
::
REG add "HKLM\SYSTEM\CurrentControlSet\services\Dnscache" /v Start /t REG_DWORD /d 4 /f
echo "Reboot your system now!"
echo .
@PAUSE
File diff suppressed because it is too large Load Diff
+2046 -1917
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+2
View File
@@ -7,6 +7,7 @@
127.0.0.1 deathaddict.com
127.0.0.1 deathandreality.com
127.0.0.1 gorebrasil.com
127.0.0.1 goreforum.com
127.0.0.1 goregrish.com
127.0.0.1 leakreality.com
127.0.0.1 theync.com
@@ -17,3 +18,4 @@
127.0.0.1 kaotic.com
127.0.0.1 ogrish.tv
127.0.0.1 thepinsta.com
127.0.0.1 vidmax.com
File diff suppressed because it is too large Load Diff
+40
View File
@@ -1,8 +1,18 @@
0.0.0.0 002.pinknotora.net
0.0.0.0 85tube.com
0.0.0.0 ac-pink.net
0.0.0.0 actionjav.com
0.0.0.0 adult-gazou.me
0.0.0.0 ancensored.com
0.0.0.0 antenna.i-like-movie.net
0.0.0.0 asexon.com
0.0.0.0 asiamoviepass.com
0.0.0.0 asianscandal.net
0.0.0.0 asianstreetmeat.com
0.0.0.0 av-photograph.com
0.0.0.0 avcrempie.com
0.0.0.0 avli.me
0.0.0.0 avwend.com
0.0.0.0 azzporn.com
0.0.0.0 babarooba.x.fc2.com
0.0.0.0 bakufu.jp
@@ -42,6 +52,7 @@
0.0.0.0 gfporntube.com
0.0.0.0 hairytubeporno.com
0.0.0.0 hakusuiriki.tv
0.0.0.0 hentaihand.com
0.0.0.0 hentaipornpics.net
0.0.0.0 hipup.net
0.0.0.0 hitozumagazo.com
@@ -53,6 +64,28 @@
0.0.0.0 idolzone.blog137.fc2.com
0.0.0.0 inaka.x.fc2.com
0.0.0.0 jams.kir.jp
0.0.0.0 japanesefuckers.com
0.0.0.0 jav.land
0.0.0.0 javbulk.com
0.0.0.0 javbuz.com
0.0.0.0 javengsub.com
0.0.0.0 javfinder.la
0.0.0.0 javfree.biz
0.0.0.0 javhay.net
0.0.0.0 javhdmovies.com
0.0.0.0 javhihi.me
0.0.0.0 javhub.me
0.0.0.0 javladies.com
0.0.0.0 javmodel.com
0.0.0.0 javpedia.org
0.0.0.0 javpool.com
0.0.0.0 javrave.club
0.0.0.0 javsun.net
0.0.0.0 javupdatedaily.blogspot.com
0.0.0.0 javwide.tv
0.0.0.0 javx.cc
0.0.0.0 javxspot.com
0.0.0.0 javxxxvideos.com
0.0.0.0 javynow.com
0.0.0.0 jitsuroku.kir.jp
0.0.0.0 jkdaisuki.ad55.net
@@ -60,6 +93,7 @@
0.0.0.0 live.fc2.com
0.0.0.0 lolip.org
0.0.0.0 magopro2.ero-spo.com
0.0.0.0 manhwa18.com
0.0.0.0 mankist.com
0.0.0.0 marrion-av.com
0.0.0.0 megaporn.blogspot.es
@@ -69,6 +103,7 @@
0.0.0.0 mutekiya.net
0.0.0.0 mvideoporno.xxx
0.0.0.0 nadeshiko.tv
0.0.0.0 nekopoi.care
0.0.0.0 newero1.blog.fc2.com
0.0.0.0 news.tokimeki-s.com
0.0.0.0 niccori.jp
@@ -98,14 +133,18 @@
0.0.0.0 sportseye.muvc.net
0.0.0.0 ssl.ktfactory.co.jp
0.0.0.0 star-porn.ml
0.0.0.0 summertimesaga.com
0.0.0.0 suppinpin.com
0.0.0.0 surebbs.ranks1.apserver.net
0.0.0.0 svjav.com
0.0.0.0 switch1.jp
0.0.0.0 teatroporno.com
0.0.0.0 teppan-av.com
0.0.0.0 top.togeko.net
0.0.0.0 toujyuku.ranks1.apserver.net
0.0.0.0 tousatu-douga-youpeeber.com
0.0.0.0 ukrafoto.com
0.0.0.0 unjav.com
0.0.0.0 venus-av.com
0.0.0.0 veporns.com
0.0.0.0 vipcle2.com
@@ -281,6 +320,7 @@
0.0.0.0 www.sexia.tv
0.0.0.0 www.sexopowiadania.pl
0.0.0.0 www.shanimuni.net
0.0.0.0 www.sharesome.com
0.0.0.0 www.shinoda-av.com
0.0.0.0 www.shitagi.org
0.0.0.0 www.shuttle-japan.com
+81 -35
View File
@@ -1,5 +1,5 @@
# Title: Social media hosts
# Updated: June 20, 2019
# Updated: June 27, 2021
# Google Plus
#127.0.0.1 plus.l.google.com
@@ -1732,14 +1732,27 @@
127.0.0.1 zh-tw.facebook.com
# Instagram
127.0.0.1 a.ns.cdninstagram.com
127.0.0.1 api.instagram.com
127.0.0.1 b.ns.cdninstagram.com
127.0.0.1 badges.instagram.com
127.0.0.1 black.ish.instagram.com
127.0.0.1 business.instagram.com
127.0.0.1 c.ns.cdninstagram.com
127.0.0.1 cdninstagram.com
127.0.0.1 creative.cdninstagram.com
127.0.0.1 d.ns.cdninstagram.com
127.0.0.1 dragon.cdninstagram.com
127.0.0.1 engineering.instagram.com
127.0.0.1 external-prg1-1.cdninstagram.com
127.0.0.1 external-vie1-1.cdninstagram.com
127.0.0.1 external-waw1-1.cdninstagram.com
127.0.0.1 external.cdninstagram.com
127.0.0.1 fundingchoicesmessages.google.com
127.0.0.1 help.instagram.com
127.0.0.1 i.instagram.com
127.0.0.1 images.instagram.com
127.0.0.1 instagr.am
127.0.0.1 instagram-shv-01-ams2.fbcdn.net
127.0.0.1 instagram-shv-01-ams3.fbcdn.net
127.0.0.1 instagram-shv-01-ash5.fbcdn.net
@@ -1795,40 +1808,9 @@
127.0.0.1 instagramstatic-a.akamaihd.net.edgesuite.net
127.0.0.1 l.instagram.com
127.0.0.1 logger.instagram.com
127.0.0.1 platform.instagram.com
127.0.0.1 scontent-a.cdninstagram.com
127.0.0.1 scontent-ams3-1.cdninstagram.com
127.0.0.1 scontent-amt2-1.cdninstagram.com
127.0.0.1 scontent-arn2-1.cdninstagram.com
127.0.0.1 scontent-atl3-1.cdninstagram.com
127.0.0.1 scontent-b.cdninstagram.com
127.0.0.1 scontent-dft4-1.cdninstagram.com
127.0.0.1 scontent-dft4-2.cdninstagram.com
127.0.0.1 scontent-fra3-1.cdninstagram.com
127.0.0.1 scontent-frt3-1.cdninstagram.com
127.0.0.1 scontent-frx5-1.cdninstagram.com
127.0.0.1 scontent-iad3-1.cdninstagram.com
127.0.0.1 scontent-kul1-1.cdninstagram.com
127.0.0.1 scontent-mia1-1.cdninstagram.com
127.0.0.1 scontent-ort2-1.cdninstagram.com
127.0.0.1 scontent-ort2-2.cdninstagram.com
127.0.0.1 scontent-sea1-1.cdninstagram.com
127.0.0.1 scontent-sit4-1.cdninstagram.com
127.0.0.1 scontent-sjc2-1.cdninstagram.com
127.0.0.1 scontent-syd2-1.cdninstagram.com
127.0.0.1 scontent.cdninstagram.com
127.0.0.1 telegraph-ash.instagram.com
127.0.0.1 white.ish.instagram.com
127.0.0.1 www.instagram.com
127.0.0.1 a.ns.cdninstagram.com
127.0.0.1 b.ns.cdninstagram.com
127.0.0.1 c.ns.cdninstagram.com
127.0.0.1 creative.cdninstagram.com
127.0.0.1 d.ns.cdninstagram.com
127.0.0.1 dragon.cdninstagram.com
127.0.0.1 external.cdninstagram.com
127.0.0.1 openvpn.cdninstagram.com
127.0.0.1 platform.cdninstagram.com
127.0.0.1 platform.instagram.com
127.0.0.1 scontent-a-ams.cdninstagram.com
127.0.0.1 scontent-a-amt.cdninstagram.com
127.0.0.1 scontent-a-arn.cdninstagram.com
@@ -1904,7 +1886,6 @@
127.0.0.1 scontent-b-otp.cdninstagram.com
127.0.0.1 scontent-b-pao.cdninstagram.com
127.0.0.1 scontent-b-scl.cdninstagram.com
127.0.0.1 scontent-b-scl.cdninstagram.com
127.0.0.1 scontent-b-sea.cdninstagram.com
127.0.0.1 scontent-b-sin.cdninstagram.com
127.0.0.1 scontent-b-sjc.cdninstagram.com
@@ -2041,11 +2022,18 @@
127.0.0.1 scontent-zrh1-1.cdninstagram.com
127.0.0.1 scontent.cdninstagram.com
127.0.0.1 static.cdninstagram.com
127.0.0.1 telegraph-ash.instagram.com
127.0.0.1 video-nrt1-1.cdninstagram.com
127.0.0.1 video-ort2-1.cdninstagram.com
127.0.0.1 video-ort2-2.cdninstagram.com
127.0.0.1 video-prg1-1.cdninstagram.com
127.0.0.1 video-vie1-1.cdninstagram.com
127.0.0.1 video-waw1-1.cdninstagram.com
127.0.0.1 video.cdninstagram.com
127.0.0.1 white.ish.instagram.com
127.0.0.1 www.cdninstagram.com
127.0.0.1 www.instagr.am
127.0.0.1 www.instagram.com
127.0.0.1 z-p15-scontent-bru2-1.cdninstagram.com
127.0.0.1 z-p15-scontent-cdg2-1.cdninstagram.com
127.0.0.1 z-p15-scontent-cdt1-1.cdninstagram.com
@@ -2125,7 +2113,6 @@
127.0.0.1 z-p42-scontent.cdninstagram.com
127.0.0.1 z-p42-static.cdninstagram.com
# Whatsapp
127.0.0.1 account.whatsapp.com
127.0.0.1 alpha.whatsapp.com
@@ -2810,3 +2797,62 @@
127.0.0.1 pinpages.alwaysdata.net
127.0.0.1 allotalk.com
# Tik-Toc
127.0.0.1 abtest-va-tiktok.byteoversea.com
127.0.0.1 dm-maliva16.byteoversea.com
127.0.0.1 dm.bytedance.com
127.0.0.1 ibytedtos.com
127.0.0.1 mon-va.byteoversea.com
127.0.0.1 mon.byteoversea.com
127.0.0.1 muscdn.com
127.0.0.1 musical.ly
127.0.0.1 musically.ly
127.0.0.1 p16-tiktokcdn-com.akamaized.net
127.0.0.1 p16.hypstarcdn.com
127.0.0.1 s16.tiktokcdn.com
127.0.0.1 sf-tb-sg.ibytedtos.com
127.0.0.1 sgali3.l.byteoversea.net
127.0.0.1 tiktok.com
127.0.0.1 tiktok.org
127.0.0.1 tiktokcdn-com.akamaized.net
127.0.0.1 tiktokcdn.com
127.0.0.1 tiktokv.com
127.0.0.1 v16-tiktokcdn-com.akamaized.net
127.0.0.1 verification-va.byteoversea.com
127.0.0.1 www.tiktok.com
127.0.0.1 xlog-va.byteoversea.com
# DateMeme
127.0.0.1 datememe.com
127.0.0.1 www.datememe.com
127.0.0.1 admin.datememe.com
127.0.0.1 blog.datememe.com
127.0.0.1 bn.datememe.com
127.0.0.1 c1.datememe.com
127.0.0.1 c2.datememe.com
127.0.0.1 c3.datememe.com
127.0.0.1 de.datememe.com
127.0.0.1 en.datememe.com
127.0.0.1 es.datememe.com
127.0.0.1 fr.datememe.com
127.0.0.1 hi.datememe.com
127.0.0.1 id.datememe.com
127.0.0.1 ja.datememe.com
127.0.0.1 jv.datememe.com
127.0.0.1 ko.datememe.com
127.0.0.1 pt.datememe.com
127.0.0.1 ru.datememe.com
127.0.0.1 th.datememe.com
127.0.0.1 vi.datememe.com
127.0.0.1 zh-cn.datememe.com
# clubhouse
127.0.0.1 joinclubhouse.com
127.0.0.1 www.joinclubhouse.com
127.0.0.1 welcome.joinclubhouse.com
127.0.0.1 community.joinclubhouse.com
127.0.0.1 staging.joinclubhouse.com
127.0.0.1 admin-staging.joinclubhouse.com
127.0.0.1 ios.joinclubhouse.com
127.0.0.1 testflight.joinclubhouse.com
+75903 -50747
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright © 2020 Steven Black
Copyright © 2021 Steven Black
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "hosts",
"version": "2.5.74",
"version": "3.7.13",
"description": "Extending and consolidating hosts files from several well-curated sources like adaway.org, mvps.org, malwaredomainlist.com, someonewhocares.org, and potentially others. You can optionally invoke extensions to block additional sites by category.",
"main": "",
"private": true,
@@ -35,6 +35,6 @@
},
"homepage": "https://github.com/StevenBlack/hosts#readme",
"devDependencies": {
"release-it": "^12.6.3"
"release-it": "^14.2.2"
}
}
+107 -56
View File
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -21,11 +21,10 @@
This repository consolidates several reputable `hosts` files, and merges them
into a unified hosts file with duplicates removed. A variety of tailored hosts files are provided.
* Last updated: **April 07 2020**.
* Here's the [raw hosts file with base extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) containing 54,456 entries.
* Last updated: **July 04 2021**.
* Here's the [raw hosts file with base extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) containing 81,747 entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -36,22 +35,22 @@ with GitHub download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non GitHub mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 54,456 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 55,398 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 56,777 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 71,261 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 57,207 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 57,719 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 72,203 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 58,149 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 73,582 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 59,528 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 74,011 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 74,524 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 60,470 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 74,953 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 76,332 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 77,274 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 81,747 | [link](http://sbc.io/hosts/hosts)
Unified hosts **+ fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) | 83,942 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
Unified hosts **+ gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) | 84,204 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
Unified hosts **+ porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) | 107,898 | [link](http://sbc.io/hosts/alternates/porn/hosts)
Unified hosts **+ social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) | 84,562 | [link](http://sbc.io/hosts/alternates/social/hosts)
Unified hosts **+ fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) | 86,399 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
Unified hosts **+ fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) | 110,093 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
Unified hosts **+ fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) | 86,757 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
Unified hosts **+ gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) | 110,355 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
Unified hosts **+ gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) | 87,019 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
Unified hosts **+ porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) | 110,712 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) | 112,550 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
Unified hosts **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,214 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
Unified hosts **+ fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) | 112,907 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
Unified hosts **+ gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) | 113,169 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
Unified hosts **+ fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts) | 115,364 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
@@ -65,22 +64,26 @@ included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
Steven Black's ad-hoc list | Additional sketch domains as I come across them. |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | occasionally | MIT | [issues](https://github.com/StevenBlack/hosts/issues)
Malware Domain List | Malware Domain List is a non-commercial community project. |[link](https://www.malwaredomainlist.com/) | [raw](https://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](https://www.malwaredomainlist.com/contact.php)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](hosts@someonewhocares.org)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](http://winhelp2002.mvps.org/) | [raw](http://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | frequently | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Dead | Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.Spam | Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
AdguardTeam cname trackers | CNAME-cloaked tracking abuses. |[link](https://github.com/AdguardTeam/cname-trackers) | [raw](https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt) | occasionally | MIT | [issues](https://github.com/AdguardTeam/cname-trackers/issues)
Mitchell Krog's - Badd Boyz Hosts | Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | weekly | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:cosntacptamem@abuse.ch)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | | [issues](https://github.com/FadeMind/hosts.extras/issues)
add.2o7Net | 2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.com/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts_without_controversies.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
AdAway | AdAway is an open source ad blocker for Android using the hosts file. |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | occasionally | CC BY 3.0 | [issues](https://github.com/AdAway/AdAway/issues)
add.Risk | Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | occasionally | GPLv3+ | [issues](https://github.com/FadeMind/hosts.extras/issues)
hostsVN | Hosts block ads of Vietnamese |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | occasionally | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)
KADhosts | Fraud/adware/scam websites. |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt) | frequently | CC BY-SA 4.0 | [issues](https://github.com/PolishFiltersTeam/KADhosts/issues)
MetaMask eth-phishing-detect | Phishing domains targeting Ethereum users. |[link](https://github.com/MetaMask/eth-phishing-detect) | [raw](https://raw.githubusercontent.com/MetaMask/eth-phishing-detect/master/src/hosts.txt) | frequent | DON'T BE A DICK PUBLIC LICENSE | [issues](https://github.com/MetaMask/eth-phishing-detect/issues)
minecraft-hosts | Minecraft related tracker hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | occasionally | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)
MVPS hosts file | The purpose of this site is to provide the user with a high quality custom HOSTS file. |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | monthly | CC BY-NC-SA 4.0 | [issues](mailto:winhelp2002@gmail.com)
orca.pet | This is a domain list for blocking phishing and malware sites . |[link](https://orca.pet/notonmyshift/) | [raw](https://orca.pet/notonmyshift/hosts.txt) | frequent | ISC | [issues](https://github.com/socram8888/not-on-my-shift)
osint.digitalside.it | DigitalSide Threat-Intel malware domains list. |[link](https://github.com/davidonzo/Threat-Intel) | [raw](https://raw.githubusercontent.com/davidonzo/Threat-Intel/master/lists/latestdomains.piHole.txt) | daily | MIT | [issues](https://github.com/davidonzo/Threat-Intel/issues)
shady-hosts | Analytics, ad, and activity monitoring hosts |[link](https://github.com/shreyasminocha/shady-hosts) | [raw](https://raw.githubusercontent.com/shreyasminocha/shady-hosts/main/hosts) | occasionally | CC0-1.0 | [issues](https://github.com/shreyasminocha/shady-hosts/issues)
Dan Pollock – [someonewhocares](https://someonewhocares.org/) | How to make the internet not suck (as much). |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | frequently | non-commercial with attribution | [issues](mailto:hosts@someonewhocares.org)
Tiuxo hostlist - ads | Categorized hosts files for DNS based content blocking |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | occasional | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)
UncheckyAds | Windows installers ads sources sites based on https://unchecky.com/ content. |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | occasionally | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)
URLHaus | A project from [abuse.ch](https://abuse.ch/) with the goal of sharing malicious URLs. |[link](https://urlhaus.abuse.ch/) | [raw](https://urlhaus.abuse.ch/downloads/hostfile/) | weekly | CC0 | [issues](mailto:contactme@abuse.ch)
yoyo.org | Blocking with ad server and tracking server hostnames. |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) | frequently | | [issues](mailto:pgl@yoyo.org)
## Extensions
@@ -94,7 +97,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -104,7 +128,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -115,10 +141,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -163,6 +185,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -173,6 +200,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -219,8 +269,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -232,7 +281,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -271,7 +319,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -318,13 +365,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -334,13 +388,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -419,11 +466,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -433,6 +482,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
+1 -1
View File
File diff suppressed because one or more lines are too long
+71 -25
View File
@@ -1,7 +1,7 @@
----
**Take Note!**
- This version of the Hosts file generator, and tests, are for Python 3.5+ only.
- With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
* With the exception of issues and PRs regarding changes to `hosts/data/StevenBlack/hosts`, all other issues regarding the content of the produced hosts files should be made with the appropriate data source that contributed the content in question. The contact information for all of the data sources can be found in the `hosts/data/` directory.
----
![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)
@@ -10,7 +10,7 @@
[![license](https://img.shields.io/github/license/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/travis/StevenBlack/hosts/master.svg)](https://travis-ci.org/StevenBlack/hosts)
[![Build Status](https://img.shields.io/github/workflow/status/StevenBlack/hosts/CI/master)](https://github.com/StevenBlack/hosts/actions?query=workflow%3ACI+branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest.svg)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts.svg)](https://github.com/StevenBlack/hosts/commits/master)
@@ -25,7 +25,6 @@ into a unified hosts file with duplicates removed. A variety of tailored hosts
* Here's the [raw hosts file @EXTENSIONS_HEADER@](https://raw.githubusercontent.com/StevenBlack/hosts/master/@SUBFOLDER@hosts) containing @NUM_ENTRIES@ entries.
* Logo by [@Tobaloidee](https://github.com/Tobaloidee).
## List of all hosts file variants
This repository offers [15 different host file variants](https://github.com/StevenBlack/hosts/tree/master/alternates), in addition to the base variant.
@@ -50,7 +49,6 @@ Host file source | Description | Home page | Raw hosts | Update frequency | Lice
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
@SOURCEROWS@
## Extensions
The unified hosts file is optionally extensible. Extensions are used to include domains by category. Currently, we offer the following categories: `fakenews`, `social`, `gambling`, and `porn`.
@@ -62,7 +60,28 @@ folder tree, where you will find the data for `fakenews`, `social`, `gambling`,
## Generate your own unified hosts file
To generate your own unified hosts file you will need Python 3.5 or later.
You have two options to generate your own hosts file. You can do it in your own environment, or within a Docker container. We'll cover Docker first because it's a short section.
### Option 1: Generate in a Docker container
We provide a [Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) that you can use to create a Docker container with everything you need.
The container will contain Python 3 and all its dependency requirements, and a copy of the latest version of this repository.
Build the Docker container like this:
```sh
docker build ./
```
Access the terminal like this:
```sh
docker run -it (containerid) bash
```
### Option 2: Generate it in your own environment.
To generate your own amalgamated hosts files you will need Python 3.5 or later.
First, install the dependencies with:
@@ -72,7 +91,9 @@ pip3 install --user -r requirements.txt
**Note** we recommend the `--user` flag which installs the required dependencies at the user level. More information about it can be found on pip [documentation](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user).
To run unit tests, in the top-level directory, run:
### Common steps regardless of your development environment.
To **run unit tests**, in the top-level directory, run:
```sh
python3 testUpdateHostsFile.py
@@ -83,10 +104,6 @@ local `data/` subfolder. The script will prompt you whether it should fetch upd
(from locations defined by the `update.json` text file in each source's folder). Otherwise, it
will use the `hosts` file that's already there.
### Usage
#### Using Python 3:
```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```
@@ -131,6 +148,11 @@ in a subfolder. If the subfolder does not exist, it will be created.
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--nogendata`, or `-g`: `false` (default) or `true`, skip the generation of the
readmeData.json file used for generating readme.md files. This is useful if you are
generating host files with additional whitelists or blacklists and want to keep your
local checkout of this repo unmodified.
`--compress`, or `-c`: `false` (default) or `true`, *Compress* the hosts file
ignoring non-necessary lines (empty lines and comments) and putting multiple
domains in each line. Reducing the number of lines of the hosts file improves
@@ -141,6 +163,29 @@ each domain on a separate line. This is necessary because many implementations
of URL blockers that rely on `hosts` files do not conform to the standard which
allows multiple hosts on a single line.
`--blacklist <blacklistfile>`, or `-x <blacklistfile>`: Append the given blacklist file
in hosts format to the generated hosts file.
`--whitelist <whitelistfile>`, or `-w <whitelistfile>`: Use the given whitelist file
to remove hosts from the generated hosts file.
#### Using NixOS:
To install hosts file on your machine add the following into your `configuration.nix`:
```nix
{
networking.extraHosts = let
hostsPath = https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts;
hostsFile = builtins.fetchurl hostsPath;
in builtins.readFile "${hostsFile}";
}
```
* NOTE: Change `hostsPath` if you need other versions of hosts file.
* NOTE: The call to `fetchurl` is impure.
Use `fetchFromGitHub` with the exact commit if you want to always get the same result.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
@@ -187,8 +232,7 @@ If you discover sketchy domains you feel should be included here, here are some
The best way to get new domains included is to submit an issue to any of the data providers whose home pages are [listed here](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant). This is best because once you submit new domains, they will be curated and updated by the dedicated folks who maintain these sources.
### Option 2: add your domains to Steven Black's personal data file
### Option 2: Fork this repository, add your domains to Steven Black's personal data file, and submit a pull request
Fork this hosts this repo and add your links to [https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts).
@@ -200,7 +244,6 @@ Then, submit a pull request.
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existence of your repo as [a new issue](https://github.com/StevenBlack/hosts/issues) and we may include your new repo into the collection of sources we pull whenever we create new versions.
## What is a hosts file?
A hosts file, named `hosts` (with no file extension), is a plain-text file
@@ -239,7 +282,6 @@ interfere with a web server that may be running on the local PC.
We tried that. Using `0` doesn't work universally.
## Location of your hosts file
To modify your current `hosts` file, look for it in the following places and modify it with a text
@@ -286,13 +328,20 @@ To open a command prompt as administrator in the repository's directory, do the
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
### Warning: Using this `hosts` file in Windows may require disabling DNS Cache service.
Windows has issues with larger hosts files. Recent changes in security within Windows 10 denies
access to changing services via other tools except registry hacks. Use the `disable-dnscache-service-win.cmd`
file to make proper changes to the Windows registry. You will need to reboot your device once that's done.
See the [the comments within the `cmd` file](https://github.com/StevenBlack/hosts/blob/master/disable-dnscache-service-win.cmd)
for more details.
## Reloading hosts file
Your operating system will cache DNS lookups. You can either reboot or run the following commands to
manually flush your DNS cache once the new hosts file is in place.
| The Google Chrome browser may require manually cleaning up its DNS Cache on `chrome://net-internals/#dns` page to thereafter see the changes in your hosts file. See: <https://superuser.com/questions/723703>
:-----------------------------------------------------------------------------------------
### Windows
@@ -302,13 +351,6 @@ Open a command prompt with administrator privileges and run this command:
ipconfig /flushdns
```
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```bat
sc config "Dnscache" start=disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
@@ -387,11 +429,13 @@ devices under a variety of operating systems.
## Interesting Applications
* [Maza ad blocking](https://github.com/tanrax/maza-ad-blocking) is a bash script that automatically updates host file. You can also update a fresh copy. And each time it generates a dnsmasq-compatible configuration file. Fast installation, compatible with MacOS, Linux and BSD.
* [Hostile](https://github.com/feross/hostile) is a nifty command line utility to easily add or remove domains from your hosts file. If our hosts files are too aggressive for you, you can use `hostile` to remove domains, or you can use `hostile` in a bash script to automate a post process each time you download fresh versions of hosts.
* [macOS Scripting for Configuration, Backup and Restore](https://github.com/tiiiecherle/osx_install_config) helps customizing, re-installing and using macOS. It also provides a [script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/hosts_file_generator.sh) to install and update the hosts file using this project on macOS. In combination with a [launchd](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/launchd_and_script/com.hostsfile.install_update.plist) it updates the hosts file every x days (default is 4). To install both download the GitHub repo and run the [install script](https://github.com/tiiiecherle/osx_install_config/blob/master/09_launchd/9b_run_on_boot/root/1_hosts_file/install_hosts_file_generator_and_launchdservice.sh) from the directory one level up.
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources. This is a very interesting project to set up yourself, or you can [buy one pre-loaded](https://uk.pi-supply.com/products/pi-hole-poe-edition-the-network-wide-ad-blocker).
* [Pi-hole](https://pi-hole.net/) is a network-wide DHCP server and ad blocker that runs on [Raspberry Pi](https://en.wikipedia.org/wiki/Raspberry_Pi). Pi-hole uses this repository as one of its sources.
* [Block ads and malware via local BIND9 DNS server](https://github.com/mueller-ma/block-ads-via-dns "Block ads and malware via local DNS server") (for Debian, Raspbian & Ubuntu): Set up a local DNS server with a `/etc/bind/named.conf.blocked` file, sourced from here.
@@ -401,6 +445,8 @@ devices under a variety of operating systems.
* [dnsmasq conversion script](https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a#file-dnsmasq-antimalware) This GitHub gist has a short shell script (bash, will work on any 'nix) and uses `wget` & `awk` present in most distros, to fetch a specified hosts file and convert it the format required by dnsmasq. Supports IPv4 and IPv6. Designed to be used as either a shell script, or can be dropped into /etc/cron.weekly (or wherever suits). The script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
* [BlackHosts - Command Line Installer/Updater](https://github.com/Lateralus138/blackhosts) This is a cross-platform command line utility to help install/update hosts files found at this repository.
## Contribute!
Please read our [Contributing Guide](https://github.com/StevenBlack/hosts/blob/master/contributing.md). Among other things, this explains how we organize files and folders in this repository.
+2 -2
View File
@@ -1,2 +1,2 @@
lxml>=4.2.4
beautifulsoup4>=4.6.1
requests>=2.20
flake8>=3.8,<=4.0
+6
View File
@@ -0,0 +1,6 @@
[flake8]
max-line-length = 120
extend-ignore = E203
[isort]
profile = black
+260 -181
View File
@@ -8,6 +8,7 @@
import json
import locale
import os
import platform
import re
import shutil
import sys
@@ -16,6 +17,8 @@ import unittest
import unittest.mock as mock
from io import BytesIO, StringIO
import requests
import updateHostsFile
from updateHostsFile import (
Colors,
@@ -27,7 +30,7 @@ from updateHostsFile import (
gather_custom_exclusions,
get_defaults,
get_file_by_url,
is_valid_domain_format,
is_valid_user_provided_domain_format,
matches_exclusions,
move_hosts_file_into_place,
normalize_rule,
@@ -41,6 +44,7 @@ from updateHostsFile import (
query_yes_no,
recursive_glob,
remove_old_hosts_file,
sort_sources,
strip_rule,
supports_color,
update_all_sources,
@@ -61,6 +65,8 @@ class Base(unittest.TestCase):
@property
def sep(self):
if platform.system().lower() == "windows":
return "\\"
return os.sep
def assert_called_once(self, mock_method):
@@ -119,7 +125,7 @@ class TestGetDefaults(Base):
"readmedata": {},
"readmedatafilename": ("foo" + self.sep + "readmeData.json"),
"exclusionpattern": r"([a-zA-Z\d-]+\.){0,}",
"exclusionregexs": [],
"exclusionregexes": [],
"exclusions": [],
"commonexclusions": ["hulu.com"],
"blacklistfile": "foo" + self.sep + "blacklist",
@@ -131,6 +137,80 @@ class TestGetDefaults(Base):
# End Project Settings
class TestSortSources(Base):
def test_sort_sources_simple(self):
given = [
"sbc.io",
"example.com",
"github.com",
]
expected = ["example.com", "github.com", "sbc.io"]
actual = sort_sources(given)
self.assertEqual(actual, expected)
def test_live_data(self):
given = [
"data/KADhosts/update.json",
"data/someonewhocares.org/update.json",
"data/StevenBlack/update.json",
"data/adaway.org/update.json",
"data/URLHaus/update.json",
"data/UncheckyAds/update.json",
"data/add.2o7Net/update.json",
"data/mvps.org/update.json",
"data/add.Spam/update.json",
"data/add.Dead/update.json",
"data/malwaredomainlist.com/update.json",
"data/Badd-Boyz-Hosts/update.json",
"data/hostsVN/update.json",
"data/yoyo.org/update.json",
"data/add.Risk/update.json",
"data/tiuxo/update.json",
"extensions/gambling/update.json",
"extensions/porn/clefspeare13/update.json",
"extensions/porn/sinfonietta-snuff/update.json",
"extensions/porn/tiuxo/update.json",
"extensions/porn/sinfonietta/update.json",
"extensions/fakenews/update.json",
"extensions/social/tiuxo/update.json",
"extensions/social/sinfonietta/update.json",
]
expected = [
"data/StevenBlack/update.json",
"data/adaway.org/update.json",
"data/add.2o7Net/update.json",
"data/add.Dead/update.json",
"data/add.Risk/update.json",
"data/add.Spam/update.json",
"data/Badd-Boyz-Hosts/update.json",
"data/hostsVN/update.json",
"data/KADhosts/update.json",
"data/malwaredomainlist.com/update.json",
"data/mvps.org/update.json",
"data/someonewhocares.org/update.json",
"data/tiuxo/update.json",
"data/UncheckyAds/update.json",
"data/URLHaus/update.json",
"data/yoyo.org/update.json",
"extensions/fakenews/update.json",
"extensions/gambling/update.json",
"extensions/porn/clefspeare13/update.json",
"extensions/porn/sinfonietta/update.json",
"extensions/porn/sinfonietta-snuff/update.json",
"extensions/porn/tiuxo/update.json",
"extensions/social/sinfonietta/update.json",
"extensions/social/tiuxo/update.json",
]
actual = sort_sources(given)
self.assertEqual(actual, expected)
# Prompt the User
class TestPromptForUpdate(BaseStdout, BaseMockDir):
def setUp(self):
@@ -217,7 +297,7 @@ class TestPromptForUpdate(BaseStdout, BaseMockDir):
self.assertFalse(update_sources)
output = sys.stdout.getvalue()
expected = "OK, we'll stick with " "what we've got locally."
expected = "OK, we'll stick with what we've got locally."
self.assertIn(expected, output)
sys.stdout = StringIO()
@@ -279,7 +359,7 @@ class TestPromptForExclusions(BaseStdout):
self.assertFalse(gather_exclusions)
output = sys.stdout.getvalue()
expected = "OK, we'll only exclude " "domains in the whitelist."
expected = "OK, we'll only exclude domains in the whitelist."
self.assertIn(expected, output)
self.assert_called_once(mock_query)
@@ -398,9 +478,6 @@ class TestPromptForMove(Base):
self.assert_called_once(mock_query)
mock_move.assert_not_called()
mock_query.reset_mock()
mock_move.reset_mock()
@mock.patch("updateHostsFile.move_hosts_file_into_place", return_value=0)
@mock.patch("updateHostsFile.query_yes_no", return_value=True)
def testPromptMove(self, mock_query, mock_move):
@@ -412,9 +489,6 @@ class TestPromptForMove(Base):
self.assert_called_once(mock_query)
self.assert_called_once(mock_move)
mock_query.reset_mock()
mock_move.reset_mock()
# End Prompt the User
@@ -469,7 +543,7 @@ class TestGatherCustomExclusions(BaseStdout):
# Can only test in the invalid domain case
# because of the settings global variable.
@mock.patch("updateHostsFile.input", side_effect=["foo", "no"])
@mock.patch("updateHostsFile.is_valid_domain_format", return_value=False)
@mock.patch("updateHostsFile.is_valid_user_provided_domain_format", return_value=False)
def test_basic(self, *_):
gather_custom_exclusions("foo", [])
@@ -478,7 +552,7 @@ class TestGatherCustomExclusions(BaseStdout):
self.assertIn(expected, output)
@mock.patch("updateHostsFile.input", side_effect=["foo", "yes", "bar", "no"])
@mock.patch("updateHostsFile.is_valid_domain_format", return_value=False)
@mock.patch("updateHostsFile.is_valid_user_provided_domain_format", return_value=False)
def test_multiple(self, *_):
gather_custom_exclusions("foo", [])
@@ -559,6 +633,31 @@ class TestMatchesExclusions(Base):
]:
self.assertTrue(matches_exclusions(domain, exclusion_regexes))
def test_match_raw_list(self):
exclusion_regexes = [r".*\.com", r".*\.org", r".*\.edu", r".*@.*"]
exclusion_regexes = [re.compile(regex) for regex in exclusion_regexes]
for domain in [
"hulu.com",
"yahoo.com",
"adaway.org",
"education.edu",
"a.stro.lo.gy@45.144.225.135",
]:
self.assertTrue(matches_exclusions(domain, exclusion_regexes))
def test_no_match_raw_list(self):
exclusion_regexes = [r".*\.org", r".*\.edu"]
exclusion_regexes = [re.compile(regex) for regex in exclusion_regexes]
for domain in [
"localhost",
"hulu.com",
"yahoo.com",
"cloudfront.net",
]:
self.assertFalse(matches_exclusions(domain, exclusion_regexes))
# End Exclusion Logic
@@ -732,13 +831,11 @@ class TestNormalizeRule(BaseStdout):
def test_no_match(self):
kwargs = dict(target_ip="0.0.0.0", keep_domain_comments=False)
# Note: "Bare"- Domains are accepted. IP are excluded.
for rule in [
"foo",
"128.0.0.1",
"bar.com/usa",
"0.0.0 google",
"0.1.2.3.4 foo/bar",
"twitter.com",
]:
self.assertEqual(normalize_rule(rule, **kwargs), (None, None))
@@ -800,13 +897,43 @@ class TestNormalizeRule(BaseStdout):
sys.stdout = StringIO()
def test_no_comment_raw(self):
for rule in ("twitter.com", "google.com", "foo.bar.edu"):
expected = (rule, "0.0.0.0 " + rule + "\n")
class TestStripRule(Base):
def test_strip_empty(self):
for line in ["0.0.0.0", "domain.com", "foo"]:
output = strip_rule(line)
actual = normalize_rule(
rule, target_ip="0.0.0.0", keep_domain_comments=False
)
self.assertEqual(actual, expected)
# Nothing gets printed if there's a match.
output = sys.stdout.getvalue()
self.assertEqual(output, "")
sys.stdout = StringIO()
def test_with_comments_raw(self):
for target_ip in ("0.0.0.0", "127.0.0.1", "8.8.8.8"):
for comment in ("foo", "bar", "baz"):
rule = "1.google.co.uk " + comment
expected = (
"1.google.co.uk",
(str(target_ip) + " 1.google.co.uk # " + comment + "\n"),
)
actual = normalize_rule(
rule, target_ip=target_ip, keep_domain_comments=True
)
self.assertEqual(actual, expected)
# Nothing gets printed if there's a match.
output = sys.stdout.getvalue()
self.assertEqual(output, "")
sys.stdout = StringIO()
class TestStripRule(Base):
def test_strip_exactly_two(self):
for line in [
"0.0.0.0 twitter.com",
@@ -829,6 +956,28 @@ class TestStripRule(Base):
output = strip_rule(line + comment)
self.assertEqual(output, line + comment)
def test_strip_raw(self):
for line in [
"twitter.com",
"facebook.com",
"google.com",
"foo.bar.edu",
]:
output = strip_rule(line)
self.assertEqual(output, line)
def test_strip_raw_with_comment(self):
comment = " # comments here galore"
for line in [
"twitter.com",
"facebook.com",
"google.com",
"foo.bar.edu",
]:
output = strip_rule(line + comment)
self.assertEqual(output, line + comment)
class TestWriteOpeningHeader(BaseMockDir):
def setUp(self):
@@ -1047,12 +1196,13 @@ class TestUpdateReadmeData(BaseMockDir):
)
update_readme_data(self.readme_file, **kwargs)
if platform.system().lower() == "windows":
sep = "/"
else:
sep = self.sep
expected = {
"base": {
"location": "foo" + self.sep,
"sourcesdata": "hosts",
"entries": 5,
},
"base": {"location": "foo" + sep, "sourcesdata": "hosts", "entries": 5},
"foo": "bar",
}
@@ -1069,8 +1219,13 @@ class TestUpdateReadmeData(BaseMockDir):
)
update_readme_data(self.readme_file, **kwargs)
if platform.system().lower() == "windows":
sep = "/"
else:
sep = self.sep
expected = {
"base": {"location": "foo" + self.sep, "sourcesdata": "hosts", "entries": 5}
"base": {"location": "foo" + sep, "sourcesdata": "hosts", "entries": 5}
}
with open(self.readme_file, "r") as f:
@@ -1089,12 +1244,13 @@ class TestUpdateReadmeData(BaseMockDir):
)
update_readme_data(self.readme_file, **kwargs)
if platform.system().lower() == "windows":
sep = "/"
else:
sep = self.sep
expected = {
"com-org": {
"location": "foo" + self.sep,
"sourcesdata": "hosts",
"entries": 5,
}
"com-org": {"location": "foo" + sep, "sourcesdata": "hosts", "entries": 5}
}
with open(self.readme_file, "r") as f:
@@ -1230,7 +1386,7 @@ class TestFlushDnsCache(BaseStdout):
os.name = "posix"
flush_dns_cache()
expected = "Flushing the DNS cache by " "restarting nscd succeeded"
expected = "Flushing the DNS cache by restarting nscd succeeded"
output = sys.stdout.getvalue()
self.assertIn(expected, output)
@@ -1244,12 +1400,12 @@ class TestFlushDnsCache(BaseStdout):
os.name = "posix"
flush_dns_cache()
expected = "Flushing the DNS cache by " "restarting nscd failed"
expected = "Flushing the DNS cache by restarting nscd failed"
output = sys.stdout.getvalue()
self.assertIn(expected, output)
@mock.patch("os.path.isfile", side_effect=[True, False, False, True] + [False] * 10)
@mock.patch("subprocess.call", side_effect=[1, 0])
@mock.patch("subprocess.call", side_effect=[1, 0, 0])
def test_flush_posix_fail_then_succeed(self, *_):
with self.mock_property("platform.system") as obj:
obj.return_value = "Linux"
@@ -1260,7 +1416,7 @@ class TestFlushDnsCache(BaseStdout):
output = sys.stdout.getvalue()
for expected in [
("Flushing the DNS cache by " "restarting nscd failed"),
("Flushing the DNS cache by restarting nscd failed"),
(
"Flushing the DNS cache by restarting "
"NetworkManager.service succeeded"
@@ -1269,15 +1425,6 @@ class TestFlushDnsCache(BaseStdout):
self.assertIn(expected, output)
def mock_path_join_robust(*args):
# We want to hard-code the backup hosts filename
# instead of parametrizing based on current time.
if len(args) == 2 and args[1].startswith("hosts-"):
return os.path.join(args[0], "hosts-new")
else:
return os.path.join(*args)
class TestRemoveOldHostsFile(BaseMockDir):
def setUp(self):
super(TestRemoveOldHostsFile, self).setUp()
@@ -1286,16 +1433,14 @@ class TestRemoveOldHostsFile(BaseMockDir):
def test_remove_hosts_file(self):
old_dir_count = self.dir_count
with self.mock_property("updateHostsFile.BASEDIR_PATH"):
updateHostsFile.BASEDIR_PATH = self.test_dir
remove_old_hosts_file(backup=False)
remove_old_hosts_file(self.hosts_file, backup=False)
new_dir_count = old_dir_count + 1
self.assertEqual(self.dir_count, new_dir_count)
new_dir_count = old_dir_count + 1
self.assertEqual(self.dir_count, new_dir_count)
with open(self.hosts_file, "r") as f:
contents = f.read()
self.assertEqual(contents, "")
with open(self.hosts_file, "r") as f:
contents = f.read()
self.assertEqual(contents, "")
def test_remove_hosts_file_exists(self):
with open(self.hosts_file, "w") as f:
@@ -1303,116 +1448,41 @@ class TestRemoveOldHostsFile(BaseMockDir):
old_dir_count = self.dir_count
with self.mock_property("updateHostsFile.BASEDIR_PATH"):
updateHostsFile.BASEDIR_PATH = self.test_dir
remove_old_hosts_file(backup=False)
remove_old_hosts_file(self.hosts_file, backup=False)
new_dir_count = old_dir_count
self.assertEqual(self.dir_count, new_dir_count)
new_dir_count = old_dir_count
self.assertEqual(self.dir_count, new_dir_count)
with open(self.hosts_file, "r") as f:
contents = f.read()
self.assertEqual(contents, "")
with open(self.hosts_file, "r") as f:
contents = f.read()
self.assertEqual(contents, "")
@mock.patch("updateHostsFile.path_join_robust", side_effect=mock_path_join_robust)
@mock.patch("time.strftime", return_value="new")
def test_remove_hosts_file_backup(self, _):
with open(self.hosts_file, "w") as f:
f.write("foo")
old_dir_count = self.dir_count
with self.mock_property("updateHostsFile.BASEDIR_PATH"):
updateHostsFile.BASEDIR_PATH = self.test_dir
remove_old_hosts_file(backup=True)
remove_old_hosts_file(self.hosts_file, backup=True)
new_dir_count = old_dir_count + 1
self.assertEqual(self.dir_count, new_dir_count)
new_dir_count = old_dir_count + 1
self.assertEqual(self.dir_count, new_dir_count)
with open(self.hosts_file, "r") as f:
contents = f.read()
self.assertEqual(contents, "")
with open(self.hosts_file, "r") as f:
contents = f.read()
self.assertEqual(contents, "")
new_hosts_file = self.hosts_file + "-new"
new_hosts_file = self.hosts_file + "-new"
with open(new_hosts_file, "r") as f:
contents = f.read()
self.assertEqual(contents, "foo")
with open(new_hosts_file, "r") as f:
contents = f.read()
self.assertEqual(contents, "foo")
# End File Logic
# Helper Functions
def mock_url_open(url):
"""
Mock of `urlopen` that returns the url in a `BytesIO` stream.
Parameters
----------
url : str
The URL associated with the file to open.
Returns
-------
bytes_stream : BytesIO
The `url` input wrapped in a `BytesIO` stream.
"""
return BytesIO(url)
def mock_url_open_fail(_):
"""
Mock of `urlopen` that fails with an Exception.
"""
raise Exception()
def mock_url_open_read_fail(_):
"""
Mock of `urlopen` that returns an object that fails on `read`.
Returns
-------
file_mock : mock.Mock
A mock of a file object that fails when reading.
"""
def fail_read():
raise Exception()
m = mock.Mock()
m.read = fail_read
return m
def mock_url_open_decode_fail(_):
"""
Mock of `urlopen` that returns an object that fails on during decoding
the output of `urlopen`.
Returns
-------
file_mock : mock.Mock
A mock of a file object that fails when decoding the output.
"""
def fail_decode(_):
raise Exception()
def read():
s = mock.Mock()
s.decode = fail_decode
return s
m = mock.Mock()
m.read = read
return m
class DomainToIDNA(Base):
def __init__(self, *args, **kwargs):
super(DomainToIDNA, self).__init__(*args, **kwargs)
@@ -1517,7 +1587,7 @@ class DomainToIDNA(Base):
self.assertEqual(actual, expected)
# Test with multiple space as seprator of domain and space and
# Test with multiple space as separator of domain and space and
# tabulation as separator or comments.
for i in range(len(self.domains)):
data = (b"0.0.0.0 " + self.domains[i] + b" \t # Hello World").decode(
@@ -1529,7 +1599,7 @@ class DomainToIDNA(Base):
self.assertEqual(actual, expected)
# Test with multiple tabulations as seprator of domain and space and
# Test with multiple tabulations as separator of domain and space and
# tabulation as separator or comments.
for i in range(len(self.domains)):
data = (b"0.0.0.0\t\t\t" + self.domains[i] + b" \t # Hello World").decode(
@@ -1552,44 +1622,55 @@ class DomainToIDNA(Base):
class GetFileByUrl(BaseStdout):
@mock.patch("updateHostsFile.urlopen", side_effect=mock_url_open)
def test_read_url(self, _):
url = b"www.google.com"
def test_basic(self):
raw_resp_content = "hello, ".encode("ascii") + "world".encode("utf-8")
resp_obj = requests.Response()
resp_obj.__setstate__({"_content": raw_resp_content})
expected = "www.google.com"
actual = get_file_by_url(url)
expected = "hello, world"
self.assertEqual(actual, expected)
with mock.patch("requests.get", return_value=resp_obj):
actual = get_file_by_url("www.test-url.com")
@mock.patch("updateHostsFile.urlopen", side_effect=mock_url_open_fail)
def test_read_url_fail(self, _):
url = b"www.google.com"
self.assertIsNone(get_file_by_url(url))
self.assertEqual(expected, actual)
expected = "Problem getting file:"
output = sys.stdout.getvalue()
def test_with_idna(self):
raw_resp_content = b"www.huala\xc3\xb1e.cl"
resp_obj = requests.Response()
resp_obj.__setstate__({"_content": raw_resp_content})
self.assertIn(expected, output)
expected = "www.xn--hualae-0wa.cl"
@mock.patch("updateHostsFile.urlopen", side_effect=mock_url_open_read_fail)
def test_read_url_read_fail(self, _):
url = b"www.google.com"
self.assertIsNone(get_file_by_url(url))
with mock.patch("requests.get", return_value=resp_obj):
actual = get_file_by_url("www.test-url.com")
expected = "Problem getting file:"
output = sys.stdout.getvalue()
self.assertEqual(expected, actual)
self.assertIn(expected, output)
def test_connect_unknown_domain(self):
test_url = (
"http://doesnotexist.google.com" # leads to exception: ConnectionError
)
with mock.patch(
"requests.get", side_effect=requests.exceptions.ConnectionError
):
return_value = get_file_by_url(test_url)
self.assertIsNone(return_value)
printed_output = sys.stdout.getvalue()
self.assertEqual(
printed_output, "Error retrieving data from {}\n".format(test_url)
)
@mock.patch("updateHostsFile.urlopen", side_effect=mock_url_open_decode_fail)
def test_read_url_decode_fail(self, _):
url = b"www.google.com"
self.assertIsNone(get_file_by_url(url))
expected = "Problem getting file:"
output = sys.stdout.getvalue()
self.assertIn(expected, output)
def test_invalid_url(self):
test_url = "http://fe80::5054:ff:fe5a:fc0" # leads to exception: InvalidURL
with mock.patch(
"requests.get", side_effect=requests.exceptions.ConnectionError
):
return_value = get_file_by_url(test_url)
self.assertIsNone(return_value)
printed_output = sys.stdout.getvalue()
self.assertEqual(
printed_output, "Error retrieving data from {}\n".format(test_url)
)
class TestWriteData(Base):
@@ -1673,9 +1754,9 @@ class TestQueryYesOrNo(BaseStdout):
self.assertIn(expected, output)
class TestIsValidDomainFormat(BaseStdout):
class TestIsValidUserProvidedDomainFormat(BaseStdout):
def test_empty_domain(self):
self.assertFalse(is_valid_domain_format(""))
self.assertFalse(is_valid_user_provided_domain_format(""))
output = sys.stdout.getvalue()
expected = "You didn't enter a domain. Try again."
@@ -1683,16 +1764,14 @@ class TestIsValidDomainFormat(BaseStdout):
self.assertTrue(expected in output)
def test_invalid_domain(self):
expected = (
"Do not include www.domain.com or " "http(s)://domain.com. Try again."
)
expected = "Do not include www.domain.com or http(s)://domain.com. Try again."
for invalid_domain in [
"www.subdomain.domain",
"https://github.com",
"http://www.google.com",
]:
self.assertFalse(is_valid_domain_format(invalid_domain))
self.assertFalse(is_valid_user_provided_domain_format(invalid_domain))
output = sys.stdout.getvalue()
sys.stdout = StringIO()
@@ -1701,7 +1780,7 @@ class TestIsValidDomainFormat(BaseStdout):
def test_valid_domain(self):
for valid_domain in ["github.com", "travis.org", "twitter.com"]:
self.assertTrue(is_valid_domain_format(valid_domain))
self.assertTrue(is_valid_user_provided_domain_format(valid_domain))
output = sys.stdout.getvalue()
sys.stdout = StringIO()
+206 -99
View File
@@ -4,7 +4,7 @@
# https://github.com/l1m5
#
# This Python script will combine all the host files you provide
# as sources into one, unique host file to keep you internet browsing happy.
# as sources into one, unique host file to keep your internet browsing happy.
import argparse
import fnmatch
@@ -20,18 +20,24 @@ import sys
import tempfile
import time
from glob import glob
import lxml # noqa: F401
from bs4 import BeautifulSoup
from typing import Optional, Tuple
# Detecting Python 3 for version-dependent implementations
PY3 = sys.version_info >= (3, 0)
if PY3:
from urllib.request import urlopen
else:
if not PY3:
raise Exception("We do not support Python 2 anymore.")
try:
import requests
except ImportError:
raise ImportError(
"This project's dependencies have changed. The Requests library ("
"https://requests.readthedocs.io/en/master/) is now required."
)
# Syntactic sugar for "sudo" command in UNIX / Linux
if platform.system() == "OpenBSD":
SUDO = ["/usr/bin/doas"]
@@ -75,7 +81,7 @@ def get_defaults():
"readmedata": {},
"readmedatafilename": path_join_robust(BASEDIR_PATH, "readmeData.json"),
"exclusionpattern": r"([a-zA-Z\d-]+\.){0,}",
"exclusionregexs": [],
"exclusionregexes": [],
"exclusions": [],
"commonexclusions": ["hulu.com"],
"blacklistfile": path_join_robust(BASEDIR_PATH, "blacklist"),
@@ -89,8 +95,7 @@ def get_defaults():
def main():
parser = argparse.ArgumentParser(
description="Creates a unified hosts "
"file from hosts stored in "
"data subfolders."
"file from hosts stored in the data subfolders."
)
parser.add_argument(
"--auto",
@@ -106,7 +111,7 @@ def main():
dest="backup",
default=False,
action="store_true",
help="Backup the hosts " "files before they " "are overridden.",
help="Backup the hosts files before they are overridden.",
)
parser.add_argument(
"--extensions",
@@ -114,7 +119,7 @@ def main():
dest="extensions",
default=[],
nargs="*",
help="Host extensions to include " "in the final hosts file.",
help="Host extensions to include in the final hosts file.",
)
parser.add_argument(
"--ip",
@@ -137,7 +142,7 @@ def main():
dest="noupdate",
default=False,
action="store_true",
help="Don't update from " "host data sources.",
help="Don't update from host data sources.",
)
parser.add_argument(
"--skipstatichosts",
@@ -145,7 +150,15 @@ def main():
dest="skipstatichosts",
default=False,
action="store_true",
help="Skip static localhost entries " "in the final hosts file.",
help="Skip static localhost entries in the final hosts file.",
)
parser.add_argument(
"--nogendata",
"-g",
dest="nogendata",
default=False,
action="store_true",
help="Skip generation of readmeData.json",
)
parser.add_argument(
"--output",
@@ -160,7 +173,7 @@ def main():
dest="replace",
default=False,
action="store_true",
help="Replace your active " "hosts file with this " "new hosts file.",
help="Replace your active hosts file with this new hosts file.",
)
parser.add_argument(
"--flush-dns-cache",
@@ -168,7 +181,7 @@ def main():
dest="flushdnscache",
default=False,
action="store_true",
help="Attempt to flush DNS cache " "after replacing the hosts file.",
help="Attempt to flush DNS cache after replacing the hosts file.",
)
parser.add_argument(
"--compress",
@@ -176,12 +189,9 @@ def main():
dest="compress",
default=False,
action="store_true",
help="Compress the hosts file "
"ignoring non-necessary lines "
"(empty lines and comments) and "
"putting multiple domains in "
"each line. Improve the "
"performances under Windows.",
help="Compress the hosts file ignoring non-necessary lines "
"(empty lines and comments) and putting multiple domains in "
"each line. Improve the performance under Windows.",
)
parser.add_argument(
"--minimise",
@@ -189,10 +199,23 @@ def main():
dest="minimise",
default=False,
action="store_true",
help="Minimise the hosts file "
"ignoring non-necessary lines "
help="Minimise the hosts file ignoring non-necessary lines "
"(empty lines and comments).",
)
parser.add_argument(
"--whitelist",
"-w",
dest="whitelistfile",
default=path_join_robust(BASEDIR_PATH, "whitelist"),
help="Whitelist file to use while generating hosts files.",
)
parser.add_argument(
"--blacklist",
"-x",
dest="blacklistfile",
default=path_join_robust(BASEDIR_PATH, "blacklist"),
help="Blacklist file to use while generating hosts files.",
)
global settings
@@ -220,7 +243,7 @@ def main():
)
auto = settings["auto"]
exclusion_regexes = settings["exclusionregexs"]
exclusion_regexes = settings["exclusionregexes"]
source_data_filename = settings["sourcedatafilename"]
update_sources = prompt_for_update(freshen=settings["freshen"], update_auto=auto)
@@ -248,7 +271,9 @@ def main():
)
merge_file = create_initial_file()
remove_old_hosts_file(settings["backup"])
remove_old_hosts_file(
path_join_robust(settings["outputpath"], "hosts"), settings["backup"]
)
if settings["compress"]:
final_file = open(path_join_robust(settings["outputpath"], "hosts"), "w+b")
compressed_file = tempfile.NamedTemporaryFile()
@@ -275,13 +300,14 @@ def main():
)
final_file.close()
update_readme_data(
settings["readmedatafilename"],
extensions=extensions,
numberofrules=number_of_rules,
outputsubfolder=output_subfolder,
sourcesdata=sources_data,
)
if not settings["nogendata"]:
update_readme_data(
settings["readmedatafilename"],
extensions=extensions,
numberofrules=number_of_rules,
outputsubfolder=output_subfolder,
sourcesdata=sources_data,
)
print_success(
"Success! The hosts file has been saved in folder "
@@ -449,6 +475,34 @@ def prompt_for_move(final_file, **move_params):
# End Prompt the User
def sort_sources(sources):
"""
Sorts the sources.
The idea is that all Steven Black's list, file or entries
get on top and the rest sorted alphabetically.
Parameters
----------
sources: list
The sources to sort.
"""
result = sorted(
sources.copy(),
key=lambda x: x.lower().replace("-", "").replace("_", "").replace(" ", ""),
)
# Steven Black's repositories/files/lists should be on top!
steven_black_positions = [
x for x, y in enumerate(result) if "stevenblack" in y.lower()
]
for index in steven_black_positions:
result.insert(0, result.pop(index))
return result
# Exclusion logic
def display_exclusion_options(common_exclusions, exclusion_pattern, exclusion_regexes):
"""
@@ -472,7 +526,7 @@ def display_exclusion_options(common_exclusions, exclusion_pattern, exclusion_re
-------
aug_exclusion_regexes : list
The original list of regex patterns potentially with additional
patterns from domains that user chooses to exclude.
patterns from domains that the user chooses to exclude.
"""
for exclusion_option in common_exclusions:
@@ -508,7 +562,7 @@ def gather_custom_exclusions(exclusion_pattern, exclusion_regexes):
-------
aug_exclusion_regexes : list
The original list of regex patterns potentially with additional
patterns from domains that user chooses to exclude.
patterns from domains that the user chooses to exclude.
"""
# We continue running this while-loop until the user
@@ -517,7 +571,7 @@ def gather_custom_exclusions(exclusion_pattern, exclusion_regexes):
domain_prompt = "Enter the domain you want to exclude (e.g. facebook.com): "
user_domain = input(domain_prompt)
if is_valid_domain_format(user_domain):
if is_valid_user_provided_domain_format(user_domain):
exclusion_regexes = exclude_domain(
user_domain, exclusion_pattern, exclusion_regexes
)
@@ -533,7 +587,7 @@ def exclude_domain(domain, exclusion_pattern, exclusion_regexes):
"""
Exclude a domain from being blocked.
This create the domain regex by which to exclude this domain and appends
This creates the domain regex by which to exclude this domain and appends
it a list of already-existing exclusion regexes.
Parameters
@@ -578,7 +632,11 @@ def matches_exclusions(stripped_rule, exclusion_regexes):
Whether or not the rule string matches a provided exclusion.
"""
stripped_domain = stripped_rule.split()[1]
try:
stripped_domain = stripped_rule.split()[1]
except IndexError:
# Example: 'example.org' instead of '0.0.0.0 example.org'
stripped_domain = stripped_rule
for exclusionRegex in exclusion_regexes:
if exclusionRegex.search(stripped_domain):
@@ -616,7 +674,9 @@ def update_sources_data(sources_data, **sources_params):
source_data_filename = sources_params["sourcedatafilename"]
for source in recursive_glob(sources_params["datapath"], source_data_filename):
for source in sort_sources(
recursive_glob(sources_params["datapath"], source_data_filename)
):
update_file = open(source, "r", encoding="UTF-8")
update_data = json.load(update_file)
sources_data.append(update_data)
@@ -624,7 +684,9 @@ def update_sources_data(sources_data, **sources_params):
for source in sources_params["extensions"]:
source_dir = path_join_robust(sources_params["extensionspath"], source)
for update_file_path in recursive_glob(source_dir, source_data_filename):
for update_file_path in sort_sources(
recursive_glob(source_dir, source_data_filename)
):
update_file = open(update_file_path, "r")
update_data = json.load(update_file)
@@ -663,14 +725,14 @@ def update_all_sources(source_data_filename, host_filename):
to be the same for all sources.
host_filename : str
The name of the file in which the updated source information
in stored for a particular URL. This filename is assumed to be
is stored for a particular URL. This filename is assumed to be
the same for all sources.
"""
# The transforms we support
transform_methods = {"jsonarray": jsonarray}
all_sources = recursive_glob("*", source_data_filename)
all_sources = sort_sources(recursive_glob("*", source_data_filename))
for source in all_sources:
update_file = open(source, "r", encoding="UTF-8")
@@ -715,19 +777,23 @@ def create_initial_file():
merge_file = tempfile.NamedTemporaryFile()
# spin the sources for the base file
for source in recursive_glob(settings["datapath"], settings["hostfilename"]):
for source in sort_sources(
recursive_glob(settings["datapath"], settings["hostfilename"])
):
start = "# Start {}\n\n".format(os.path.basename(os.path.dirname(source)))
end = "# End {}\n\n".format(os.path.basename(os.path.dirname(source)))
end = "\n# End {}\n\n".format(os.path.basename(os.path.dirname(source)))
with open(source, "r", encoding="UTF-8") as curFile:
write_data(merge_file, start + curFile.read() + end)
# spin the sources for extensions to the base file
for source in settings["extensions"]:
for filename in recursive_glob(
path_join_robust(settings["extensionspath"], source),
settings["hostfilename"],
for filename in sort_sources(
recursive_glob(
path_join_robust(settings["extensionspath"], source),
settings["hostfilename"],
)
):
with open(filename, "r") as curFile:
write_data(merge_file, curFile.read())
@@ -877,6 +943,10 @@ def remove_dups_and_excl(merge_file, exclusion_regexes, output_file=None):
if not stripped_rule or matches_exclusions(stripped_rule, exclusion_regexes):
continue
# Issue #1628
if ("@" in stripped_rule):
continue
# Normalize rule
hostname, normalized_rule = normalize_rule(
stripped_rule,
@@ -922,6 +992,37 @@ def normalize_rule(rule, target_ip, keep_domain_comments):
and spacing reformatted.
"""
def normalize_response(
extracted_hostname: str, extracted_suffix: Optional[str]
) -> Tuple[str, str]:
"""
Normalizes the responses after the provision of the extracted
hostname and suffix - if exist.
Parameters
----------
extracted_hostname: str
The extracted hostname to work with.
extracted_suffix: str
The extracted suffix to with.
Returns
-------
normalized_response: tuple
A tuple of the hostname and the rule string with spelling
and spacing reformatted.
"""
rule = "%s %s" % (target_ip, extracted_hostname)
if keep_domain_comments and extracted_suffix:
if not extracted_suffix.strip().startswith("#"):
rule += " #%s" % extracted_suffix
else:
rule += " %s" % extracted_suffix
return extracted_hostname, rule + "\n"
"""
first try: IP followed by domain
"""
@@ -933,15 +1034,8 @@ def normalize_rule(rule, target_ip, keep_domain_comments):
# Explicitly lowercase and trim the hostname.
hostname = hostname.lower().strip()
rule = "%s %s" % (target_ip, hostname)
if suffix and keep_domain_comments:
if not suffix.strip().startswith("#"):
rule += " #%s" % suffix
else:
rule += " %s" % suffix
return hostname, rule + "\n"
return normalize_response(hostname, suffix)
"""
next try: IP address followed by host IP address
@@ -953,15 +1047,22 @@ def normalize_rule(rule, target_ip, keep_domain_comments):
ip_host, suffix = result.group(2, 3)
# Explicitly trim the ip host.
ip_host = ip_host.strip()
rule = "%s %s" % (target_ip, ip_host)
if suffix and keep_domain_comments:
if not suffix.strip().startswith("#"):
rule += " #%s" % suffix
else:
rule += " %s" % suffix
return normalize_response(ip_host, suffix)
return ip_host, rule + "\n"
"""
next try: Keep RAW domain.
"""
regex = r"^\s*([\w\.-]+[a-zA-Z])(.*)"
result = re.search(regex, rule)
if result:
hostname, suffix = result.group(1, 2)
# Explicitly lowercase and trim the hostname.
hostname = hostname.lower().strip()
return normalize_response(hostname, suffix)
"""
finally, if we get here, just belch to screen
@@ -985,12 +1086,7 @@ def strip_rule(line):
The sanitized rule.
"""
split_line = line.split()
if len(split_line) < 2:
# just return blank
return ""
else:
return " ".join(split_line)
return " ".join(line.split())
def write_opening_header(final_file, **header_params):
@@ -1033,12 +1129,7 @@ def write_opening_header(final_file, **header_params):
),
)
else:
write_data(
final_file,
"# Title: StevenBlack/hosts\n#\n".format(
", ".join(header_params["extensions"])
),
)
write_data(final_file, "# Title: StevenBlack/hosts\n#\n")
write_data(
final_file,
@@ -1154,6 +1245,11 @@ def update_readme_data(readme_file, **readme_updates):
readme_data = json.load(f)
readme_data[extensions_key] = generation_data
for denomination, data in readme_data.copy().items():
if "location" in data and data["location"] and "\\" in data["location"]:
# Windows compatibility: #1166
readme_data[denomination]["location"] = data["location"].replace("\\", "/")
with open(readme_file, "w") as f:
json.dump(readme_data, f)
@@ -1186,8 +1282,8 @@ def move_hosts_file_into_place(final_file):
elif os.name == "nt":
print("Automatically moving the hosts file in place is not yet supported.")
print(
"Please move the generated file to %SystemRoot%\system32\drivers\etc\hosts"
) # noqa: W605
"Please move the generated file to %SystemRoot%\\system32\\drivers\\etc\\hosts"
)
def flush_dns_cache():
@@ -1237,6 +1333,7 @@ def flush_dns_cache():
system_prefixes = ["/usr", ""]
service_types = ["NetworkManager", "wicd", "dnsmasq", "networking"]
restarted_services = []
for system_prefix in system_prefixes:
systemctl = system_prefix + "/bin/systemctl"
@@ -1244,18 +1341,26 @@ def flush_dns_cache():
for service_type in service_types:
service = service_type + ".service"
if service in restarted_services:
continue
service_file = path_join_robust(system_dir, service)
service_msg = (
"Flushing the DNS cache by restarting " + service + " {result}"
)
if os.path.isfile(service_file):
if 0 != subprocess.call(
[systemctl, "status", service], stdout=subprocess.DEVNULL
):
continue
dns_cache_found = True
if subprocess.call(SUDO + [systemctl, "restart", service]):
print_failure(service_msg.format(result="failed"))
else:
print_success(service_msg.format(result="succeeded"))
restarted_services.append(service)
dns_clean_file = "/etc/init.d/dns-clean"
dns_clean_msg = "Flushing the DNS cache via dns-clean executable {result}"
@@ -1272,7 +1377,7 @@ def flush_dns_cache():
print_failure("Unable to determine DNS management tool.")
def remove_old_hosts_file(backup):
def remove_old_hosts_file(old_file_path, backup):
"""
Remove the old hosts file.
@@ -1285,14 +1390,12 @@ def remove_old_hosts_file(backup):
Whether or not to backup the existing hosts file.
"""
old_file_path = path_join_robust(BASEDIR_PATH, "hosts")
# Create if already removed, so remove won't raise an error.
open(old_file_path, "a").close()
if backup:
backup_file_path = path_join_robust(
BASEDIR_PATH, "hosts-{}".format(time.strftime("%Y-%m-%d-%H-%M-%S"))
backup_file_path = old_file_path + "-{}".format(
time.strftime("%Y-%m-%d-%H-%M-%S")
)
# Make a backup copy, marking the date in which the list was updated
@@ -1309,8 +1412,8 @@ def remove_old_hosts_file(backup):
def domain_to_idna(line):
"""
Encode a domain which is presente into a line into `idna`. This way we
avoid the most encoding issue.
Encode a domain that is present into a line into `idna`. This way we
avoid most encoding issues.
Parameters
----------
@@ -1324,7 +1427,7 @@ def domain_to_idna(line):
Notes
-----
- This function encode only the domain to `idna` format because in
- This function encodes only the domain to `idna` format because in
most cases, the encoding issue is due to a domain which looks like
`b'\xc9\xa2oogle.com'.decode('idna')`.
- About the splitting:
@@ -1407,33 +1510,37 @@ def maybe_copy_example_file(file_path):
shutil.copyfile(example_file_path, file_path)
def get_file_by_url(url):
def get_file_by_url(url, params=None, **kwargs):
"""
Get a file data located at a particular URL.
Retrieve the contents of the hosts file at the URL, then pass it through domain_to_idna().
Parameters are passed to the requests.get() function.
Parameters
----------
url : str
The URL at which to access the data.
url : str or bytes
URL for the new Request object.
params :
Dictionary, list of tuples or bytes to send in the query string for the Request.
kwargs :
Optional arguments that request takes.
Returns
-------
url_data : str or None
The data retrieved at that URL from the file. Returns None if the
attempted retrieval is unsuccessful.
Note
----
- BeautifulSoup is used in this case to avoid having to search in which
format we have to encode or decode data before parsing it to UTF-8.
"""
try:
f = urlopen(url)
soup = BeautifulSoup(f.read(), "lxml").get_text()
return "\n".join(list(map(domain_to_idna, soup.split("\n"))))
except Exception:
print("Problem getting file: ", url)
req = requests.get(url=url, params=params, **kwargs)
except requests.exceptions.RequestException:
print("Error retrieving data from {}".format(url))
return None
req.encoding = req.apparent_encoding
res_text = "\n".join([domain_to_idna(line) for line in req.text.split("\n")])
return res_text
def write_data(f, data):
@@ -1509,7 +1616,7 @@ def query_yes_no(question, default="yes"):
return reply == "yes"
def is_valid_domain_format(domain):
def is_valid_user_provided_domain_format(domain):
"""
Check whether a provided domain is valid.
+1 -1
View File
@@ -49,7 +49,7 @@ if not exist "%WINDIR%\System32\drivers\etc\hosts.skel" (
:UpdateHosts
:: Update hosts file
python updateHostsFile.py --auto --minimise
py updateHostsFile.py --auto --minimise
:: Copy over the new hosts file in-place
copy /y /v hosts "%WINDIR%\System32\drivers\etc\"
+6 -3
View File
@@ -26,7 +26,7 @@ def main():
"${fmtentries} | "
"[link](http://sbc.io/hosts/${location}hosts)"
)
with open(README_DATA_FILENAME, "r") as f:
with open(README_DATA_FILENAME, "r", encoding="utf-8", newline="\n") as f:
data = json.load(f)
keys = list(data.keys())
@@ -80,9 +80,12 @@ def main():
source_rows += t.substitute(this_row) + "\n"
with open(
os.path.join(data[key]["location"], README_FILENAME), "wt", encoding="utf-8"
os.path.join(data[key]["location"], README_FILENAME),
"wt",
encoding="utf-8",
newline="\n",
) as out:
for line in open(README_TEMPLATE):
for line in open(README_TEMPLATE, encoding="utf-8", newline="\n"):
line = line.replace(
"@GEN_DATE@", time.strftime("%B %d %Y", time.gmtime())
)