Merge pull request #2 from StevenBlack/master

Sync from master
This commit is contained in:
tyzbit
2018-03-23 10:46:26 -04:00
committed by GitHub
106 changed files with 1032201 additions and 165959 deletions
+11
View File
@@ -0,0 +1,11 @@
root = true
[*.py]
indent_style = space
trim_trailing_whitespace = true
indent_size = 4
end_of_line = LF
[*.md]
trim_trailing_whitespace = false
insert_final_newline = true
+21
View File
@@ -0,0 +1,21 @@
# Configuration for welcome - https://github.com/behaviorbot/welcome
# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome
# Comment to be posted to on first time issues
newIssueWelcomeComment: >
Hello! Thank you for opening your first issue in this repo. It’s people like you who make these host files better!
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
# Comment to be posted to on PRs from first time contributors in your repository
newPRWelcomeComment: >
Thank you for submitting this pull request! We’ll get back to you as soon as we can!
# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
# Comment to be posted to on pull requests merged by a first time user
firstPRMergeComment: >
Congratulations on merging your first pull request! 🎉🎉🎉
# It is recommend to include as many gifs and emojis as possible!
+7
View File
@@ -1,4 +1,11 @@
.idea
*.iml
myhosts
blacklist
whitelist
readmeData.json
hosts
hosts-*
/web.config
/__pycache__
/node_modules
+15
View File
@@ -0,0 +1,15 @@
{
"src": {
"tagName": "v%s"
},
"github": {
"release": true
},
"npm": {
"publish": false,
"publishPath": ".",
"tag": "latest",
"private": false,
"access": null
}
}
+34
View File
@@ -0,0 +1,34 @@
notifications:
email: false
language: generic
sudo: false
cache:
directories:
- $HOME/miniconda3
before_cache:
- rm -rf $HOME/miniconda3/pkgs/cache
- rm -rf $HOME/miniconda3/envs/hosts
os:
- linux
- osx
env:
- PYTHON_VERSION="2.7"
- PYTHON_VERSION="3.5"
- PYTHON_VERSION="3.6"
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
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,387 @@
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
# Unified hosts file with fakenews, gambling, porn, social extensions
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: **March 23 2018**.
* 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 68,995 entries.
### List of all hosts file variants
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
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) | 56,125 | [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) | 56,798 | [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) | 57,637 | [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) | 65,663 | [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,272 | [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) | 58,310 | [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) | 66,336 | [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) | 57,945 | [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) | 67,175 | [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) | 58,784 | [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) | 66,810 | [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) | 67,848 | [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) | 59,457 | [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) | 67,483 | [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) | 68,322 | [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) | 68,995 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and
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](http://www.malwaredomainlist.com/) | [raw](http://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](http://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)
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](http://someonewhocares.org) | How to make the internet not suck (as much). |[link](http://someonewhocares.org/hosts/) | [raw](http://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)
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 | 'non-commercial with attribution' | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
CoinBlocker | Simple lists that can help prevent cryptomining in the browser or other applications |[link](https://github.com/ZeroDot1/CoinBlockerLists) | [raw](https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser) | frequently | GPLv3 | [issues](https://github.com/ZeroDot1/CoinBlockerLists/issues)
tyzbit | Microsoft tracking domains. A fork of this repo providing additional data. |[link](https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts) | [raw](https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts) | rarely | | [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 | | [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://github.com/azet12/KADhosts) | [raw](https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt) | frequently | GPLv3 | [issues](https://github.com/azet12/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)
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 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)
## Extensions
The unified hosts file is extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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:
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
#### Using Python 2.7:
python updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
#### Command line options:
`--help`, or `-h`: display help.
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
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
editor.
**Mac OS X, iOS, Android, Linux**: `/etc/hosts` folder.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## Updating hosts file on Windows
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
```
updateHostsWindows.bat
```
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
**Windows Vista, 7**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
**Linux with systemd**: `sudo systemctl restart network.service`
**Fedora Linux**: `sudo systemctl restart NetworkManager.service`
**Arch Linux/Manjaro with Network Manager**: `sudo systemctl restart NetworkManager.service`
**Arch Linux/Manjaro with Wicd**: `sudo systemctl restart wicd.service`
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
The goals of this repo are to:
1. automatically combine high-quality lists of hosts,
2. provide easy extensions,
3. de-dupe the resultant combined list,
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
File diff suppressed because it is too large Load Diff
+386
View File
@@ -0,0 +1,386 @@
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
# Unified hosts file with fakenews, gambling, porn extensions
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: **March 23 2018**.
* Here's the [raw hosts file with fakenews, gambling, porn extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts) containing 67,848 entries.
### List of all hosts file variants
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
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) | 56,125 | [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) | 56,798 | [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) | 57,637 | [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) | 65,663 | [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,272 | [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) | 58,310 | [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) | 66,336 | [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) | 57,945 | [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) | 67,175 | [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) | 58,784 | [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) | 66,810 | [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) | 67,848 | [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) | 59,457 | [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) | 67,483 | [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) | 68,322 | [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) | 68,995 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and
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](http://www.malwaredomainlist.com/) | [raw](http://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](http://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)
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](http://someonewhocares.org) | How to make the internet not suck (as much). |[link](http://someonewhocares.org/hosts/) | [raw](http://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)
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 | 'non-commercial with attribution' | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
CoinBlocker | Simple lists that can help prevent cryptomining in the browser or other applications |[link](https://github.com/ZeroDot1/CoinBlockerLists) | [raw](https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser) | frequently | GPLv3 | [issues](https://github.com/ZeroDot1/CoinBlockerLists/issues)
tyzbit | Microsoft tracking domains. A fork of this repo providing additional data. |[link](https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts) | [raw](https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts) | rarely | | [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 | | [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://github.com/azet12/KADhosts) | [raw](https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt) | frequently | GPLv3 | [issues](https://github.com/azet12/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)
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)
## Extensions
The unified hosts file is extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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:
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
#### Using Python 2.7:
python updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
#### Command line options:
`--help`, or `-h`: display help.
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
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
editor.
**Mac OS X, iOS, Android, Linux**: `/etc/hosts` folder.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## Updating hosts file on Windows
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
```
updateHostsWindows.bat
```
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
**Windows Vista, 7**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
**Linux with systemd**: `sudo systemctl restart network.service`
**Fedora Linux**: `sudo systemctl restart NetworkManager.service`
**Arch Linux/Manjaro with Network Manager**: `sudo systemctl restart NetworkManager.service`
**Arch Linux/Manjaro with Wicd**: `sudo systemctl restart wicd.service`
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
The goals of this repo are to:
1. automatically combine high-quality lists of hosts,
2. provide easy extensions,
3. de-dupe the resultant combined list,
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,384 @@
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
# Unified hosts file with fakenews, gambling, social extensions
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: **March 23 2018**.
* Here's the [raw hosts file with fakenews, gambling, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) containing 59,457 entries.
### List of all hosts file variants
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
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) | 56,125 | [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) | 56,798 | [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) | 57,637 | [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) | 65,663 | [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,272 | [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) | 58,310 | [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) | 66,336 | [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) | 57,945 | [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) | 67,175 | [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) | 58,784 | [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) | 66,810 | [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) | 67,848 | [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) | 59,457 | [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) | 67,483 | [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) | 68,322 | [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) | 68,995 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and
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](http://www.malwaredomainlist.com/) | [raw](http://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](http://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)
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](http://someonewhocares.org) | How to make the internet not suck (as much). |[link](http://someonewhocares.org/hosts/) | [raw](http://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)
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 | 'non-commercial with attribution' | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
CoinBlocker | Simple lists that can help prevent cryptomining in the browser or other applications |[link](https://github.com/ZeroDot1/CoinBlockerLists) | [raw](https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser) | frequently | GPLv3 | [issues](https://github.com/ZeroDot1/CoinBlockerLists/issues)
tyzbit | Microsoft tracking domains. A fork of this repo providing additional data. |[link](https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts) | [raw](https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts) | rarely | | [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 | | [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://github.com/azet12/KADhosts) | [raw](https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt) | frequently | GPLv3 | [issues](https://github.com/azet12/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)
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)
## Extensions
The unified hosts file is extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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:
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
#### Using Python 2.7:
python updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
#### Command line options:
`--help`, or `-h`: display help.
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
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
editor.
**Mac OS X, iOS, Android, Linux**: `/etc/hosts` folder.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## Updating hosts file on Windows
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
```
updateHostsWindows.bat
```
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
**Windows Vista, 7**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
**Linux with systemd**: `sudo systemctl restart network.service`
**Fedora Linux**: `sudo systemctl restart NetworkManager.service`
**Arch Linux/Manjaro with Network Manager**: `sudo systemctl restart NetworkManager.service`
**Arch Linux/Manjaro with Wicd**: `sudo systemctl restart wicd.service`
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
The goals of this repo are to:
1. automatically combine high-quality lists of hosts,
2. provide easy extensions,
3. de-dupe the resultant combined list,
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
File diff suppressed because it is too large Load Diff
+383
View File
@@ -0,0 +1,383 @@
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
# Unified hosts file with fakenews, gambling extensions
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: **March 23 2018**.
* Here's the [raw hosts file with fakenews, gambling extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts) containing 58,310 entries.
### List of all hosts file variants
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
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) | 56,125 | [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) | 56,798 | [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) | 57,637 | [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) | 65,663 | [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,272 | [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) | 58,310 | [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) | 66,336 | [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) | 57,945 | [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) | 67,175 | [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) | 58,784 | [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) | 66,810 | [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) | 67,848 | [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) | 59,457 | [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) | 67,483 | [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) | 68,322 | [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) | 68,995 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and
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](http://www.malwaredomainlist.com/) | [raw](http://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](http://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)
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](http://someonewhocares.org) | How to make the internet not suck (as much). |[link](http://someonewhocares.org/hosts/) | [raw](http://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)
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 | 'non-commercial with attribution' | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
CoinBlocker | Simple lists that can help prevent cryptomining in the browser or other applications |[link](https://github.com/ZeroDot1/CoinBlockerLists) | [raw](https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser) | frequently | GPLv3 | [issues](https://github.com/ZeroDot1/CoinBlockerLists/issues)
tyzbit | Microsoft tracking domains. A fork of this repo providing additional data. |[link](https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts) | [raw](https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts) | rarely | | [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 | | [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://github.com/azet12/KADhosts) | [raw](https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt) | frequently | GPLv3 | [issues](https://github.com/azet12/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)
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 extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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:
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
#### Using Python 2.7:
python updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
#### Command line options:
`--help`, or `-h`: display help.
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
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
editor.
**Mac OS X, iOS, Android, Linux**: `/etc/hosts` folder.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## Updating hosts file on Windows
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
```
updateHostsWindows.bat
```
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
**Windows Vista, 7**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
**Linux with systemd**: `sudo systemctl restart network.service`
**Fedora Linux**: `sudo systemctl restart NetworkManager.service`
**Arch Linux/Manjaro with Network Manager**: `sudo systemctl restart NetworkManager.service`
**Arch Linux/Manjaro with Wicd**: `sudo systemctl restart wicd.service`
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
The goals of this repo are to:
1. automatically combine high-quality lists of hosts,
2. provide easy extensions,
3. de-dupe the resultant combined list,
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
File diff suppressed because it is too large Load Diff
+386
View File
@@ -0,0 +1,386 @@
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
# Unified hosts file with fakenews, porn, social extensions
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: **March 23 2018**.
* Here's the [raw hosts file with fakenews, porn, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social/hosts) containing 67,483 entries.
### List of all hosts file variants
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
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) | 56,125 | [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) | 56,798 | [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) | 57,637 | [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) | 65,663 | [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,272 | [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) | 58,310 | [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) | 66,336 | [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) | 57,945 | [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) | 67,175 | [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) | 58,784 | [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) | 66,810 | [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) | 67,848 | [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) | 59,457 | [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) | 67,483 | [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) | 68,322 | [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) | 68,995 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and
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](http://www.malwaredomainlist.com/) | [raw](http://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](http://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)
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](http://someonewhocares.org) | How to make the internet not suck (as much). |[link](http://someonewhocares.org/hosts/) | [raw](http://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)
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 | 'non-commercial with attribution' | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
CoinBlocker | Simple lists that can help prevent cryptomining in the browser or other applications |[link](https://github.com/ZeroDot1/CoinBlockerLists) | [raw](https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser) | frequently | GPLv3 | [issues](https://github.com/ZeroDot1/CoinBlockerLists/issues)
tyzbit | Microsoft tracking domains. A fork of this repo providing additional data. |[link](https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts) | [raw](https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts) | rarely | | [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 | | [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://github.com/azet12/KADhosts) | [raw](https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt) | frequently | GPLv3 | [issues](https://github.com/azet12/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)
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 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)
## Extensions
The unified hosts file is extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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:
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
#### Using Python 2.7:
python updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
#### Command line options:
`--help`, or `-h`: display help.
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
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
editor.
**Mac OS X, iOS, Android, Linux**: `/etc/hosts` folder.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## Updating hosts file on Windows
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
```
updateHostsWindows.bat
```
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
**Windows Vista, 7**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
**Linux with systemd**: `sudo systemctl restart network.service`
**Fedora Linux**: `sudo systemctl restart NetworkManager.service`
**Arch Linux/Manjaro with Network Manager**: `sudo systemctl restart NetworkManager.service`
**Arch Linux/Manjaro with Wicd**: `sudo systemctl restart wicd.service`
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
The goals of this repo are to:
1. automatically combine high-quality lists of hosts,
2. provide easy extensions,
3. de-dupe the resultant combined list,
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
File diff suppressed because it is too large Load Diff
+385
View File
@@ -0,0 +1,385 @@
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
# Unified hosts file with fakenews, porn extensions
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: **March 23 2018**.
* Here's the [raw hosts file with fakenews, porn extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn/hosts) containing 66,336 entries.
### List of all hosts file variants
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
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) | 56,125 | [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) | 56,798 | [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) | 57,637 | [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) | 65,663 | [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,272 | [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) | 58,310 | [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) | 66,336 | [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) | 57,945 | [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) | 67,175 | [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) | 58,784 | [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) | 66,810 | [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) | 67,848 | [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) | 59,457 | [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) | 67,483 | [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) | 68,322 | [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) | 68,995 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and
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](http://www.malwaredomainlist.com/) | [raw](http://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](http://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)
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](http://someonewhocares.org) | How to make the internet not suck (as much). |[link](http://someonewhocares.org/hosts/) | [raw](http://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)
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 | 'non-commercial with attribution' | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
CoinBlocker | Simple lists that can help prevent cryptomining in the browser or other applications |[link](https://github.com/ZeroDot1/CoinBlockerLists) | [raw](https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser) | frequently | GPLv3 | [issues](https://github.com/ZeroDot1/CoinBlockerLists/issues)
tyzbit | Microsoft tracking domains. A fork of this repo providing additional data. |[link](https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts) | [raw](https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts) | rarely | | [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 | | [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://github.com/azet12/KADhosts) | [raw](https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt) | frequently | GPLv3 | [issues](https://github.com/azet12/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)
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)
## Extensions
The unified hosts file is extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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:
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
#### Using Python 2.7:
python updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
#### Command line options:
`--help`, or `-h`: display help.
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
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
editor.
**Mac OS X, iOS, Android, Linux**: `/etc/hosts` folder.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## Updating hosts file on Windows
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
```
updateHostsWindows.bat
```
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
**Windows Vista, 7**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
**Linux with systemd**: `sudo systemctl restart network.service`
**Fedora Linux**: `sudo systemctl restart NetworkManager.service`
**Arch Linux/Manjaro with Network Manager**: `sudo systemctl restart NetworkManager.service`
**Arch Linux/Manjaro with Wicd**: `sudo systemctl restart wicd.service`
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
The goals of this repo are to:
1. automatically combine high-quality lists of hosts,
2. provide easy extensions,
3. de-dupe the resultant combined list,
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
File diff suppressed because it is too large Load Diff
+383
View File
@@ -0,0 +1,383 @@
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
# Unified hosts file with fakenews, social extensions
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: **March 23 2018**.
* Here's the [raw hosts file with fakenews, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social/hosts) containing 57,945 entries.
### List of all hosts file variants
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
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) | 56,125 | [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) | 56,798 | [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) | 57,637 | [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) | 65,663 | [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,272 | [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) | 58,310 | [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) | 66,336 | [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) | 57,945 | [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) | 67,175 | [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) | 58,784 | [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) | 66,810 | [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) | 67,848 | [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) | 59,457 | [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) | 67,483 | [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) | 68,322 | [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) | 68,995 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and
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](http://www.malwaredomainlist.com/) | [raw](http://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](http://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)
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](http://someonewhocares.org) | How to make the internet not suck (as much). |[link](http://someonewhocares.org/hosts/) | [raw](http://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)
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 | 'non-commercial with attribution' | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
CoinBlocker | Simple lists that can help prevent cryptomining in the browser or other applications |[link](https://github.com/ZeroDot1/CoinBlockerLists) | [raw](https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser) | frequently | GPLv3 | [issues](https://github.com/ZeroDot1/CoinBlockerLists/issues)
tyzbit | Microsoft tracking domains. A fork of this repo providing additional data. |[link](https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts) | [raw](https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts) | rarely | | [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 | | [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://github.com/azet12/KADhosts) | [raw](https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt) | frequently | GPLv3 | [issues](https://github.com/azet12/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)
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)
## Extensions
The unified hosts file is extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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:
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
#### Using Python 2.7:
python updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
#### Command line options:
`--help`, or `-h`: display help.
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
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
editor.
**Mac OS X, iOS, Android, Linux**: `/etc/hosts` folder.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## Updating hosts file on Windows
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
```
updateHostsWindows.bat
```
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
**Windows Vista, 7**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
**Linux with systemd**: `sudo systemctl restart network.service`
**Fedora Linux**: `sudo systemctl restart NetworkManager.service`
**Arch Linux/Manjaro with Network Manager**: `sudo systemctl restart NetworkManager.service`
**Arch Linux/Manjaro with Wicd**: `sudo systemctl restart wicd.service`
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
The goals of this repo are to:
1. automatically combine high-quality lists of hosts,
2. provide easy extensions,
3. de-dupe the resultant combined list,
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
File diff suppressed because it is too large Load Diff
+382
View File
@@ -0,0 +1,382 @@
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
# Unified hosts file with fakenews extensions
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: **March 23 2018**.
* Here's the [raw hosts file with fakenews extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts) containing 56,798 entries.
### List of all hosts file variants
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
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) | 56,125 | [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) | 56,798 | [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) | 57,637 | [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) | 65,663 | [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,272 | [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) | 58,310 | [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) | 66,336 | [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) | 57,945 | [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) | 67,175 | [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) | 58,784 | [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) | 66,810 | [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) | 67,848 | [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) | 59,457 | [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) | 67,483 | [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) | 68,322 | [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) | 68,995 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and
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](http://www.malwaredomainlist.com/) | [raw](http://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](http://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)
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](http://someonewhocares.org) | How to make the internet not suck (as much). |[link](http://someonewhocares.org/hosts/) | [raw](http://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)
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 | 'non-commercial with attribution' | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
CoinBlocker | Simple lists that can help prevent cryptomining in the browser or other applications |[link](https://github.com/ZeroDot1/CoinBlockerLists) | [raw](https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser) | frequently | GPLv3 | [issues](https://github.com/ZeroDot1/CoinBlockerLists/issues)
tyzbit | Microsoft tracking domains. A fork of this repo providing additional data. |[link](https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts) | [raw](https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts) | rarely | | [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 | | [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://github.com/azet12/KADhosts) | [raw](https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt) | frequently | GPLv3 | [issues](https://github.com/azet12/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)
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 extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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:
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
#### Using Python 2.7:
python updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
#### Command line options:
`--help`, or `-h`: display help.
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
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
editor.
**Mac OS X, iOS, Android, Linux**: `/etc/hosts` folder.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## Updating hosts file on Windows
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
```
updateHostsWindows.bat
```
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
**Windows Vista, 7**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
**Linux with systemd**: `sudo systemctl restart network.service`
**Fedora Linux**: `sudo systemctl restart NetworkManager.service`
**Arch Linux/Manjaro with Network Manager**: `sudo systemctl restart NetworkManager.service`
**Arch Linux/Manjaro with Wicd**: `sudo systemctl restart wicd.service`
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
The goals of this repo are to:
1. automatically combine high-quality lists of hosts,
2. provide easy extensions,
3. de-dupe the resultant combined list,
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
File diff suppressed because it is too large Load Diff
+259 -84
View File
@@ -1,49 +1,99 @@
#Unified hosts file with gambling, porn, social extensions
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
This repository consolidates several reputable `hosts` files, and merges them into a unified hosts file
with duplicates removed. This repo provides several hosts files tailored to you need to block.
# Unified hosts file with gambling, porn, social extensions
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: **March 23 2018**.
* Here's the [raw hosts file with gambling, porn, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) containing 68,322 entries.
* Last updated: **June 04 2016**.
* Here's the [raw hosts file with gambling, porn, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts) containing 33,267 entries.
### List of all hosts file variants
Host file recipe | Readme | Raw hosts | Unique domains
---------------- |:------:|:---------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 27,050
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) | 27,764
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) | 32,323
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) | 27,280
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) | 33,037
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) | 27,994
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) | 32,553
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) | 33,267
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
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) | 56,125 | [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) | 56,798 | [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) | 57,637 | [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) | 65,663 | [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,272 | [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) | 58,310 | [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) | 66,336 | [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) | 57,945 | [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) | 67,175 | [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) | 58,784 | [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) | 66,810 | [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) | 67,848 | [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) | 59,457 | [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) | 67,483 | [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) | 68,322 | [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) | 68,995 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless of OS.
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified here
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and
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](http://www.malwaredomainlist.com/) | [raw](http://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](http://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)
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](http://someonewhocares.org) | How to make the internet not suck (as much). |[link](http://someonewhocares.org/hosts/) | [raw](http://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)
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 | 'non-commercial with attribution' | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
CoinBlocker | Simple lists that can help prevent cryptomining in the browser or other applications |[link](https://github.com/ZeroDot1/CoinBlockerLists) | [raw](https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser) | frequently | GPLv3 | [issues](https://github.com/ZeroDot1/CoinBlockerLists/issues)
tyzbit | Microsoft tracking domains. A fork of this repo providing additional data. |[link](https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts) | [raw](https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts) | rarely | | [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 | | [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://github.com/azet12/KADhosts) | [raw](https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt) | frequently | GPLv3 | [issues](https://github.com/azet12/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)
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 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)
Updated `hosts` files from the following locations are always unified and included:
* The [Adaway hosts file](http://adaway.org/hosts.txt), updated regularly.
* MVPs.org Hosts file at [http://winhelp2002.mvps.org/hosts.htm](http://winhelp2002.mvps.org/hosts.htm), updated
monthly, or thereabouts.
* Dan Pollock at [http://someonewhocares.org/hosts/](http://someonewhocares.org/hosts/) updated regularly.
* Malware Domain List at [http://www.malwaredomainlist.com/](http://www.malwaredomainlist.com/), updated regularly.
* Peter Lowe at [http://pgl.yoyo.org/adservers/](http://pgl.yoyo.org/adservers/), updated regularly.
* My own small list in raw form [here](https://raw.github.com/StevenBlack/hosts/master/data/StevenBlack/hosts).
## Extensions
The unified hosts file is extensible. You manage extensions by curating the `extensions/` folder tree.
See the `social`, `gambling`, and `porn` extension which are included in this repo, for example.
The unified hosts file is extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
The `updateHostsFile.py` script, which is python 2.7 and Python 3-compatible, will generate a unified hosts file
based on the sources in the local `data/` subfolder. The script will prompt you Whether it should fetch updated
versions (from locations defined by the update.info text file in each source's folder), otherwise it will use the
`hosts` file that's already there.
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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
@@ -62,78 +112,143 @@ versions (from locations defined by the update.info text file in each source's f
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace` flag.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate over them.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names of subfolders below the `extensions` folder
containing additional category-specific hosts files to include in the amalgamation. Example: `--extensions porn` or
`-e social porn`.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the target. Default is `0.0.0.0`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file in a subfolder. If the subfolder does not
exist, it will be created.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard section, at the top containing lines like `127.0.0.1 localhost`. This is useful for configuring proximate DNS services on the local network.
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/` folder, and specify its update url in
`update.info` file.
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the `extensions/` folder. Again the url in
`update.info` controls where this extension finds its updates.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents of this file are prepended to the
unified hosts file during the update process.
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo from `origin` in the future.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts file.
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist `google-analytics.com`, that domain and all its
subdomains won't be merged into the final hosts file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo
from `origin` in the future.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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 used by all operating
systems to map hostnames to IP addresses.
A hosts file, named `hosts` (with no file extension), is a plain-text file
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`. Therefore if a domain name is
resolved by the `hosts` file, the request never leaves your computer.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware, and other irritants.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these lines to your hosts
file will do it:
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
127.0.0.1 ad.ae.doubleclick.net
127.0.0.1 ad.ar.doubleclick.net
127.0.0.1 ad.at.doubleclick.net
127.0.0.1 ad.au.doubleclick.net
127.0.0.1 ad.be.doubleclick.net
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Using `0.0.0.0` is faster because you don't have to wait for a timeout. It also does not interfere
with a web server that may be running on the local PC.
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
We tried that. Using `0` doesn't work universally.
@@ -147,17 +262,22 @@ editor.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## 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.
## Updating hosts file on Windows
### Mac OS X
Open a Terminal and run:
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
`sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder`
```
updateHostsWindows.bat
```
### Windows
Open a Command Prompt:
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
@@ -167,11 +287,38 @@ Open a Command Prompt:
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
and run:
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
`ipconfig /flushdns`
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
@@ -186,6 +333,19 @@ Open a Terminal and run with root privileges:
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
@@ -199,13 +359,28 @@ The goals of this repo are to:
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A hosts source should be frequently
updated by its maintainers with both additions and removals. The larger the hosts file, the higher the level of
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](http://hosts-file.net) is **not** included
here because it is very large (300,000+ entries) and doesn't currently display a corresponding high level of curation
activity.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile devices under a variety of operating
systems.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
+58702 -22081
View File
File diff suppressed because it is too large Load Diff
+258 -84
View File
@@ -1,49 +1,98 @@
#Unified hosts file with gambling, porn extensions
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
This repository consolidates several reputable `hosts` files, and merges them into a unified hosts file
with duplicates removed. This repo provides several hosts files tailored to you need to block.
# Unified hosts file with gambling, porn extensions
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: **March 23 2018**.
* Here's the [raw hosts file with gambling, porn extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) containing 67,175 entries.
* Last updated: **June 04 2016**.
* Here's the [raw hosts file with gambling, porn extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts) containing 33,037 entries.
### List of all hosts file variants
Host file recipe | Readme | Raw hosts | Unique domains
---------------- |:------:|:---------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 27,050
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) | 27,764
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) | 32,323
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) | 27,280
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) | 33,037
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) | 27,994
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) | 32,553
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) | 33,267
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
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) | 56,125 | [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) | 56,798 | [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) | 57,637 | [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) | 65,663 | [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,272 | [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) | 58,310 | [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) | 66,336 | [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) | 57,945 | [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) | 67,175 | [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) | 58,784 | [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) | 66,810 | [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) | 67,848 | [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) | 59,457 | [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) | 67,483 | [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) | 68,322 | [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) | 68,995 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless of OS.
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified here
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and
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](http://www.malwaredomainlist.com/) | [raw](http://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](http://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)
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](http://someonewhocares.org) | How to make the internet not suck (as much). |[link](http://someonewhocares.org/hosts/) | [raw](http://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)
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 | 'non-commercial with attribution' | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
CoinBlocker | Simple lists that can help prevent cryptomining in the browser or other applications |[link](https://github.com/ZeroDot1/CoinBlockerLists) | [raw](https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser) | frequently | GPLv3 | [issues](https://github.com/ZeroDot1/CoinBlockerLists/issues)
tyzbit | Microsoft tracking domains. A fork of this repo providing additional data. |[link](https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts) | [raw](https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts) | rarely | | [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 | | [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://github.com/azet12/KADhosts) | [raw](https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt) | frequently | GPLv3 | [issues](https://github.com/azet12/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)
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)
Updated `hosts` files from the following locations are always unified and included:
* The [Adaway hosts file](http://adaway.org/hosts.txt), updated regularly.
* MVPs.org Hosts file at [http://winhelp2002.mvps.org/hosts.htm](http://winhelp2002.mvps.org/hosts.htm), updated
monthly, or thereabouts.
* Dan Pollock at [http://someonewhocares.org/hosts/](http://someonewhocares.org/hosts/) updated regularly.
* Malware Domain List at [http://www.malwaredomainlist.com/](http://www.malwaredomainlist.com/), updated regularly.
* Peter Lowe at [http://pgl.yoyo.org/adservers/](http://pgl.yoyo.org/adservers/), updated regularly.
* My own small list in raw form [here](https://raw.github.com/StevenBlack/hosts/master/data/StevenBlack/hosts).
## Extensions
The unified hosts file is extensible. You manage extensions by curating the `extensions/` folder tree.
See the `social`, `gambling`, and `porn` extension which are included in this repo, for example.
The unified hosts file is extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
The `updateHostsFile.py` script, which is python 2.7 and Python 3-compatible, will generate a unified hosts file
based on the sources in the local `data/` subfolder. The script will prompt you Whether it should fetch updated
versions (from locations defined by the update.info text file in each source's folder), otherwise it will use the
`hosts` file that's already there.
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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
@@ -62,78 +111,143 @@ versions (from locations defined by the update.info text file in each source's f
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace` flag.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate over them.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names of subfolders below the `extensions` folder
containing additional category-specific hosts files to include in the amalgamation. Example: `--extensions porn` or
`-e social porn`.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the target. Default is `0.0.0.0`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file in a subfolder. If the subfolder does not
exist, it will be created.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard section, at the top containing lines like `127.0.0.1 localhost`. This is useful for configuring proximate DNS services on the local network.
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/` folder, and specify its update url in
`update.info` file.
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the `extensions/` folder. Again the url in
`update.info` controls where this extension finds its updates.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents of this file are prepended to the
unified hosts file during the update process.
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo from `origin` in the future.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts file.
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist `google-analytics.com`, that domain and all its
subdomains won't be merged into the final hosts file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo
from `origin` in the future.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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 used by all operating
systems to map hostnames to IP addresses.
A hosts file, named `hosts` (with no file extension), is a plain-text file
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`. Therefore if a domain name is
resolved by the `hosts` file, the request never leaves your computer.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware, and other irritants.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these lines to your hosts
file will do it:
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
127.0.0.1 ad.ae.doubleclick.net
127.0.0.1 ad.ar.doubleclick.net
127.0.0.1 ad.at.doubleclick.net
127.0.0.1 ad.au.doubleclick.net
127.0.0.1 ad.be.doubleclick.net
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Using `0.0.0.0` is faster because you don't have to wait for a timeout. It also does not interfere
with a web server that may be running on the local PC.
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
We tried that. Using `0` doesn't work universally.
@@ -147,17 +261,22 @@ editor.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## 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.
## Updating hosts file on Windows
### Mac OS X
Open a Terminal and run:
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
`sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder`
```
updateHostsWindows.bat
```
### Windows
Open a Command Prompt:
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
@@ -167,11 +286,38 @@ Open a Command Prompt:
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
and run:
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
`ipconfig /flushdns`
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
@@ -186,6 +332,19 @@ Open a Terminal and run with root privileges:
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
@@ -199,13 +358,28 @@ The goals of this repo are to:
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A hosts source should be frequently
updated by its maintainers with both additions and removals. The larger the hosts file, the higher the level of
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](http://hosts-file.net) is **not** included
here because it is very large (300,000+ entries) and doesn't currently display a corresponding high level of curation
activity.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile devices under a variety of operating
systems.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
+50659 -17393
View File
File diff suppressed because it is too large Load Diff
+256 -84
View File
@@ -1,49 +1,96 @@
#Unified hosts file with gambling, social extensions
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
This repository consolidates several reputable `hosts` files, and merges them into a unified hosts file
with duplicates removed. This repo provides several hosts files tailored to you need to block.
# Unified hosts file with gambling, social extensions
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: **March 23 2018**.
* Here's the [raw hosts file with gambling, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) containing 58,784 entries.
* Last updated: **June 04 2016**.
* Here's the [raw hosts file with gambling, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts) containing 27,994 entries.
### List of all hosts file variants
Host file recipe | Readme | Raw hosts | Unique domains
---------------- |:------:|:---------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 27,050
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) | 27,764
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) | 32,323
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) | 27,280
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) | 33,037
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) | 27,994
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) | 32,553
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) | 33,267
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
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) | 56,125 | [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) | 56,798 | [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) | 57,637 | [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) | 65,663 | [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,272 | [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) | 58,310 | [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) | 66,336 | [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) | 57,945 | [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) | 67,175 | [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) | 58,784 | [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) | 66,810 | [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) | 67,848 | [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) | 59,457 | [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) | 67,483 | [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) | 68,322 | [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) | 68,995 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless of OS.
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified here
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and
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](http://www.malwaredomainlist.com/) | [raw](http://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](http://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)
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](http://someonewhocares.org) | How to make the internet not suck (as much). |[link](http://someonewhocares.org/hosts/) | [raw](http://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)
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 | 'non-commercial with attribution' | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
CoinBlocker | Simple lists that can help prevent cryptomining in the browser or other applications |[link](https://github.com/ZeroDot1/CoinBlockerLists) | [raw](https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser) | frequently | GPLv3 | [issues](https://github.com/ZeroDot1/CoinBlockerLists/issues)
tyzbit | Microsoft tracking domains. A fork of this repo providing additional data. |[link](https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts) | [raw](https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts) | rarely | | [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 | | [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://github.com/azet12/KADhosts) | [raw](https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt) | frequently | GPLv3 | [issues](https://github.com/azet12/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)
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)
Updated `hosts` files from the following locations are always unified and included:
* The [Adaway hosts file](http://adaway.org/hosts.txt), updated regularly.
* MVPs.org Hosts file at [http://winhelp2002.mvps.org/hosts.htm](http://winhelp2002.mvps.org/hosts.htm), updated
monthly, or thereabouts.
* Dan Pollock at [http://someonewhocares.org/hosts/](http://someonewhocares.org/hosts/) updated regularly.
* Malware Domain List at [http://www.malwaredomainlist.com/](http://www.malwaredomainlist.com/), updated regularly.
* Peter Lowe at [http://pgl.yoyo.org/adservers/](http://pgl.yoyo.org/adservers/), updated regularly.
* My own small list in raw form [here](https://raw.github.com/StevenBlack/hosts/master/data/StevenBlack/hosts).
## Extensions
The unified hosts file is extensible. You manage extensions by curating the `extensions/` folder tree.
See the `social`, `gambling`, and `porn` extension which are included in this repo, for example.
The unified hosts file is extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
The `updateHostsFile.py` script, which is python 2.7 and Python 3-compatible, will generate a unified hosts file
based on the sources in the local `data/` subfolder. The script will prompt you Whether it should fetch updated
versions (from locations defined by the update.info text file in each source's folder), otherwise it will use the
`hosts` file that's already there.
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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
@@ -62,78 +109,143 @@ versions (from locations defined by the update.info text file in each source's f
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace` flag.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate over them.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names of subfolders below the `extensions` folder
containing additional category-specific hosts files to include in the amalgamation. Example: `--extensions porn` or
`-e social porn`.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the target. Default is `0.0.0.0`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file in a subfolder. If the subfolder does not
exist, it will be created.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard section, at the top containing lines like `127.0.0.1 localhost`. This is useful for configuring proximate DNS services on the local network.
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/` folder, and specify its update url in
`update.info` file.
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the `extensions/` folder. Again the url in
`update.info` controls where this extension finds its updates.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents of this file are prepended to the
unified hosts file during the update process.
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo from `origin` in the future.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts file.
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist `google-analytics.com`, that domain and all its
subdomains won't be merged into the final hosts file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo
from `origin` in the future.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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 used by all operating
systems to map hostnames to IP addresses.
A hosts file, named `hosts` (with no file extension), is a plain-text file
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`. Therefore if a domain name is
resolved by the `hosts` file, the request never leaves your computer.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware, and other irritants.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these lines to your hosts
file will do it:
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
127.0.0.1 ad.ae.doubleclick.net
127.0.0.1 ad.ar.doubleclick.net
127.0.0.1 ad.at.doubleclick.net
127.0.0.1 ad.au.doubleclick.net
127.0.0.1 ad.be.doubleclick.net
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Using `0.0.0.0` is faster because you don't have to wait for a timeout. It also does not interfere
with a web server that may be running on the local PC.
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
We tried that. Using `0` doesn't work universally.
@@ -147,17 +259,22 @@ editor.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## 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.
## Updating hosts file on Windows
### Mac OS X
Open a Terminal and run:
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
`sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder`
```
updateHostsWindows.bat
```
### Windows
Open a Command Prompt:
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
@@ -167,11 +284,38 @@ Open a Command Prompt:
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
and run:
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
`ipconfig /flushdns`
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
@@ -186,6 +330,19 @@ Open a Terminal and run with root privileges:
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
@@ -199,13 +356,28 @@ The goals of this repo are to:
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A hosts source should be frequently
updated by its maintainers with both additions and removals. The larger the hosts file, the higher the level of
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](http://hosts-file.net) is **not** included
here because it is very large (300,000+ entries) and doesn't currently display a corresponding high level of curation
activity.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile devices under a variety of operating
systems.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
+49705 -17378
View File
File diff suppressed because it is too large Load Diff
+255 -84
View File
@@ -1,49 +1,95 @@
#Unified hosts file with gambling extensions
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
This repository consolidates several reputable `hosts` files, and merges them into a unified hosts file
with duplicates removed. This repo provides several hosts files tailored to you need to block.
# Unified hosts file with gambling extensions
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: **March 23 2018**.
* Here's the [raw hosts file with gambling extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) containing 57,637 entries.
* Last updated: **June 04 2016**.
* Here's the [raw hosts file with gambling extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts) containing 27,764 entries.
### List of all hosts file variants
Host file recipe | Readme | Raw hosts | Unique domains
---------------- |:------:|:---------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 27,050
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) | 27,764
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) | 32,323
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) | 27,280
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) | 33,037
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) | 27,994
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) | 32,553
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) | 33,267
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
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) | 56,125 | [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) | 56,798 | [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) | 57,637 | [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) | 65,663 | [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,272 | [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) | 58,310 | [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) | 66,336 | [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) | 57,945 | [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) | 67,175 | [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) | 58,784 | [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) | 66,810 | [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) | 67,848 | [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) | 59,457 | [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) | 67,483 | [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) | 68,322 | [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) | 68,995 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless of OS.
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified here
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and
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](http://www.malwaredomainlist.com/) | [raw](http://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](http://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)
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](http://someonewhocares.org) | How to make the internet not suck (as much). |[link](http://someonewhocares.org/hosts/) | [raw](http://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)
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 | 'non-commercial with attribution' | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
CoinBlocker | Simple lists that can help prevent cryptomining in the browser or other applications |[link](https://github.com/ZeroDot1/CoinBlockerLists) | [raw](https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser) | frequently | GPLv3 | [issues](https://github.com/ZeroDot1/CoinBlockerLists/issues)
tyzbit | Microsoft tracking domains. A fork of this repo providing additional data. |[link](https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts) | [raw](https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts) | rarely | | [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 | | [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://github.com/azet12/KADhosts) | [raw](https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt) | frequently | GPLv3 | [issues](https://github.com/azet12/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)
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)
Updated `hosts` files from the following locations are always unified and included:
* The [Adaway hosts file](http://adaway.org/hosts.txt), updated regularly.
* MVPs.org Hosts file at [http://winhelp2002.mvps.org/hosts.htm](http://winhelp2002.mvps.org/hosts.htm), updated
monthly, or thereabouts.
* Dan Pollock at [http://someonewhocares.org/hosts/](http://someonewhocares.org/hosts/) updated regularly.
* Malware Domain List at [http://www.malwaredomainlist.com/](http://www.malwaredomainlist.com/), updated regularly.
* Peter Lowe at [http://pgl.yoyo.org/adservers/](http://pgl.yoyo.org/adservers/), updated regularly.
* My own small list in raw form [here](https://raw.github.com/StevenBlack/hosts/master/data/StevenBlack/hosts).
## Extensions
The unified hosts file is extensible. You manage extensions by curating the `extensions/` folder tree.
See the `social`, `gambling`, and `porn` extension which are included in this repo, for example.
The unified hosts file is extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
The `updateHostsFile.py` script, which is python 2.7 and Python 3-compatible, will generate a unified hosts file
based on the sources in the local `data/` subfolder. The script will prompt you Whether it should fetch updated
versions (from locations defined by the update.info text file in each source's folder), otherwise it will use the
`hosts` file that's already there.
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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
@@ -62,78 +108,143 @@ versions (from locations defined by the update.info text file in each source's f
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace` flag.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate over them.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names of subfolders below the `extensions` folder
containing additional category-specific hosts files to include in the amalgamation. Example: `--extensions porn` or
`-e social porn`.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the target. Default is `0.0.0.0`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file in a subfolder. If the subfolder does not
exist, it will be created.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard section, at the top containing lines like `127.0.0.1 localhost`. This is useful for configuring proximate DNS services on the local network.
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/` folder, and specify its update url in
`update.info` file.
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the `extensions/` folder. Again the url in
`update.info` controls where this extension finds its updates.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents of this file are prepended to the
unified hosts file during the update process.
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo from `origin` in the future.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts file.
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist `google-analytics.com`, that domain and all its
subdomains won't be merged into the final hosts file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo
from `origin` in the future.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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 used by all operating
systems to map hostnames to IP addresses.
A hosts file, named `hosts` (with no file extension), is a plain-text file
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`. Therefore if a domain name is
resolved by the `hosts` file, the request never leaves your computer.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware, and other irritants.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these lines to your hosts
file will do it:
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
127.0.0.1 ad.ae.doubleclick.net
127.0.0.1 ad.ar.doubleclick.net
127.0.0.1 ad.at.doubleclick.net
127.0.0.1 ad.au.doubleclick.net
127.0.0.1 ad.be.doubleclick.net
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Using `0.0.0.0` is faster because you don't have to wait for a timeout. It also does not interfere
with a web server that may be running on the local PC.
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
We tried that. Using `0` doesn't work universally.
@@ -147,17 +258,22 @@ editor.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## 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.
## Updating hosts file on Windows
### Mac OS X
Open a Terminal and run:
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
`sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder`
```
updateHostsWindows.bat
```
### Windows
Open a Command Prompt:
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
@@ -167,11 +283,38 @@ Open a Command Prompt:
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
and run:
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
`ipconfig /flushdns`
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
@@ -186,6 +329,19 @@ Open a Terminal and run with root privileges:
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
@@ -199,13 +355,28 @@ The goals of this repo are to:
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A hosts source should be frequently
updated by its maintainers with both additions and removals. The larger the hosts file, the higher the level of
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](http://hosts-file.net) is **not** included
here because it is very large (300,000+ entries) and doesn't currently display a corresponding high level of curation
activity.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile devices under a variety of operating
systems.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
+58286 -21533
View File
File diff suppressed because it is too large Load Diff
+258 -84
View File
@@ -1,49 +1,98 @@
#Unified hosts file with porn, social extensions
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
This repository consolidates several reputable `hosts` files, and merges them into a unified hosts file
with duplicates removed. This repo provides several hosts files tailored to you need to block.
# Unified hosts file with porn, social extensions
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: **March 23 2018**.
* Here's the [raw hosts file with porn, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) containing 66,810 entries.
* Last updated: **June 04 2016**.
* Here's the [raw hosts file with porn, social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts) containing 32,553 entries.
### List of all hosts file variants
Host file recipe | Readme | Raw hosts | Unique domains
---------------- |:------:|:---------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 27,050
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) | 27,764
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) | 32,323
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) | 27,280
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) | 33,037
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) | 27,994
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) | 32,553
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) | 33,267
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
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) | 56,125 | [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) | 56,798 | [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) | 57,637 | [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) | 65,663 | [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,272 | [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) | 58,310 | [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) | 66,336 | [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) | 57,945 | [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) | 67,175 | [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) | 58,784 | [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) | 66,810 | [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) | 67,848 | [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) | 59,457 | [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) | 67,483 | [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) | 68,322 | [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) | 68,995 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless of OS.
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified here
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and
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](http://www.malwaredomainlist.com/) | [raw](http://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](http://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)
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](http://someonewhocares.org) | How to make the internet not suck (as much). |[link](http://someonewhocares.org/hosts/) | [raw](http://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)
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 | 'non-commercial with attribution' | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
CoinBlocker | Simple lists that can help prevent cryptomining in the browser or other applications |[link](https://github.com/ZeroDot1/CoinBlockerLists) | [raw](https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser) | frequently | GPLv3 | [issues](https://github.com/ZeroDot1/CoinBlockerLists/issues)
tyzbit | Microsoft tracking domains. A fork of this repo providing additional data. |[link](https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts) | [raw](https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts) | rarely | | [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 | | [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://github.com/azet12/KADhosts) | [raw](https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt) | frequently | GPLv3 | [issues](https://github.com/azet12/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)
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 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)
Updated `hosts` files from the following locations are always unified and included:
* The [Adaway hosts file](http://adaway.org/hosts.txt), updated regularly.
* MVPs.org Hosts file at [http://winhelp2002.mvps.org/hosts.htm](http://winhelp2002.mvps.org/hosts.htm), updated
monthly, or thereabouts.
* Dan Pollock at [http://someonewhocares.org/hosts/](http://someonewhocares.org/hosts/) updated regularly.
* Malware Domain List at [http://www.malwaredomainlist.com/](http://www.malwaredomainlist.com/), updated regularly.
* Peter Lowe at [http://pgl.yoyo.org/adservers/](http://pgl.yoyo.org/adservers/), updated regularly.
* My own small list in raw form [here](https://raw.github.com/StevenBlack/hosts/master/data/StevenBlack/hosts).
## Extensions
The unified hosts file is extensible. You manage extensions by curating the `extensions/` folder tree.
See the `social`, `gambling`, and `porn` extension which are included in this repo, for example.
The unified hosts file is extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
The `updateHostsFile.py` script, which is python 2.7 and Python 3-compatible, will generate a unified hosts file
based on the sources in the local `data/` subfolder. The script will prompt you Whether it should fetch updated
versions (from locations defined by the update.info text file in each source's folder), otherwise it will use the
`hosts` file that's already there.
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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
@@ -62,78 +111,143 @@ versions (from locations defined by the update.info text file in each source's f
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace` flag.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate over them.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names of subfolders below the `extensions` folder
containing additional category-specific hosts files to include in the amalgamation. Example: `--extensions porn` or
`-e social porn`.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the target. Default is `0.0.0.0`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file in a subfolder. If the subfolder does not
exist, it will be created.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard section, at the top containing lines like `127.0.0.1 localhost`. This is useful for configuring proximate DNS services on the local network.
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/` folder, and specify its update url in
`update.info` file.
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the `extensions/` folder. Again the url in
`update.info` controls where this extension finds its updates.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents of this file are prepended to the
unified hosts file during the update process.
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo from `origin` in the future.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts file.
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist `google-analytics.com`, that domain and all its
subdomains won't be merged into the final hosts file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo
from `origin` in the future.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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 used by all operating
systems to map hostnames to IP addresses.
A hosts file, named `hosts` (with no file extension), is a plain-text file
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`. Therefore if a domain name is
resolved by the `hosts` file, the request never leaves your computer.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware, and other irritants.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these lines to your hosts
file will do it:
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
127.0.0.1 ad.ae.doubleclick.net
127.0.0.1 ad.ar.doubleclick.net
127.0.0.1 ad.at.doubleclick.net
127.0.0.1 ad.au.doubleclick.net
127.0.0.1 ad.be.doubleclick.net
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Using `0.0.0.0` is faster because you don't have to wait for a timeout. It also does not interfere
with a web server that may be running on the local PC.
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
We tried that. Using `0` doesn't work universally.
@@ -147,17 +261,22 @@ editor.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## 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.
## Updating hosts file on Windows
### Mac OS X
Open a Terminal and run:
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
`sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder`
```
updateHostsWindows.bat
```
### Windows
Open a Command Prompt:
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
@@ -167,11 +286,38 @@ Open a Command Prompt:
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
and run:
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
`ipconfig /flushdns`
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
@@ -186,6 +332,19 @@ Open a Terminal and run with root privileges:
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
@@ -199,13 +358,28 @@ The goals of this repo are to:
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A hosts source should be frequently
updated by its maintainers with both additions and removals. The larger the hosts file, the higher the level of
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](http://hosts-file.net) is **not** included
here because it is very large (300,000+ entries) and doesn't currently display a corresponding high level of curation
activity.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile devices under a variety of operating
systems.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
+57332 -21518
View File
File diff suppressed because it is too large Load Diff
+257 -84
View File
@@ -1,49 +1,97 @@
#Unified hosts file with porn extensions
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
This repository consolidates several reputable `hosts` files, and merges them into a unified hosts file
with duplicates removed. This repo provides several hosts files tailored to you need to block.
# Unified hosts file with porn extensions
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: **March 23 2018**.
* Here's the [raw hosts file with porn extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) containing 65,663 entries.
* Last updated: **June 04 2016**.
* Here's the [raw hosts file with porn extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts) containing 32,323 entries.
### List of all hosts file variants
Host file recipe | Readme | Raw hosts | Unique domains
---------------- |:------:|:---------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 27,050
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) | 27,764
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) | 32,323
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) | 27,280
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) | 33,037
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) | 27,994
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) | 32,553
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) | 33,267
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
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) | 56,125 | [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) | 56,798 | [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) | 57,637 | [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) | 65,663 | [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,272 | [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) | 58,310 | [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) | 66,336 | [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) | 57,945 | [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) | 67,175 | [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) | 58,784 | [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) | 66,810 | [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) | 67,848 | [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) | 59,457 | [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) | 67,483 | [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) | 68,322 | [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) | 68,995 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless of OS.
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified here
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and
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](http://www.malwaredomainlist.com/) | [raw](http://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](http://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)
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](http://someonewhocares.org) | How to make the internet not suck (as much). |[link](http://someonewhocares.org/hosts/) | [raw](http://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)
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 | 'non-commercial with attribution' | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
CoinBlocker | Simple lists that can help prevent cryptomining in the browser or other applications |[link](https://github.com/ZeroDot1/CoinBlockerLists) | [raw](https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser) | frequently | GPLv3 | [issues](https://github.com/ZeroDot1/CoinBlockerLists/issues)
tyzbit | Microsoft tracking domains. A fork of this repo providing additional data. |[link](https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts) | [raw](https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts) | rarely | | [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 | | [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://github.com/azet12/KADhosts) | [raw](https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt) | frequently | GPLv3 | [issues](https://github.com/azet12/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)
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)
Updated `hosts` files from the following locations are always unified and included:
* The [Adaway hosts file](http://adaway.org/hosts.txt), updated regularly.
* MVPs.org Hosts file at [http://winhelp2002.mvps.org/hosts.htm](http://winhelp2002.mvps.org/hosts.htm), updated
monthly, or thereabouts.
* Dan Pollock at [http://someonewhocares.org/hosts/](http://someonewhocares.org/hosts/) updated regularly.
* Malware Domain List at [http://www.malwaredomainlist.com/](http://www.malwaredomainlist.com/), updated regularly.
* Peter Lowe at [http://pgl.yoyo.org/adservers/](http://pgl.yoyo.org/adservers/), updated regularly.
* My own small list in raw form [here](https://raw.github.com/StevenBlack/hosts/master/data/StevenBlack/hosts).
## Extensions
The unified hosts file is extensible. You manage extensions by curating the `extensions/` folder tree.
See the `social`, `gambling`, and `porn` extension which are included in this repo, for example.
The unified hosts file is extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
The `updateHostsFile.py` script, which is python 2.7 and Python 3-compatible, will generate a unified hosts file
based on the sources in the local `data/` subfolder. The script will prompt you Whether it should fetch updated
versions (from locations defined by the update.info text file in each source's folder), otherwise it will use the
`hosts` file that's already there.
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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
@@ -62,78 +110,143 @@ versions (from locations defined by the update.info text file in each source's f
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace` flag.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate over them.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names of subfolders below the `extensions` folder
containing additional category-specific hosts files to include in the amalgamation. Example: `--extensions porn` or
`-e social porn`.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the target. Default is `0.0.0.0`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file in a subfolder. If the subfolder does not
exist, it will be created.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard section, at the top containing lines like `127.0.0.1 localhost`. This is useful for configuring proximate DNS services on the local network.
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/` folder, and specify its update url in
`update.info` file.
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the `extensions/` folder. Again the url in
`update.info` controls where this extension finds its updates.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents of this file are prepended to the
unified hosts file during the update process.
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo from `origin` in the future.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts file.
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist `google-analytics.com`, that domain and all its
subdomains won't be merged into the final hosts file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo
from `origin` in the future.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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 used by all operating
systems to map hostnames to IP addresses.
A hosts file, named `hosts` (with no file extension), is a plain-text file
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`. Therefore if a domain name is
resolved by the `hosts` file, the request never leaves your computer.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware, and other irritants.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these lines to your hosts
file will do it:
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
127.0.0.1 ad.ae.doubleclick.net
127.0.0.1 ad.ar.doubleclick.net
127.0.0.1 ad.at.doubleclick.net
127.0.0.1 ad.au.doubleclick.net
127.0.0.1 ad.be.doubleclick.net
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Using `0.0.0.0` is faster because you don't have to wait for a timeout. It also does not interfere
with a web server that may be running on the local PC.
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
We tried that. Using `0` doesn't work universally.
@@ -147,17 +260,22 @@ editor.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## 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.
## Updating hosts file on Windows
### Mac OS X
Open a Terminal and run:
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
`sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder`
```
updateHostsWindows.bat
```
### Windows
Open a Command Prompt:
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
@@ -167,11 +285,38 @@ Open a Command Prompt:
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
and run:
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
`ipconfig /flushdns`
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
@@ -186,6 +331,19 @@ Open a Terminal and run with root privileges:
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
@@ -199,13 +357,28 @@ The goals of this repo are to:
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A hosts source should be frequently
updated by its maintainers with both additions and removals. The larger the hosts file, the higher the level of
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](http://hosts-file.net) is **not** included
here because it is very large (300,000+ entries) and doesn't currently display a corresponding high level of curation
activity.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile devices under a variety of operating
systems.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
+49272 -16813
View File
File diff suppressed because it is too large Load Diff
+255 -84
View File
@@ -1,49 +1,95 @@
#Unified hosts file with social extensions
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
This repository consolidates several reputable `hosts` files, and merges them into a unified hosts file
with duplicates removed. This repo provides several hosts files tailored to you need to block.
# Unified hosts file with social extensions
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: **March 23 2018**.
* Here's the [raw hosts file with social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) containing 57,272 entries.
* Last updated: **June 04 2016**.
* Here's the [raw hosts file with social extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts) containing 27,280 entries.
### List of all hosts file variants
Host file recipe | Readme | Raw hosts | Unique domains
---------------- |:------:|:---------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 27,050
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) | 27,764
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) | 32,323
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) | 27,280
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) | 33,037
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) | 27,994
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) | 32,553
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) | 33,267
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
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) | 56,125 | [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) | 56,798 | [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) | 57,637 | [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) | 65,663 | [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,272 | [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) | 58,310 | [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) | 66,336 | [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) | 57,945 | [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) | 67,175 | [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) | 58,784 | [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) | 66,810 | [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) | 67,848 | [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) | 59,457 | [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) | 67,483 | [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) | 68,322 | [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) | 68,995 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless of OS.
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified here
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and
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](http://www.malwaredomainlist.com/) | [raw](http://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](http://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)
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](http://someonewhocares.org) | How to make the internet not suck (as much). |[link](http://someonewhocares.org/hosts/) | [raw](http://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)
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 | 'non-commercial with attribution' | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
CoinBlocker | Simple lists that can help prevent cryptomining in the browser or other applications |[link](https://github.com/ZeroDot1/CoinBlockerLists) | [raw](https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser) | frequently | GPLv3 | [issues](https://github.com/ZeroDot1/CoinBlockerLists/issues)
tyzbit | Microsoft tracking domains. A fork of this repo providing additional data. |[link](https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts) | [raw](https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts) | rarely | | [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 | | [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://github.com/azet12/KADhosts) | [raw](https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt) | frequently | GPLv3 | [issues](https://github.com/azet12/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)
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)
Updated `hosts` files from the following locations are always unified and included:
* The [Adaway hosts file](http://adaway.org/hosts.txt), updated regularly.
* MVPs.org Hosts file at [http://winhelp2002.mvps.org/hosts.htm](http://winhelp2002.mvps.org/hosts.htm), updated
monthly, or thereabouts.
* Dan Pollock at [http://someonewhocares.org/hosts/](http://someonewhocares.org/hosts/) updated regularly.
* Malware Domain List at [http://www.malwaredomainlist.com/](http://www.malwaredomainlist.com/), updated regularly.
* Peter Lowe at [http://pgl.yoyo.org/adservers/](http://pgl.yoyo.org/adservers/), updated regularly.
* My own small list in raw form [here](https://raw.github.com/StevenBlack/hosts/master/data/StevenBlack/hosts).
## Extensions
The unified hosts file is extensible. You manage extensions by curating the `extensions/` folder tree.
See the `social`, `gambling`, and `porn` extension which are included in this repo, for example.
The unified hosts file is extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
The `updateHostsFile.py` script, which is python 2.7 and Python 3-compatible, will generate a unified hosts file
based on the sources in the local `data/` subfolder. The script will prompt you Whether it should fetch updated
versions (from locations defined by the update.info text file in each source's folder), otherwise it will use the
`hosts` file that's already there.
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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
@@ -62,78 +108,143 @@ versions (from locations defined by the update.info text file in each source's f
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace` flag.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate over them.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names of subfolders below the `extensions` folder
containing additional category-specific hosts files to include in the amalgamation. Example: `--extensions porn` or
`-e social porn`.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the target. Default is `0.0.0.0`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file in a subfolder. If the subfolder does not
exist, it will be created.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard section, at the top containing lines like `127.0.0.1 localhost`. This is useful for configuring proximate DNS services on the local network.
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/` folder, and specify its update url in
`update.info` file.
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the `extensions/` folder. Again the url in
`update.info` controls where this extension finds its updates.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents of this file are prepended to the
unified hosts file during the update process.
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo from `origin` in the future.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts file.
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist `google-analytics.com`, that domain and all its
subdomains won't be merged into the final hosts file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo
from `origin` in the future.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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 used by all operating
systems to map hostnames to IP addresses.
A hosts file, named `hosts` (with no file extension), is a plain-text file
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`. Therefore if a domain name is
resolved by the `hosts` file, the request never leaves your computer.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware, and other irritants.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these lines to your hosts
file will do it:
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
127.0.0.1 ad.ae.doubleclick.net
127.0.0.1 ad.ar.doubleclick.net
127.0.0.1 ad.at.doubleclick.net
127.0.0.1 ad.au.doubleclick.net
127.0.0.1 ad.be.doubleclick.net
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Using `0.0.0.0` is faster because you don't have to wait for a timeout. It also does not interfere
with a web server that may be running on the local PC.
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
We tried that. Using `0` doesn't work universally.
@@ -147,17 +258,22 @@ editor.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## 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.
## Updating hosts file on Windows
### Mac OS X
Open a Terminal and run:
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
`sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder`
```
updateHostsWindows.bat
```
### Windows
Open a Command Prompt:
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
@@ -167,11 +283,38 @@ Open a Command Prompt:
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
and run:
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
`ipconfig /flushdns`
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
@@ -186,6 +329,19 @@ Open a Terminal and run with root privileges:
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
@@ -199,13 +355,28 @@ The goals of this repo are to:
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A hosts source should be frequently
updated by its maintainers with both additions and removals. The larger the hosts file, the higher the level of
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](http://hosts-file.net) is **not** included
here because it is very large (300,000+ entries) and doesn't currently display a corresponding high level of curation
activity.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile devices under a variety of operating
systems.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
+8
View File
@@ -0,0 +1,8 @@
# blacklist
#
# The contents of this file (containing a listing of additional domains in
# 'hosts' file format) are appended to the unified hosts file during the
# update process. For example, uncomment the following line to block
# 'example.com':
# 0.0.0.0 example.com
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
if [ -d "$HOME/miniconda3" ] && [ -e "$HOME/miniconda3/bin/conda" ]; then
echo "Miniconda install already present from 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 http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh || exit 1
else
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh || exit 1
fi
bash miniconda.sh -b -p "$HOME/miniconda3" || exit 1
fi
echo "Configuring Miniconda..."
conda config --set ssl_verify false || exit 1
conda config --set always_yes true --set changeps1 false || exit 1
echo "Updating Miniconda"
conda update conda
conda update --all
conda info -a || exit 1
Executable
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
echo "Linting repository..."
source activate hosts
flake8 --max-line-length 120
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
echo "Creating a Python $PYTHON_VERSION environment"
conda create -n hosts python=$PYTHON_VERSION || exit 1
source activate hosts
echo "Installing packages..."
conda install mock flake8 beautifulsoup4 lxml
Executable
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
echo "Running unittests..."
source activate hosts
python testUpdateHostsFile.py
File diff suppressed because it is too large Load Diff
+9
View File
@@ -0,0 +1,9 @@
{
"name": "Mitchell Krog's - Badd Boyz Hosts",
"description": "Sketchy domains and Bad Referrers from my Nginx and Apache Bad Bot and Spam Referrer Blockers",
"homeurl": "https://github.com/mitchellkrogza/Badd-Boyz-Hosts",
"frequency": "weekly",
"issues": "https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues",
"url": "https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts",
"license": "'non-commercial with attribution'"
}
File diff suppressed because it is too large Load Diff
+9
View File
@@ -0,0 +1,9 @@
{
"name": "CoinBlocker",
"description": "Simple lists that can help prevent cryptomining in the browser or other applications",
"homeurl": "https://github.com/ZeroDot1/CoinBlockerLists",
"frequency": "frequently",
"issues": "https://github.com/ZeroDot1/CoinBlockerLists/issues",
"url": "https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser",
"license": "GPLv3"
}
+1334
View File
File diff suppressed because it is too large Load Diff
+9
View File
@@ -0,0 +1,9 @@
{
"name": "KADhosts",
"description": "Fraud/adware/scam websites.",
"homeurl": "https://github.com/azet12/KADhosts",
"frequency": "frequently",
"issues": "https://github.com/azet12/KADhosts/issues",
"url": "https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt",
"license": "GPLv3"
}
+404 -1
View File
@@ -3,24 +3,427 @@
# http://stevenblack.com
127.0.0.1 1493361689.rsc.cdn77.org
127.0.0.1 30-day-change.com
127.0.0.1 2468.go2cloud.org
127.0.0.1 adsmws.cloudapp.net
127.0.0.1 androidads23.adcolony.com
127.0.0.1 annualconsumersurvey.com
127.0.0.1 apps.id.net
127.0.0.1 breaksurvey.com
127.0.0.1 data.cnn.com
127.0.0.1 canuck-method.com
127.0.0.1 com-notice.info
127.0.0.1 www.com-notice.info
127.0.0.1 apple.com-notice.info
127.0.0.1 www.apple.com-notice.info
127.0.0.1 support.apple.com-notice.info
127.0.0.1 www.support.apple.com-notice.info
127.0.0.1 darkpage.win
127.0.0.1 dobre-programy.pl
127.0.0.1 dobre-programy.xyz
127.0.0.1 dobreprogramy.pro
127.0.0.1 www.canuck-method.com
127.0.0.1 com-notice.info
127.0.0.1 www.com-notice.info
127.0.0.1 largeloot.com
127.0.0.1 letitbefaster.website
127.0.0.1 login.dotomi.com
127.0.0.1 login.dotomi.net
127.0.0.1 external.stealthedeal.com
127.0.0.1 goodblock.gladly.io
127.0.0.1 jackbootedroom.com ## phishing
127.0.0.1 mackeeperapp.zeobit.com
127.0.0.1 montrealgazette.stats.com
127.0.0.1 fgoogle.com # misspelling
127.0.0.1 hosted.stats.com
127.0.0.1 hosted.stats.com.edgesuite.net
127.0.0.1 howupdateworks.amazingupdates4youtoday.website
127.0.0.1 mysterysnooper.com
127.0.0.1 mywot.com
127.0.0.1 mywot.net
127.0.0.1 onlineusagesurveys.com
127.0.0.1 open.oneplus.net
127.0.0.1 promotions.yourfirstmillion.biz
127.0.0.1 quickcash-system.com
127.0.0.1 save-your-pc.info
127.0.0.1 sportsinteraction.com
127.0.0.1 www.sportsinteraction.com
127.0.0.1 embed.sendtonews.com
127.0.0.1 performanceadexchange.com
127.0.0.1 www.performanceadexchange.com
127.0.0.1 privacyassistant.net
127.0.0.1 ext.privacyassistant.net
127.0.0.1 pussysaga.com
127.0.0.1 www.pussysaga.com
127.0.0.1 promotion.com-rewards.club
127.0.0.1 rereddit.com
127.0.0.1 s.zkcdn.net
127.0.0.1 sixstitch.win
127.0.0.1 specialsections.siteseer.ca
127.0.0.1 stealthedeal.com
127.0.0.1 tags.news.com.au # thanks, @ValbonneConsulting
127.0.0.1 torrenty-org.pl
127.0.0.1 tracking.lenzmx.com
127.0.0.1 twitter.cm # common misspelling
127.0.0.1 ttwitter.com # common misspelling and, besides, scumbags there.
127.0.0.1 vdtrack.com
127.0.0.1 www.vdtrack.com
127.0.0.1 virtual.thewhig.com
127.0.0.1 www.dobre-programy.pl
127.0.0.1 www.quickcash-system.com
#=====================================
127.0.0.1 www.diptanuinfo.co.cc
127.0.0.1 www.mywot.com
127.0.0.1 www.mywot.net
127.0.0.1 www.torrenty-org.pl
127.0.0.1 urldelivery.com
127.0.0.1 www.urldelivery.com
127.0.0.1 files.ctnet4.space
127.0.0.1 apps3.cointraffic.io
127.0.0.1 players.brightcove.net
127.0.0.1 cfvod.kaltura.com
127.0.0.1 metrics.brightcove.com
127.0.0.1 ping.chartbeat.net
127.0.0.1 www.tvpassport.com
127.0.0.1 www.googletagservices.com
127.0.0.1 www.googletagmanager.com
127.0.0.1 connect.facebook.net
127.0.0.1 postmediamontrealgazette2.files.wordpress.com
127.0.0.1 ping.chartbeat.net
127.0.0.1 edge.api.brightcove.com
127.0.0.1 cdnapi.kaltura.com
127.0.0.1 tvmds.tvpassport.com
127.0.0.1 stats.wp.com
127.0.0.1 4436230.fls.doubleclick.net
127.0.0.1 aoredi.com
127.0.0.1 imysurvey.com
127.0.0.1 gamblerush.com
127.0.0.1 security-check-551.com
127.0.0.1 www.cpm20.com
127.0.0.1 btds.artplay.info
127.0.0.1 www.aoredi.com
127.0.0.1 www.imysurvey.com
127.0.0.1 www.gamblerush.com
127.0.0.1 www.security-check-551.com
127.0.0.1 www.www.cpm20.com
127.0.0.1 www.btds.artplay.info
# Analytics
127.0.0.1 analysis.polarisoffice.com
127.0.0.1 analytics-digit-in.cdn.ampproject.org
127.0.0.1 analytics.cloudron.io
127.0.0.1 analytics.colacoweb.net
127.0.0.1 analytics.digit.in
127.0.0.1 analytics.jabong.com
127.0.0.1 analytics.lk.api.ditto.com
127.0.0.1 analytics.logsss.com
127.0.0.1 analytics.mailmunch.co
127.0.0.1 analytics.mopub.com
127.0.0.1 analytics.mytvzion.pro
127.0.0.1 analytics.phando.com
127.0.0.1 analytics.picsart.com
127.0.0.1 analytics.poolshool.com
127.0.0.1 analytics.posttv.com
127.0.0.1 analytics.siliconexpert.com
127.0.0.1 analytics.thevideo.me
127.0.0.1 analyticsapi.bsbportal.com
127.0.0.1 anayltics.kuikr.com
127.0.0.1 zarget.com
127.0.0.1 cdn.zarget.com
127.0.0.1 www.alphonso.tv
127.0.0.1 abclipper-ui1.alphonso.tv
127.0.0.1 acr10.alphonso.tv
127.0.0.1 acr11.alphonso.tv
127.0.0.1 acr12.alphonso.tv
127.0.0.1 acr13.alphonso.tv
127.0.0.1 acr14.alphonso.tv
127.0.0.1 acr15.alphonso.tv
127.0.0.1 acr16.alphonso.tv
127.0.0.1 acr17.alphonso.tv
127.0.0.1 acr18.alphonso.tv
127.0.0.1 acr19.alphonso.tv
127.0.0.1 acr2.alphonso.tv
127.0.0.1 acr20.alphonso.tv
127.0.0.1 acr21.alphonso.tv
127.0.0.1 acr22.alphonso.tv
127.0.0.1 acr23.alphonso.tv
127.0.0.1 acr25.alphonso.tv
127.0.0.1 acr26.alphonso.tv
127.0.0.1 acr27.alphonso.tv
127.0.0.1 acr28.alphonso.tv
127.0.0.1 acr29.alphonso.tv
127.0.0.1 acr3.alphonso.tv
127.0.0.1 acr30.alphonso.tv
127.0.0.1 acr31.alphonso.tv
127.0.0.1 acr32.alphonso.tv
127.0.0.1 acr33.alphonso.tv
127.0.0.1 acr34.alphonso.tv
127.0.0.1 acr35.alphonso.tv
127.0.0.1 acr36.alphonso.tv
127.0.0.1 acr37.alphonso.tv
127.0.0.1 acr39.alphonso.tv
127.0.0.1 acr4.alphonso.tv
127.0.0.1 acr40.alphonso.tv
127.0.0.1 acr41.alphonso.tv
127.0.0.1 acr42.alphonso.tv
127.0.0.1 acr43.alphonso.tv
127.0.0.1 acr44.alphonso.tv
127.0.0.1 acr45.alphonso.tv
127.0.0.1 acr46.alphonso.tv
127.0.0.1 acr47.alphonso.tv
127.0.0.1 acr49.alphonso.tv
127.0.0.1 acr5.alphonso.tv
127.0.0.1 acr51.alphonso.tv
127.0.0.1 acr52.alphonso.tv
127.0.0.1 acr53.alphonso.tv
127.0.0.1 acr54.alphonso.tv
127.0.0.1 acr55.alphonso.tv
127.0.0.1 acr56.alphonso.tv
127.0.0.1 acr58.alphonso.tv
127.0.0.1 acr59.alphonso.tv
127.0.0.1 acr6.alphonso.tv
127.0.0.1 acr7.alphonso.tv
127.0.0.1 acr8.alphonso.tv
127.0.0.1 acr9.alphonso.tv
127.0.0.1 acrdb.alphonso.tv
127.0.0.1 ads.alphonso.tv
127.0.0.1 api.alphonso.tv
127.0.0.1 www.api.alphonso.tv
127.0.0.1 assets.alphonso.tv
127.0.0.1 bale.alphonso.tv
127.0.0.1 bebe.alphonso.tv
127.0.0.1 beckham.alphonso.tv
127.0.0.1 best.alphonso.tv
127.0.0.1 blog.alphonso.tv
127.0.0.1 bwlkup.alphonso.tv
127.0.0.1 clockskew.alphonso.tv
127.0.0.1 cruyff.alphonso.tv
127.0.0.1 dashboards.alphonso.tv
127.0.0.1 degea.alphonso.tv
127.0.0.1 dembele.alphonso.tv
127.0.0.1 demo.alphonso.tv
127.0.0.1 dimaria.alphonso.tv
127.0.0.1 donovan.alphonso.tv
127.0.0.1 honolulu.alphonso.tv
127.0.0.1 insights.alphonso.tv
127.0.0.1 koudas.alphonso.tv
127.0.0.1 mahrez.alphonso.tv
127.0.0.1 neymar.alphonso.tv
127.0.0.1 optout.alphonso.tv
127.0.0.1 oscar.alphonso.tv
127.0.0.1 ozil.alphonso.tv
127.0.0.1 pele.alphonso.tv
127.0.0.1 pp.alphonso.tv
127.0.0.1 ppjs.alphonso.tv
127.0.0.1 prov.alphonso.tv
127.0.0.1 proxy.alphonso.tv
127.0.0.1 rtbdev4.alphonso.tv
127.0.0.1 rtblbtr.alphonso.tv
127.0.0.1 s4udash2.alphonso.tv
127.0.0.1 silva.alphonso.tv
127.0.0.1 socrates.alphonso.tv
127.0.0.1 sterling.alphonso.tv
127.0.0.1 tn.alphonso.tv
127.0.0.1 tr.alphonso.tv
127.0.0.1 tvads.alphonso.tv
127.0.0.1 vanpersie.alphonso.tv
127.0.0.1 villa.alphonso.tv
127.0.0.1 web2.alphonso.tv
127.0.0.1 yashin.alphonso.tv
127.0.0.1 zico.alphonso.tv
# Ads and tracking on Xiaomi devices
127.0.0.1 api.ad.xiaomi.com
127.0.0.1 api.admob.xiaomi.com
127.0.0.1 api.d.xiaomi.com
127.0.0.1 a.stat.xiaomi.com
127.0.0.1 tracking.miui.com
127.0.0.1 cdn.ad.xiaomi.com
127.0.0.1 data.mistat.xiaomi.com
127.0.0.1 e.ad.xiaomi.com
127.0.0.1 globalapi.ad.xiaomi.com
127.0.0.1 new.api.ad.xiaomi.com
127.0.0.1 sdkconfig.ad.xiaomi.com
127.0.0.1 ssp.ad.xiaomi.com
127.0.0.1 test.ad.xiaomi.com
127.0.0.1 test.e.ad.xiaomi.com
127.0.0.1 test.new.api.ad.xiaomi.com
127.0.0.1 cc.sys.intl.xiaomi.com
127.0.0.1 cc.sys.miui.com
127.0.0.1 ccc.sys.miui.com
127.0.0.1 ccc.sys.intl.xiaomi.com
127.0.0.1 data.mistat.intl.xiaomi.com
127.0.0.1 geofence.sys.miui.com
127.0.0.1 abtest.mistat.xiaomi.com
127.0.0.1 data.mistat.intl.xiaomi.com
127.0.0.1 abtest.mistat.intl.xiaomi.com
127.0.0.1 zeus.ad.intl.xiaomi.com
127.0.0.1 storeconfig.mistat.intl.xiaomi.com
127.0.0.1 fcanr.tracking.miui.com
# Ads and tracking
127.0.0.1 ampmetrics.engadget.com
127.0.0.1 c.adskeeper.co.uk
127.0.0.1 datacollect.vmall.com
127.0.0.1 events.appsflyer.com
127.0.0.1 event.ksosoft.com
127.0.0.1 events3.adcolony.com
127.0.0.1 l2.visiblemeasures.com
127.0.0.1 track.tenjin.io
127.0.0.1 ustat.batmobi.net
0.0.0.0 an.batmobi.net
0.0.0.0 api.stats.appa.pe
0.0.0.0 api5.batmobil.net
0.0.0.0 applog.uc.cn
0.0.0.0 applog.camera360.com
0.0.0.0 device-metrics-us.amazon.com
0.0.0.0 datacollect.vmall.com
0.0.0.0 metrics.adage.com
0.0.0.0 ads.feedly.com
0.0.0.0 bi-collector.oneapm.com
0.0.0.0 lepodownload.mediatek.com
0.0.0.0 pixel.realclever.com
0.0.0.0 sdktm.w.inmobi.com
0.0.0.0 matchmyip.com
0.0.0.0 ads.aerserv.com
0.0.0.0 ads.mp.mydas.mobi
0.0.0.0 ads.nexage.com
0.0.0.0 api.oneaudience.com
0.0.0.0 d.applovin.com
0.0.0.0 l-v1.presage.io
0.0.0.0 rt.applovin.com
0.0.0.0 sdk.adincube.com
0.0.0.0 api.pubnative.net
0.0.0.0 sdklogs.avocarrot.com
0.0.0.0 telemetry.layer.com
0.0.0.0 dasdada.fu.ck
0.0.0.0 i1.dl-ad.com
0.0.0.0 pl-v2.presage.io
0.0.0.0 pixel.onaudience.com
0.0.0.0 ad.api.kaffnet.com
0.0.0.0 ad.click.kaffnet.com
0.0.0.0 api.ad.snappea.com
0.0.0.0 ad.360in.com
0.0.0.0 ads.adtekmedia.com
0.0.0.0 ads.chacomedia.com
0.0.0.0 ads.grandonmedia.com
0.0.0.0 adserver.ministryofads.com
0.0.0.0 adsflame.com
0.0.0.0 adtekmedia.com
0.0.0.0 adv.axiatraders.com
0.0.0.0 adv.grandonmedia.com
0.0.0.0 alliance4media.com
0.0.0.0 api.axiatraders.com
0.0.0.0 api.grandonmedia.com
0.0.0.0 banners.mediaparade.net
0.0.0.0 bid.axiatraders.com
0.0.0.0 bid.grandonmedia.com
0.0.0.0 bigsharkmedia.com
0.0.0.0 blog.roboinside.me
0.0.0.0 buzzclicks.com
0.0.0.0 cdn.beginads.com
0.0.0.0 click-rtb-useast.kobenetwork.com
0.0.0.0 click.axiatraders.com
0.0.0.0 click.elixmedia.com
0.0.0.0 click.enatimedia.com
0.0.0.0 click.grandonmedia.com
0.0.0.0 clickopon.com
0.0.0.0 clickrtb-useast.kobenetwork.com
0.0.0.0 cvent.axiatraders.com
0.0.0.0 deshmedia.com
0.0.0.0 dsp.face2trade.com
0.0.0.0 ecommerce.roboinside.me
0.0.0.0 elixmedia.com
0.0.0.0 enatimedia.com
0.0.0.0 exchange.face2trade.com
0.0.0.0 grandonmedia.com
0.0.0.0 indiaonclick.com
0.0.0.0 jira.face2trade.com
0.0.0.0 k5market.com
0.0.0.0 kushat.roboinside.me
0.0.0.0 mediabarterexchange.com
0.0.0.0 mediadirectx.com
0.0.0.0 mediaparade.net
0.0.0.0 oz.ministryofads.com
0.0.0.0 plaimedia.com
0.0.0.0 powertradeprofit.com
0.0.0.0 promo.buzzclicks.com
0.0.0.0 promo.enatimedia.com
0.0.0.0 promo.kobenetwork.com
0.0.0.0 pub.axiatraders.com
0.0.0.0 pub.grandonmedia.com
0.0.0.0 publisherhub.plaimedia.com
0.0.0.0 quark.plaimedia.com
0.0.0.0 realestate2.deshmedia.com
0.0.0.0 roboinside.me
0.0.0.0 rotator.axiatraders.com
0.0.0.0 rotator.beginads.com
0.0.0.0 rotator.buzzclicks.com
0.0.0.0 rtb-useast.kobenetwork.com
0.0.0.0 sebder.roboinside.me
0.0.0.0 service.face2trade.com
0.0.0.0 sf-3.east.kobenetwork.com
0.0.0.0 sf-3.st.adtekmedia.com
0.0.0.0 sf3.east.kobenetwork.com
0.0.0.0 sionicmedia.com
0.0.0.0.spiegel-de.spiegel.de
0.0.0.0 ssp.face2trade.com
0.0.0.0 static.elixmedia.com
0.0.0.0 tracker.clickopon.com
0.0.0.0 tracking.beginads.com
0.0.0.0 tradersbrokers.com
0.0.0.0 us-east1.serve.elixmedia.com
0.0.0.0 us-east1.serve.enatimedia.com
0.0.0.0 www.ads2live.com
0.0.0.0 www.adserver.ministryofads.com
0.0.0.0 www.adsflame.com
0.0.0.0 www.adtekmedia.com
0.0.0.0 www.alliance4media.com
0.0.0.0 www.axiatraders.com
0.0.0.0 www.banners.mediaparade.net
0.0.0.0 www.beginads.com
0.0.0.0 www.bigsharkmedia.com
0.0.0.0 www.buzzclicks.com
0.0.0.0 www.chacomedia.com
0.0.0.0 www.click.elixmedia.com
0.0.0.0 www.clickopon.com
0.0.0.0 www.deshmedia.com
0.0.0.0 www.elixmedia.com
0.0.0.0 www.enatimedia.com
0.0.0.0 www.face2trade.com
0.0.0.0 www.grandonmedia.com
0.0.0.0 www.indiaonclick.com
0.0.0.0 www.k5market.com
0.0.0.0 www.mediabarterexchange.com
0.0.0.0 www.mediadirectx.com
0.0.0.0 www.mediaparade.net
0.0.0.0 www.ministryofads.com
0.0.0.0 www.plaimedia.com
0.0.0.0 www.powertradeprofit.com
0.0.0.0 www.roboinside.me
0.0.0.0 www.rotator.buzzclicks.com
0.0.0.0 www.sf-3.st.adtekmedia.com
0.0.0.0 www.sionicmedia.com
0.0.0.0 www.static.elixmedia.com
0.0.0.0 www.tradersbrokers.com
0.0.0.0 www.us-east1.serve.elixmedia.com
0.0.0.0 xml.plaimedia.com
0.0.0.0 zamora.axiatraders.com
0.0.0.0 ads.proc.cc
0.0.0.0 15.taboola.com
0.0.0.0 convlatbmp.taboola.com
0.0.0.0 imprlatbmp.taboola.com
0.0.0.0 match.taboola.com
0.0.0.0 opps.taboola.com
0.0.0.0 taboola-d.openx.net
0.0.0.0 vidutils.taboola.com
0.0.0.0 wf.taboola.com
# Spam domains
# If your software is able, the below domains and all subdomains should be blocked
127.0.0.1 angiemktg.com
#*.angiemktg.com
127.0.0.1 weconfirmyou.com
#*.weconfirmyou.com
#=====================================
-1
View File
@@ -1 +0,0 @@
https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts
+9
View File
@@ -0,0 +1,9 @@
{
"name": "Steven Black's ad-hoc list",
"description": "Additional sketch domains as I come across them.",
"homeurl": "https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts",
"frequency": "occasionally",
"issues": "https://github.com/StevenBlack/hosts/issues",
"url": "https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts",
"license": "MIT"
}
+15
View File
@@ -0,0 +1,15 @@
### Extra rules for @StevenBlack 's hosts project
### https://github.com/FadeMind/hosts.extras
### UncheckyAds
0.0.0.0 cdn.appround.biz
0.0.0.0 cdn.download.sweetpacks.com
0.0.0.0 cdn.insta.playbryte.com
0.0.0.0 cdn.msdwnld.com
0.0.0.0 cdn.mypcbackup.com
0.0.0.0 d3oxtn1x3b8d7i.cloudfront.net
0.0.0.0 inno.bisrv.com
0.0.0.0 installer.betterinstaller.com
0.0.0.0 installer.filebulldog.com
0.0.0.0 nsis.bisrv.com
0.0.0.0 tracking.opencandy.com.s3.amazonaws.com
+8
View File
@@ -0,0 +1,8 @@
{
"name": "UncheckyAds",
"description": "Windows installers ads sources sites based on https://unchecky.com/ content.",
"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"
}
+7 -5
View File
@@ -2,9 +2,10 @@
# Blocking mobile ad providers and some analytics providers
#
# Contribute:
# Create an issue at https://github.com/dschuermann/ad-away/issues
# Create an issue at https://github.com/AdAway/AdAway/issues
#
# Changelog:
# 2016-07-18 Now hosted on GitHub + Cloudflare
# 2014-05-18 Now with a valid SSL certificate available at https://adaway.org/hosts.txt
# 2013-03-29 Integrated some hosts from
# http://adblock.gjtech.net/?format=hostfile
@@ -33,7 +34,6 @@
127.0.0.1 apps.buzzcity.net
127.0.0.1 ads.mobgold.com
127.0.0.1 android.bcfads.com
127.0.0.1 req.appads.com
127.0.0.1 show.buzzcity.net
127.0.0.1 api.analytics.omgpop.com
127.0.0.1 r.edge.inmobicdn.net
@@ -48,7 +48,6 @@
127.0.0.1 static.estebull.com
127.0.0.1 mobile.Banzai.it
127.0.0.1 ads.xxxad.net
127.0.0.1 hhbekxxw5d9e.pflexads.com
127.0.0.1 img.ads.mojiva.com
127.0.0.1 adcontent.saymedia.com
127.0.0.1 ads.saymedia.com
@@ -100,7 +99,7 @@
127.0.0.1 ads2.mediaarmor.com
127.0.0.1 cdn.nearbyad.com
127.0.0.1 ads.ookla.com
127.0.0.1 mobiledl.adboe.com
127.0.0.1 mobiledl.adobe.com
127.0.0.1 ads.flurry.com
127.0.0.1 gemini.yahoo.com
@@ -495,6 +494,9 @@
127.0.0.1 ifc.inmobi.com
127.0.0.1 thinknear-hosted.thinknearhub.com
# [https://play.google.com/store/apps/details?id=com.buymeapie.bmap]
127.0.0.1 ads.adadapted.com
#
# ANALYTICS
#
@@ -520,4 +522,4 @@
# [EFF Tracker Detection]
127.0.0.1 trackersimulator.org
127.0.0.1 eviltracker.net
127.0.0.1 do-not-tracker.org
127.0.0.1 do-not-tracker.org
-1
View File
@@ -1 +0,0 @@
https://adaway.org/hosts.txt
+9
View File
@@ -0,0 +1,9 @@
{
"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",
"url": "https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt",
"license": "CC BY 3.0"
}
File diff suppressed because it is too large Load Diff
+9
View File
@@ -0,0 +1,9 @@
{
"name": "add.2o7Net",
"description": "2o7Net tracking sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content.",
"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/add.2o7Net/hosts",
"license": "GPLv3+"
}
+25
View File
@@ -0,0 +1,25 @@
### Extra rules for @StevenBlack 's hosts project
### https://github.com/FadeMind/hosts.extras
### Dead sites based on http://www.hostsfile.org/hosts.html content.
0.0.0.0 analytic-google.com
0.0.0.0 blacksnake.com
0.0.0.0 europcareer.com
0.0.0.0 flashplayer-adobe.com
0.0.0.0 get-avast.com
0.0.0.0 iphonegames3g.com
0.0.0.0 jmp2click.com
0.0.0.0 microsoft-update.name
0.0.0.0 sunonsunday.co.uk
0.0.0.0 sunonsunday.com
0.0.0.0 thesunonsunday.co.uk
0.0.0.0 thesunonsunday.com
0.0.0.0 toolbar.wibiya.com
0.0.0.0 www.analytic-google.com
0.0.0.0 www.europcareer.com
0.0.0.0 www.flashplayer-adobe.com
0.0.0.0 www.get-avast.com
0.0.0.0 www.iphonegames3g.com
0.0.0.0 www.jmp2click.com
0.0.0.0 www.microsoft-update.name
0.0.0.0 wwwfacebook.com
+9
View File
@@ -0,0 +1,9 @@
{
"name": "add.Dead",
"description": "Dead sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content.",
"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/add.Dead/hosts",
"license": "GPLv3+"
}
+2929
View File
File diff suppressed because it is too large Load Diff
+9
View File
@@ -0,0 +1,9 @@
{
"name": "add.Risk",
"description": "Risk content sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content.",
"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/add.Risk/hosts",
"license": "GPLv3+"
}
+107
View File
@@ -0,0 +1,107 @@
### Extra rules for @StevenBlack 's hosts project
### https://github.com/FadeMind/hosts.extras
### SPAM sites based on http://www.hostsfile.org/hosts.html content.
# File generated with https://github.com/funilrys/PyFunceble
# Date of generation: Mon 12 Feb 14:02:56 UTC 2018
0.0.0.0 100.1qingdao.com
0.0.0.0 7minuteworkout.com
0.0.0.0 addshoppers.com
0.0.0.0 affiliatecashpile.go2jump.org
0.0.0.0 amoxicillin-amoxil-buy.com
0.0.0.0 arklighting.co
0.0.0.0 beaverday.biz
0.0.0.0 bigpayout.go2jump.org
0.0.0.0 brandedleadgeneration.com
0.0.0.0 buylasix-online.net
0.0.0.0 clicktshirtprinting.co.uk
0.0.0.0 creditauthpagev3.info
0.0.0.0 credomobile.com
0.0.0.0 dandingo.go2jump.org
0.0.0.0 defenderxtactical.com
0.0.0.0 divisioncore.com
0.0.0.0 ebaychristmas.com
0.0.0.0 email.otherinbox.com
0.0.0.0 fitnesshealthreporter.com
0.0.0.0 freeforums.org
0.0.0.0 generic-onlinenexium.net
0.0.0.0 genericnexium40mg.net
0.0.0.0 go2jump.org
0.0.0.0 gtradersoft.com
0.0.0.0 heartrevitalized.com
0.0.0.0 hudsonleadership.com
0.0.0.0 janeaustenjoy.com
0.0.0.0 jnwky.misterjoy.ru
0.0.0.0 lazyprofits.go2jump.org
0.0.0.0 link.credomobile.com
0.0.0.0 medtecchina.com
0.0.0.0 misterjoy.ru
0.0.0.0 motoren.ru
0.0.0.0 mydreamdegree.com
0.0.0.0 nero-us.com
0.0.0.0 news.nero-emea.com
0.0.0.0 news.nero-us.com
0.0.0.0 novastarled.com
0.0.0.0 offerscience.go2jump.org
0.0.0.0 online-buyprednisone.com
0.0.0.0 onlineloan-personal.net
0.0.0.0 otherinbox.com
0.0.0.0 pcbutts1-therealtruth.blogspot.com
0.0.0.0 playlott.com
0.0.0.0 pngjmz.misterjoy.ru
0.0.0.0 preligions.com
0.0.0.0 profitsitesbiz.com
0.0.0.0 quickloanbank.com
0.0.0.0 redhotfreebies.co.uk
0.0.0.0 reverse-mortgage-info.com
0.0.0.0 securesignupoffers.org
0.0.0.0 sghu.misterjoy.ru
0.0.0.0 stsoftware.biz
0.0.0.0 tekindustri.upnjatim.ac.id
0.0.0.0 thedatingconference.com
0.0.0.0 tinaborg.com
0.0.0.0 unionleisurewear.com
0.0.0.0 va.tawk.to
0.0.0.0 vntanktransport.com
0.0.0.0 vp5.sudohost.com.br
0.0.0.0 vydoxtrial.com
0.0.0.0 whiteboxin.com
0.0.0.0 www.7minuteworkout.com
0.0.0.0 www.addshoppers.com
0.0.0.0 www.arklighting.co
0.0.0.0 www.beaverday.biz
0.0.0.0 www.brandedleadgeneration.com
0.0.0.0 www.clicktshirtprinting.co.uk
0.0.0.0 www.creditauthpagev3.info
0.0.0.0 www.credomobile.com
0.0.0.0 www.defenderxtactical.com
0.0.0.0 www.divisioncore.com
0.0.0.0 www.fitnesshealthreporter.com
0.0.0.0 www.freeforums.org
0.0.0.0 www.go2jump.org
0.0.0.0 www.gtradersoft.com
0.0.0.0 www.heartrevitalized.com
0.0.0.0 www.hudsonleadership.com
0.0.0.0 www.janeaustenjoy.com
0.0.0.0 www.medtecchina.com
0.0.0.0 www.misterjoy.ru
0.0.0.0 www.motoren.ru
0.0.0.0 www.mydreamdegree.com
0.0.0.0 www.nero-us.com
0.0.0.0 www.novastarled.com
0.0.0.0 www.onlineloan-personal.net
0.0.0.0 www.otherinbox.com
0.0.0.0 www.oz-offers.com
0.0.0.0 www.playlott.com
0.0.0.0 www.profitsitesbiz.com
0.0.0.0 www.redhotfreebies.co.uk
0.0.0.0 www.securesignupoffers.org
0.0.0.0 www.stsoftware.biz
0.0.0.0 www.thedatingconference.com
0.0.0.0 www.tinaborg.com
0.0.0.0 www.tkdami.net
0.0.0.0 www.unionleisurewear.com
0.0.0.0 www.vntanktransport.com
0.0.0.0 www.vydoxtrial.com
0.0.0.0 www.whiteboxin.com
0.0.0.0 xyrjtq.misterjoy.ru
+9
View File
@@ -0,0 +1,9 @@
{
"name": "add.Spam",
"description": "Spam sites based on [hostsfile.org](http://www.hostsfile.org/hosts.html) content.",
"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/add.Spam/hosts",
"license": "GPLv3+"
}
File diff suppressed because it is too large Load Diff
-1
View File
@@ -1 +0,0 @@
http://www.malwaredomainlist.com/hostslist/hosts.txt
+9
View File
@@ -0,0 +1,9 @@
{
"name": "Malware Domain List",
"description": "Malware Domain List is a non-commercial community project.",
"homeurl": "http://www.malwaredomainlist.com/",
"frequency": "weekly",
"issues": "http://www.malwaredomainlist.com/contact.php",
"url": "http://www.malwaredomainlist.com/hostslist/hosts.txt",
"license": "'can be used for free by anyone'"
}
+1004 -1725
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -1 +0,0 @@
http://winhelp2002.mvps.org/hosts.txt
+9
View File
@@ -0,0 +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/",
"frequency": "monthly",
"issues": "mailto:winhelp2002@gmail.com",
"url": "http://winhelp2002.mvps.org/hosts.txt",
"license": "CC BY-NC-SA 4.0"
}
File diff suppressed because it is too large Load Diff
-1
View File
@@ -1 +0,0 @@
http://someonewhocares.org/hosts/zero/hosts
+9
View File
@@ -0,0 +1,9 @@
{
"name": "Dan Pollock – [someonewhocares](http://someonewhocares.org)",
"description": "How to make the internet not suck (as much).",
"homeurl": "http://someonewhocares.org/hosts/",
"frequency": "frequently",
"issues": "hosts@someonewhocares.org",
"url": "http://someonewhocares.org/hosts/zero/hosts",
"license": "non-commercial with attribution"
}
-1
View File
@@ -1 +0,0 @@
https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts
+8
View File
@@ -0,0 +1,8 @@
{
"name": "tyzbit",
"description": "Microsoft tracking domains. A fork of this repo providing additional data.",
"homeurl": "https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts",
"frequency": "rarely",
"issues": "",
"url": "https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts"
}
+435 -208
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -1 +0,0 @@
https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0
+10
View File
@@ -0,0 +1,10 @@
{
"name": "yoyo.org",
"description": "Blocking with ad server and tracking server hostnames.",
"homeurl": "https://pgl.yoyo.org/adservers/",
"frequency": "frequently",
"issues": "mailto:pgl@yoyo.org",
"url": "https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0"
}
+679
View File
@@ -0,0 +1,679 @@
0.0.0.0 100percentfedup.com
0.0.0.0 20minutenews.com
0.0.0.0 21stcenturywire.com
0.0.0.0 365usanews.com
0.0.0.0 4threvolutionarywar.wordpress.com
0.0.0.0 70news.wordpress.com
0.0.0.0 aanirfan.blogspot.com
0.0.0.0 abcnews.com.co
0.0.0.0 addictinginfo.org
0.0.0.0 adobochronicles.com
0.0.0.0 africannewsupdates.com
0.0.0.0 ahtribune.com
0.0.0.0 alertchild.com
0.0.0.0 aljazeera-channel.com
0.0.0.0 allnewspipeline.com
0.0.0.0 alynews.com
0.0.0.0 americanfreepress.net
0.0.0.0 americanlookout.com
0.0.0.0 americanmilitarynews.com
0.0.0.0 americannews.com
0.0.0.0 americanoverlook.com
0.0.0.0 americanreviewer.com
0.0.0.0 americantoday.news
0.0.0.0 americantribune.org
0.0.0.0 amposts.com
0.0.0.0 anonhq.com
0.0.0.0 anonymousnews.ru
0.0.0.0 anotherdayintheempire.com
0.0.0.0 areyouasleep.com
0.0.0.0 asamericanasapplepie.org
0.0.0.0 asheepnomore.net
0.0.0.0 asia-pacificresearch.com
0.0.0.0 assassinationscience.com
0.0.0.0 associatedmediacoverage.com
0.0.0.0 awarenessact.com
0.0.0.0 awazetribune.com
0.0.0.0 awdnews.com
0.0.0.0 babylonbee.com
0.0.0.0 badcriminals.com
0.0.0.0 baltimoregazette.com
0.0.0.0 bb4sp.com
0.0.0.0 beforeitsnews.com
0.0.0.0 bentspud.com
0.0.0.0 bigamericannews.com
0.0.0.0 biglawnewsline.com
0.0.0.0 bigleaguepolitics.com
0.0.0.0 bignuggetnews.com
0.0.0.0 bigpzone.com
0.0.0.0 bipartisanreport.com
0.0.0.0 bizstandardnews.com
0.0.0.0 blackgenocide.org
0.0.0.0 blacklistednews.com
0.0.0.0 blog.halle-leaks.de
0.0.0.0 bluenationreview.com
0.0.0.0 butthatsnoneofmybusiness.com
0.0.0.0 caintv.com
0.0.0.0 canadafreepress.com
0.0.0.0 cap-news.com
0.0.0.0 cartelpress.com
0.0.0.0 cartelreport.com
0.0.0.0 channel-7-news.com
0.0.0.0 channel16news.com
0.0.0.0 channel17news.com
0.0.0.0 channel18news.com
0.0.0.0 channel22news.com
0.0.0.0 channel23news.com
0.0.0.0 channel24news.com
0.0.0.0 channel28news.com
0.0.0.0 channel33news.com
0.0.0.0 channel34news.com
0.0.0.0 channel45news.com
0.0.0.0 channel5000.com
0.0.0.0 chemtrailsplanet.net
0.0.0.0 christianfightback.com
0.0.0.0 christiantimesnewspaper.com
0.0.0.0 christwire.org
0.0.0.0 chronicle.su
0.0.0.0 civictribune.com
0.0.0.0 clancyreport.com
0.0.0.0 clashdaily.com
0.0.0.0 cnn.com.de
0.0.0.0 collectivelyconscious.net
0.0.0.0 consciouslifenews.com
0.0.0.0 conservative101.com
0.0.0.0 conservativebyte.com
0.0.0.0 conservativedailypost.com
0.0.0.0 conservativedailypost.com
0.0.0.0 conservativefiringline.com
0.0.0.0 conservativefrontline.com
0.0.0.0 conservativepapers.com
0.0.0.0 conservativerefocus.com
0.0.0.0 conservativestate.com
0.0.0.0 conservativetribune.com
0.0.0.0 conspiracydailyupdate.com
0.0.0.0 conspiracyplanet.com
0.0.0.0 countdowntozerotime.com
0.0.0.0 countercurrentnews.com
0.0.0.0 counterpsyops.com
0.0.0.0 cowgernation.com
0.0.0.0 crazynews24.co.zw
0.0.0.0 crazynewsreports.com
0.0.0.0 creambmp.com
0.0.0.0 cronicadeportiva.com
0.0.0.0 dailybuzzlive.com
0.0.0.0 dailycaller.com
0.0.0.0 dailycurrant.com
0.0.0.0 dailyheadlines.net
0.0.0.0 dailynews11.com
0.0.0.0 dailynewsposts.info
0.0.0.0 dailyoccupation.com
0.0.0.0 dailypostfeed.com
0.0.0.0 dandygoat.com
0.0.0.0 davidduke.com
0.0.0.0 dcleaks.com
0.0.0.0 dcposts.com
0.0.0.0 dcwhispers.com
0.0.0.0 deepinsidetherabbithole.com
0.0.0.0 democraticreview.com
0.0.0.0 dennismichaellynch.com
0.0.0.0 denverguardian.com
0.0.0.0 departed.co
0.0.0.0 departedmedia.info
0.0.0.0 donaldtrumpnews.co
0.0.0.0 downtrend.com
0.0.0.0 drudgereport.com.co
0.0.0.0 drugsofficial.com
0.0.0.0 duhprogressive.com
0.0.0.0 eaglerising.com
0.0.0.0 educate-yourself.org
0.0.0.0 educateinspirechange.org
0.0.0.0 embols.com
0.0.0.0 empireherald.com
0.0.0.0 empirenews.com
0.0.0.0 empirenews.net
0.0.0.0 endingthefed.com
0.0.0.0 endoftheamericandream.com
0.0.0.0 eutopia.buzz
0.0.0.0 everydaybreakingnews.com
0.0.0.0 familysecuritymatters.org
0.0.0.0 famousviralstories.com
0.0.0.0 fanzinger.com
0.0.0.0 federalistpress.com
0.0.0.0 fedsalert.com
0.0.0.0 fellowshipoftheminds.com
0.0.0.0 firebrandleft.com
0.0.0.0 fmobserver.com
0.0.0.0 focusnews.us
0.0.0.0 folksvideo.com
0.0.0.0 forbiddenknowledgetv.net
0.0.0.0 fprnradio.com
0.0.0.0 freebeacon.com
0.0.0.0 freedom-articles.toolsforfreedom.com
0.0.0.0 freedomdaily.com
0.0.0.0 freedomoutpost.com
0.0.0.0 fromthetrenchesworldreport.com
0.0.0.0 fuhrerious88blog.wordpress.com
0.0.0.0 fusionlacedillusions.com
0.0.0.0 galacticconnection.com
0.0.0.0 gangstergovernment.com
0.0.0.0 gatesofvienna.net
0.0.0.0 globalresearch.ca
0.0.0.0 glossynews.com
0.0.0.0 godtoday.com
0.0.0.0 gomerblog.com
0.0.0.0 gopthedailydose.com
0.0.0.0 gotnews.com
0.0.0.0 govtslaves.info
0.0.0.0 guccifer2.wordpress.com
0.0.0.0 gulagbound.com
0.0.0.0 hahaloud.com
0.0.0.0 healthimpactnews.com
0.0.0.0 heathenwomen.com
0.0.0.0 heaviermetal.net
0.0.0.0 henrymakow.com
0.0.0.0 holylandnutrition.com
0.0.0.0 humansarefree.com
0.0.0.0 ihavethetruth.com
0.0.0.0 ijr.com
0.0.0.0 illuminati-news.com
0.0.0.0 immediatesafety.org
0.0.0.0 imzansi.co.za
0.0.0.0 indiaarising.com
0.0.0.0 info.kopp-verlag.de
0.0.0.0 infowars.com
0.0.0.0 intellihub.com
0.0.0.0 inthenow.media
0.0.0.0 intrendtoday.com
0.0.0.0 investmentwatchblog.com
0.0.0.0 irishufology.net
0.0.0.0 ironictimes.com
0.0.0.0 islamicanews.com
0.0.0.0 itaglive.com
0.0.0.0 jamesfetzer.blogspot.com
0.0.0.0 jameslico.com
0.0.0.0 janmorganmedia.com
0.0.0.0 joeforamerica.com
0.0.0.0 jokerviral.com
0.0.0.0 jonesreport.com
0.0.0.0 journal-neo.org
0.0.0.0 justtrumpit.us
0.0.0.0 kata33.com
0.0.0.0 katehon.com
0.0.0.0 kingworldnews.com
0.0.0.0 knightstemplarinternational.com
0.0.0.0 krbcnews.com
0.0.0.0 kspm33.com
0.0.0.0 kupr7.com
0.0.0.0 ky6news.com
0.0.0.0 kypo6.com
0.0.0.0 landdestroyer.blogspot.com
0.0.0.0 larouchepub.com
0.0.0.0 liberaldarkness.com
0.0.0.0 liberalsociety.com
0.0.0.0 libertyblitzkrieg.com
0.0.0.0 libertymovementradio.com
0.0.0.0 libertynews.com
0.0.0.0 libertytalk.fm
0.0.0.0 libertyunyielding.com
0.0.0.0 libertyvideos.org
0.0.0.0 libertywritersnews.com
0.0.0.0 lincolnreport.com
0.0.0.0 literallyunbelievable.org
0.0.0.0 livemonitor.co.za
0.0.0.0 livingresistance.com
0.0.0.0 lucidawakenings.net
0.0.0.0 madashellnews.com
0.0.0.0 madworldnews.com
0.0.0.0 madworldnews.com
0.0.0.0 mainerepublicemailalert.com
0.0.0.0 makeamericagreattoday.com
0.0.0.0 mbynews.com
0.0.0.0 mckenziepost.com
0.0.0.0 mediamass.net
0.0.0.0 memoryholeblog.com
0.0.0.0 moralmatters.org
0.0.0.0 mpidailymagazine.com
0.0.0.0 mrnewswatch.com
0.0.0.0 msnbc.website
0.0.0.0 myfoodepic.com
0.0.0.0 myzonetoday.com
0.0.0.0 nahadaily.com
0.0.0.0 nationalreport.net
0.0.0.0 nationonenews.com
0.0.0.0 nbcnews.io
0.0.0.0 netlivemedia.com
0.0.0.0 nevo.news
0.0.0.0 newcenturytimes.com
0.0.0.0 newobserveronline.com
0.0.0.0 news4ktla.com
0.0.0.0 newsbiscuit.com
0.0.0.0 newsbreakers.org
0.0.0.0 newsbuzzdaily.com
0.0.0.0 newsexaminer.net
0.0.0.0 newshubs.info
0.0.0.0 newslo.com
0.0.0.0 newsmutiny.com
0.0.0.0 newsnow17.com
0.0.0.0 newstarget.com
0.0.0.0 newsthump.com
0.0.0.0 newswatch28.com
0.0.0.0 newswatch33.com
0.0.0.0 newswire-24.com
0.0.0.0 newswithviews.com
0.0.0.0 newzsentinel.com
0.0.0.0 noch.info
0.0.0.0 nodisinfo.com
0.0.0.0 notallowedto.com
0.0.0.0 now8news.com
0.0.0.0 nsnbc.me
0.0.0.0 occupydemocrats.com
0.0.0.0 off-guardian.org
0.0.0.0 oftwominds.com
0.0.0.0 oilgeopolitics.net
0.0.0.0 onlineconservativepress.com
0.0.0.0 opednews.com
0.0.0.0 oreillypost.com
0.0.0.0 orientalreview.org
0.0.0.0 ourshiftingperspective.com
0.0.0.0 pamelageller.com
0.0.0.0 patriotnewsagency.com
0.0.0.0 patriotrising.com
0.0.0.0 patriotupdate.com
0.0.0.0 persecutes.com
0.0.0.0 platosguns.com
0.0.0.0 politicalblindspot.com
0.0.0.0 politicalcult.com
0.0.0.0 politicalears.com
0.0.0.0 politicalo.com
0.0.0.0 politicalreviewer.com
0.0.0.0 politicalvelcraft.org
0.0.0.0 politicops.com
0.0.0.0 politistick.com
0.0.0.0 president45donaldtrump.com
0.0.0.0 pressfortruth.ca
0.0.0.0 presstv.com
0.0.0.0 prntly.com
0.0.0.0 projectveritas.com
0.0.0.0 qpolitical.com
0.0.0.0 qualitysharing.com
0.0.0.0 rbth.com
0.0.0.0 readconservatives.news
0.0.0.0 readynutrition.com
0.0.0.0 reagancoalition.com
0.0.0.0 realnewsrightnow.com
0.0.0.0 redstatewatcher.com
0.0.0.0 regated.com
0.0.0.0 rense.com
0.0.0.0 reporter.bz
0.0.0.0 rickwells.us
0.0.0.0 rightalerts.com
0.0.0.0 rightwingnews.com
0.0.0.0 rilenews.com
0.0.0.0 rinf.com
0.0.0.0 ronpaulinstitute.org
0.0.0.0 rumormillnews.com
0.0.0.0 ruptly.tv
0.0.0.0 russia-insider.com
0.0.0.0 samuel-warde.com
0.0.0.0 sana.sy
0.0.0.0 scrapetv.com
0.0.0.0 scrappleface.com
0.0.0.0 sentinelblog.com
0.0.0.0 sgtreport.com
0.0.0.0 sheepkillers.com
0.0.0.0 shoebat.com
0.0.0.0 silentmajoritypatriots.com
0.0.0.0 sitsshow.blogspot.com
0.0.0.0 skeptiko.com
0.0.0.0 smhwtfnews.com
0.0.0.0 somicom.com
0.0.0.0 southfront.org
0.0.0.0 sputniknews.com
0.0.0.0 stateofthenation2012.com
0.0.0.0 stgeorgegazette.com
0.0.0.0 stneotscitizen.com
0.0.0.0 stormcloudsgathering.com
0.0.0.0 straightstoned.com
0.0.0.0 stuppid.com
0.0.0.0 subjectpolitics.com
0.0.0.0 supremepatriot.com
0.0.0.0 the-newspapers.com
0.0.0.0 theamericanindependent.wordpress.com
0.0.0.0 theamericanrevenant.com
0.0.0.0 theantimedia.org
0.0.0.0 theblacksphere.net
0.0.0.0 thebostontribune.com
0.0.0.0 thedcgazette.com
0.0.0.0 theduran.com
0.0.0.0 theeconomiccollapseblog.com
0.0.0.0 thefederalistpapers.org
0.0.0.0 theforbiddenknowledge.com
0.0.0.0 thefreepatriot.org
0.0.0.0 thefreethoughtproject.com
0.0.0.0 thefreethoughtproject.com
0.0.0.0 thefrt.com
0.0.0.0 thehardtimes.net
0.0.0.0 theineptowl.com
0.0.0.0 thelapine.ca
0.0.0.0 thelastgreatstand.com
0.0.0.0 thelastlineofdefense.org
0.0.0.0 themarshallreport.wordpress.com
0.0.0.0 themillenniumreport.com
0.0.0.0 themindunleashed.com
0.0.0.0 themindunleashed.org
0.0.0.0 themuslimissue.wordpress.com
0.0.0.0 thenationalsun.com
0.0.0.0 thenewinquiry.com
0.0.0.0 thenewsdoctors.com
0.0.0.0 thenochill.com
0.0.0.0 theracketreport.com
0.0.0.0 therealstrategy.com
0.0.0.0 thereporterz.com
0.0.0.0 therightists.com
0.0.0.0 therightists.com
0.0.0.0 therundownlive.com
0.0.0.0 thesaker.is
0.0.0.0 theskunk.org
0.0.0.0 thespiritscience.net
0.0.0.0 thestatelyharold.com
0.0.0.0 thetimesoftheworld.com
0.0.0.0 thetruenews.info
0.0.0.0 thetruthdivision.com
0.0.0.0 thetruthseeker.co.uk
0.0.0.0 theunhivedmind.com
0.0.0.0 theuspatriot.com
0.0.0.0 thevalleyreport.com
0.0.0.0 thewatchtowers.com
0.0.0.0 thirdworldtraveler.com
0.0.0.0 thoughtoffense.wordpress.com
0.0.0.0 threepercenternation.com
0.0.0.0 thuglifevideos.com
0.0.0.0 tmzbreaking.com
0.0.0.0 tmzbusiness.com
0.0.0.0 tmzcomedy.com
0.0.0.0 tmzhiphop.com
0.0.0.0 tmzuncut.com
0.0.0.0 tmzurban.com
0.0.0.0 tmzworldnews.com
0.0.0.0 tmzworldstar.com
0.0.0.0 tmzworldstarnews.com
0.0.0.0 tomatobubble.com
0.0.0.0 topekasnews.com
0.0.0.0 toprightnews.com
0.0.0.0 totalworldnews.com
0.0.0.0 tradcatknight.blogspot.com
0.0.0.0 truepundit.com
0.0.0.0 trueworldhistory.info
0.0.0.0 truthbroadcastnetwork.com
0.0.0.0 truthfeed.com
0.0.0.0 truthfrequencyradio.com
0.0.0.0 truthkings.com
0.0.0.0 truthpoliticsnews.com
0.0.0.0 tv.infowars.com
0.0.0.0 twitchy.com
0.0.0.0 twitchy.com
0.0.0.0 uconservative.com
0.0.0.0 ufoholic.com
0.0.0.0 ultimateflashnews.com
0.0.0.0 unclesamsmisguidedchildren.com
0.0.0.0 unconfirmedsources.com
0.0.0.0 undergroundnewsreport.com
0.0.0.0 undergroundworldnews.com
0.0.0.0 unitedmediapublishing.com
0.0.0.0 us.blastingnews.com
0.0.0.0 usaaroundtheworldnews.com
0.0.0.0 usadailypolitics.com
0.0.0.0 usahitman.com
0.0.0.0 usanewshome.com
0.0.0.0 usapoliticsnow.com
0.0.0.0 uschronicle.com
0.0.0.0 usdcrisis.com
0.0.0.0 usdefensewatch.com
0.0.0.0 ushealthyadvisor.com
0.0.0.0 usherald.com
0.0.0.0 uspolitico.com
0.0.0.0 uspoln.com
0.0.0.0 usslibertyveterans.org
0.0.0.0 usuncut.com
0.0.0.0 usviral.info
0.0.0.0 vaclib.org
0.0.0.0 vigilantcitizen.com
0.0.0.0 viralactions.com
0.0.0.0 viralcocaine.com
0.0.0.0 viraldevil.com
0.0.0.0 viralliberty.com
0.0.0.0 viralmugshot.com
0.0.0.0 viralpropaganda.com
0.0.0.0 viralspeech.com
0.0.0.0 viralstuppid.com
0.0.0.0 wakeupthesheep.com
0.0.0.0 wakingupwisconsin.com
0.0.0.0 waterfordwhispersnews.com
0.0.0.0 wearechange.org
0.0.0.0 weeklyworldnews.com
0.0.0.0 weshapelife.org
0.0.0.0 whatdoesitmean.com
0.0.0.0 whitepower.com
0.0.0.0 wikispooks.com
0.0.0.0 winningdemocrats.com
0.0.0.0 witscience.org
0.0.0.0 wleb21.com
0.0.0.0 wm21news.com
0.0.0.0 worldnewsdailyreport.com
0.0.0.0 worldpoliticus.com
0.0.0.0 worldtruth.tv
0.0.0.0 www.4thmedia.org
0.0.0.0 www.abeldanger.net
0.0.0.0 www.abovetopsecret.com
0.0.0.0 www.activistpost.com
0.0.0.0 www.actualidadpanamericana.com
0.0.0.0 www.ae911truth.org
0.0.0.0 www.americanpatriotdaily.com
0.0.0.0 www.americanpoliticnews.com
0.0.0.0 www.americasfreedomfighters.com
0.0.0.0 www.americatalks.com
0.0.0.0 www.amren.com
0.0.0.0 www.amtvmedia.com
0.0.0.0 www.ancient-code.com
0.0.0.0 www.ancreport.com
0.0.0.0 www.angrypatriotmovement.com
0.0.0.0 www.anonews.co
0.0.0.0 www.anonymousnews.ru
0.0.0.0 www.antiwar.com
0.0.0.0 www.barenakedislam.com
0.0.0.0 www.bighairynews.com
0.0.0.0 www.bizpacreview.com
0.0.0.0 www.blastingnews.com
0.0.0.0 www.brasschecktv.com
0.0.0.0 www.breitbart.com
0.0.0.0 www.burrardstreetjournal.com
0.0.0.0 www.callthecops.net
0.0.0.0 www.celebmaestro.com
0.0.0.0 www.celebtricity.com
0.0.0.0 www.centerforsecuritypolicy.org
0.0.0.0 www.climatedepot.com
0.0.0.0 www.coasttocoastam.com
0.0.0.0 www.collective-evolution.com
0.0.0.0 www.conservativeinfidel.com
0.0.0.0 www.conservativeoutfitters.com
0.0.0.0 www.corbettreport.com
0.0.0.0 www.dailydiscord.com
0.0.0.0 www.dailyfinesser.com
0.0.0.0 www.dailynewsbin.com
0.0.0.0 www.dailysquib.co.uk
0.0.0.0 www.dailystormer.com
0.0.0.0 www.dangerandplay.com
0.0.0.0 www.darkmoon.me
0.0.0.0 www.darkpolitricks.com
0.0.0.0 www.davidwolfe.com
0.0.0.0 www.dcclothesline.com
0.0.0.0 www.debunkingskeptics.com
0.0.0.0 www.derfmagazine.com
0.0.0.0 www.disclose.tv
0.0.0.0 www.disclosuremedia.net
0.0.0.0 www.duffelblog.com
0.0.0.0 www.empiresports.co
0.0.0.0 www.endtime.com
0.0.0.0 www.enduringvision.com
0.0.0.0 www.eutimes.net
0.0.0.0 www.everynewshere.com
0.0.0.0 www.ewao.com
0.0.0.0 www.express.co.uk
0.0.0.0 www.eyeopening.info
0.0.0.0 www.floridasunpost.com
0.0.0.0 www.fort-russ.com
0.0.0.0 www.fourwinds10.net
0.0.0.0 www.freewoodpost.com
0.0.0.0 www.fridaymash.com
0.0.0.0 www.frontpagemag.com
0.0.0.0 www.gaia.com
0.0.0.0 www.geoengineeringwatch.org
0.0.0.0 www.globalpossibilities.org
0.0.0.0 www.globalresearch.ca
0.0.0.0 www.godlikeproductions.com
0.0.0.0 www.greanvillepost.com
0.0.0.0 www.hangthebankers.com
0.0.0.0 www.healthnutnews.com
0.0.0.0 www.hermancain.com
0.0.0.0 www.humortimes.com
0.0.0.0 www.huzlers.com
0.0.0.0 www.ifactsviral.com
0.0.0.0 www.infiniteunknown.net
0.0.0.0 www.informationclearinghouse.info
0.0.0.0 www.informationliberation.com
0.0.0.0 www.infostormer.com
0.0.0.0 www.infowars.com
0.0.0.0 www.inquisitr.com
0.0.0.0 www.intrepidreport.com
0.0.0.0 www.israelislamandendtimes.com
0.0.0.0 www.jewsnews.co.il
0.0.0.0 www.jihadwatch.org
0.0.0.0 www.johnnyrobish.com
0.0.0.0 www.kkk.com
0.0.0.0 www.landrypost.com
0.0.0.0 www.lgbtqnation.com
0.0.0.0 www.libertyvideos.com
0.0.0.0 www.lifezette.com
0.0.0.0 www.liftable.com
0.0.0.0 www.liveleak.com
0.0.0.0 www.lushforlife.com
0.0.0.0 www.mercola.com
0.0.0.0 www.militianews.com
0.0.0.0 www.moonofalabama.org
0.0.0.0 www.mrcblog.com
0.0.0.0 www.nationalenquirer.com
0.0.0.0 www.nationalinsiderpolitics.com
0.0.0.0 www.naturalnews.com
0.0.0.0 www.ncscooper.com
0.0.0.0 www.neonnettle.com
0.0.0.0 www.newcoldwar.org
0.0.0.0 www.newsbusters.org
0.0.0.0 www.newsmax.com
0.0.0.0 www.nowtheendbegins.com
0.0.0.0 www.organicandhealthy.org
0.0.0.0 www.pakalertpress.com
0.0.0.0 www.palmerreport.com
0.0.0.0 www.patdollard.com
0.0.0.0 www.paulcraigroberts.org
0.0.0.0 www.peoplemagazine.co.za
0.0.0.0 www.politicalgarbagechute.com
0.0.0.0 www.politicususa.com
0.0.0.0 www.powerlineblog.com
0.0.0.0 www.pravda.ru
0.0.0.0 www.pravdareport.com
0.0.0.0 www.prepperwebsite.com
0.0.0.0 www.presstv.ir
0.0.0.0 www.prisonplanet.com
0.0.0.0 www.proudcons.com
0.0.0.0 www.rapefugees.net
0.0.0.0 www.rawstory.com
0.0.0.0 www.react365.com
0.0.0.0 www.realfarmacy.com
0.0.0.0 www.redflagnews.com
0.0.0.0 www.redstate.com
0.0.0.0 www.reelnewsnetwork.com
0.0.0.0 www.renegadetribune.com
0.0.0.0 www.rense.com
0.0.0.0 www.revolutions2040.com
0.0.0.0 www.ridiculously.com
0.0.0.0 www.rockcitytimes.com
0.0.0.0 www.rt.com
0.0.0.0 www.russia-direct.org
0.0.0.0 www.satiratribune.com
0.0.0.0 www.satirewire.com
0.0.0.0 www.secretsofthefed.com
0.0.0.0 www.sensationalisttimes.com
0.0.0.0 www.shiftfrequency.com
0.0.0.0 www.shtfplan.com
0.0.0.0 www.silverdoctors.com
0.0.0.0 www.socialmediamorning.com
0.0.0.0 www.sott.net
0.0.0.0 www.strategic-culture.org
0.0.0.0 www.superstation95.com
0.0.0.0 www.surrealscoop.com
0.0.0.0 www.survivopedia.com
0.0.0.0 www.teaparty.org
0.0.0.0 www.theamericanmirror.com
0.0.0.0 www.theavocadonews.com
0.0.0.0 www.thebeaverton.com
0.0.0.0 www.theblaze.com
0.0.0.0 www.thecommonsenseshow.com
0.0.0.0 www.thecontroversialfiles.net
0.0.0.0 www.thedailybell.com
0.0.0.0 www.thedailymash.co.uk
0.0.0.0 www.thedailysheeple.com
0.0.0.0 www.theearthchild.co.za
0.0.0.0 www.theeventchronicle.com
0.0.0.0 www.thegatewaypundit.com
0.0.0.0 www.thelibertybeacon.com
0.0.0.0 www.themoralofthestory.us
0.0.0.0 www.thenewamerican.com
0.0.0.0 www.thenewsnerd.com
0.0.0.0 www.theoccidentalobserver.net
0.0.0.0 www.thepoke.co.uk
0.0.0.0 www.thepoliticalinsider.com
0.0.0.0 www.therebel.media
0.0.0.0 www.therussophile.org
0.0.0.0 www.theshovel.com.au
0.0.0.0 www.thesleuthjournal.com
0.0.0.0 www.thespoof.com
0.0.0.0 www.theunrealtimes.com
0.0.0.0 www.tmn.today
0.0.0.0 www.topinfopost.com
0.0.0.0 www.trueactivist.com
0.0.0.0 www.trunews.com
0.0.0.0 www.truth-out.org
0.0.0.0 www.truthandaction.org
0.0.0.0 www.truthdig.com
0.0.0.0 www.unz.com
0.0.0.0 www.usanewsflash.com
0.0.0.0 www.usanewsflash.com
0.0.0.0 www.usanewsinsider.com
0.0.0.0 www.usasupreme.com
0.0.0.0 www.uspoliticslive.com
0.0.0.0 www.vaccinationcouncil.org
0.0.0.0 www.vdare.com
0.0.0.0 www.veteransnewsnow.com
0.0.0.0 www.veteranstoday.com
0.0.0.0 www.viralthread.com
0.0.0.0 www.voltairenet.org
0.0.0.0 www.wakingtimes.com
0.0.0.0 www.washingtonexaminer.com
0.0.0.0 www.washingtonsblog.com
0.0.0.0 www.webdaily.com
0.0.0.0 www.wellaware1.com
0.0.0.0 www.westernjournalism.com
0.0.0.0 www.whatdoesitmean.com
0.0.0.0 www.whatreallyhappened.com
0.0.0.0 www.wnd.com
0.0.0.0 www.wonkie.com
0.0.0.0 www.worldnewspolitics.com
0.0.0.0 www.yesimright.com
0.0.0.0 www.youngcons.com
0.0.0.0 www.zambianobserver.com
0.0.0.0 www.zeppfeed.com
0.0.0.0 www.zerohedge.com
0.0.0.0 www.zootfeed.com
0.0.0.0 yournationnews.com
0.0.0.0 yournewswire.com
+9
View File
@@ -0,0 +1,9 @@
{
"name": "Fake News",
"description": "An in-progress collection of fake news outlets.",
"homeurl": "https://github.com/marktron/fakenews",
"frequency": "occasional",
"issues": "https://github.com/marktron/fakenews/issues",
"url": "https://raw.githubusercontent.com/marktron/fakenews/master/fakenews",
"license": "MIT"
}
+1544 -720
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -1 +0,0 @@
https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/gambling-hosts
+9
View File
@@ -0,0 +1,9 @@
{
"name": "Sinfonietta's gambling blocking hosts file",
"description": "A collection of category-specific host files.",
"homeurl": "https://github.com/Sinfonietta/hostfiles",
"frequency": "occasional",
"issues": "https://github.com/Sinfonietta/hostfiles/issues",
"url": "https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/gambling-hosts",
"license": "MIT"
}
File diff suppressed because it is too large Load Diff
+9
View File
@@ -0,0 +1,9 @@
{
"name": "pornhosts -- a consolidated anti porn hosts file",
"description": "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.",
"homeurl": "https://github.com/Clefspeare13/pornhosts",
"frequency": "occasional",
"issues": "https://github.com/Clefspeare13/pornhosts/issues",
"url": "https://raw.githubusercontent.com/Clefspeare13/pornhosts/master/0.0.0.0/hosts",
"license": "MIT"
}
@@ -0,0 +1,9 @@
{
"name": "Sinfonietta's snuff-site blocking hosts file",
"description": "A collection of category-specific host files.",
"homeurl": "https://github.com/Sinfonietta/hostfiles",
"frequency": "occasional",
"issues": "https://github.com/Sinfonietta/hostfiles/issues",
"url": "https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts",
"license": "MIT"
}
File diff suppressed because it is too large Load Diff
+9
View File
@@ -0,0 +1,9 @@
{
"name": "Sinfonietta's porn blocking hosts file",
"description": "A collection of category-specific host files.",
"homeurl": "https://github.com/Sinfonietta/hostfiles",
"frequency": "occasional",
"issues": "https://github.com/Sinfonietta/hostfiles/issues",
"url": "https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/pornography-hosts",
"license": "MIT"
}
-1
View File
@@ -1 +0,0 @@
https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/pornography-hosts
+6 -4
View File
@@ -2,11 +2,13 @@
Use subfolders under the `extensions` folder to house extensions to the final unified hosts file.
Currently this repo includes three extensions:
Currently, this repo includes four extensions:
* `gambling` for common online betting sites,
* `social` for common social media sites,
* `porn` for porn sites, and
* `fakenews` for fake news sites.
* `gambling` for common online betting sites,
* `social` for common social media sites, and
* `porn` for porn sites. You can optionally add either or both to your final unified file.
Here are some sample calls, which vary which extensions are included.
+995 -10
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -1 +0,0 @@
https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/social-hosts
+9
View File
@@ -0,0 +1,9 @@
{
"name": "Sinfonietta's social media blocking hosts file",
"description": "A collection of category-specific host files.",
"homeurl": "https://github.com/Sinfonietta/hostfiles",
"frequency": "occasional",
"issues": "https://github.com/Sinfonietta/hostfiles/issues",
"url": "https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/social-hosts",
"license": "MIT"
}
-474
View File
@@ -1,474 +0,0 @@
0.1.0 / 2016-03-25
==================
* Fresh hosts files generated.
* Issue #77: fix bug with emitting comments.
* Freshen everything.
* Issue #77: regenerate hosts following this fix.
* Issue #77: fix — account for empty lines.
* Issue #77: fix - trim trailing whitespace from input lines.
* Issue #117 — fix: restart network.service if applicable.
* Redme tweaks, format the numbers in the table.
* Readme tweaks.
* Latest hosts files and readme files.
* Fresh data from someonewhocares.org and malwaredomainlist.com.
* Better header section in the unified hosts file.
* Merge pull request #120 from FadeMind/master
* fix typo in IP address @ 392 line
* Updated hosts files and readme files.
* Updated data from someonewhocares.org.
* Updated makehosts.
* Rows to alternates are now generative.
* Global ectomy.
* Tweaks to updateReadme.py
* Moved the Python3 test earlier.
* Function updateReadme is now orphaned.
* Nor update the readmeData.json file for each build.
* First pass at updatereadme.py.
* Latest .gitignore file.
* Basic readmeData.json file.
* Latest, freshest hosts files and readme.
* update from someonewhocares.org.
* Update to lists of gambling sites.
* Merge pull request #105 from itachi46/improve-dns-flush
* Adding s.zkcdn.net, fixes #113.
* Updated readme files, and a fresh hosts file, 27,267 unique entries.
* Merge pull request #110 from matkoniecz/hostname
* Merge pull request #112 from matkoniecz/refuse_update
* Merge pull request #114 from xXKingRalphXx/master
* Merge pull request #111 from matkoniecz/readme
* Shortened python version check in updateHostsFile.py
* Changed variable
* include 127.0.1.1 <hostname> line partial, maybe full fix for #109
* make -n working not only in combination with -a
* replace 'prepend' by more true 'added near top'
* Merge pull request #106 from matkoniecz/typo
* remove typo in command example
* Added dnsmasq and better messaging
* Fredh hosts file. The unextended vanilla hosts file has 27,266 unique entries.
* Data update from MalwareDomainList.com.
* Table formatting.
* Updated readme and hosts files for all extensions.
* It's hosts, plural.
* Note the number of unique domains in each hosts file's header.
* Changed the readme to include a table of the available variants, with links.
* New main hosts file with 27,262 unique entries.
* New alternate hosts files generated.
* Data updates from four sources.
* Update the various hosts files.
* Making it work in Python3.
* Latest hosts files.
* Data source update
* Update to makehosts script.
* Fixes #102.
* Improved the readme.nmd files in subfolders.
* Checking in various fresh hosts files and readme.md.
* Shell script to generate various combinations of hosts files and extensions.
* Create different readme.md for different extension combinations.
* Latest unified hosts file with 27,254 unique entries.
* Better destinction between long and short form option specification.
* New option to pre-empt data source updates.
* Create the output folder if it doesn't pre-exist.
* Adding optional output path argument.
* Fresh hosts file with 27,254 unique entries.
* New domains found.
* Latest hosts file, with 27,251 unique entries.
* Update from yoyo.org.
* Latest unified hosts file with 27,255 unique entries.
* Update from malwaredomainlist.com.
* Merge pull request #100 from tyzbit/master
* Update update.info
* added tyzbit hosts
* Doh! Typo in the folder name,
* Update the readme in the Extensions folder.
* Update the readme to include the `gambling` extension.
* New hosts file with 27,214 unique entries.
* Data source updates.
* New extension: gambling. It's a start.
* Updated hosts file with 27,206 unique entries.
* Updated hosts file with 27,206 entries.
* Update the readme in the extensions folder.
* Update the readme for the new `social` extension for social media hosts.
* Social media hosts file retrieved and added to the repo.
* Merge branch 'extension.social'
* Added a source of social media hosts.
* Latest hosts file generated; no changes since last time.
* First commit, 'social' starter set.
* Data source update.
* Issue #92: fix - update.info is now treated as a list.
* Formatting of license.txt.
* Fresh unified hosts file with 27,206 unique entries.
* Data update from malwaredomainlist and yoyo.
* Fresh hosts file with 27,207 unique entries.
* Fresh unified hosts file with 27,161 unique entries.
* Updated data files.
* updated data and hosts file.
* Latest hosts file with 27,156 unique entries.
* Update hosts data.
* Latest unified hosts file with 27,150 unique entries.
* Data updates.
* Issues #59 and #97: yoyo appears to support https now.
* Amalgamated -> Unified.
* Change 'amalgamated' to 'unified'.
* Improve amalgaated hosts file heading.
* Ibid.
* Readme tweaking.
* Incremental tweaks to Readme.
* Latest amalgamated hosts file with 27,149 unique entries.
* Updated data sources.
* Latest amalgamated hosts file with 27,152 unique entries.
* Latest hosts file, with 27,151 unique entries.
* Updates from malwaredomainlist and someobewhocares.
* More readme refinements.
* Only process source folders, and not files that may be present.
* Typo.
* Typo.
* Updated amalgamated hosts file containing 27,150 unique entries.
* Update from Someonewhocares.org.
* Refine the readme.
* More succinct formatting of the generation time.
* Issue #57: fix - ignore blank lines in the whitelist.
* Document the --replace command line flag.
* Updated porn data source.
* New command-line option, --replace, to activate host file replacement when in --auto mode.
* Draw attention to the new extensions capability.
* This readme hack just might work.
* Additional docs for extensions under --auto.
* Place extension documentation within the extensions folder.
* Fresh hosts file with 27,148 unique entries.
* New source data from github.com/Sinfonietta for optional porn extension.
* Updated data from someonewhocares.org.
* Update the readme for extensions.
* Merge branch 'extensions'
* Changes to support extensions.
* Extension: a good source of porn links
* Latest amalgamated hosts file with 27,147 unique entries.
* Updated data sources.
* Data source update.
* First code alterations for extensions.
* FIrst extension: hosts file for porn sites
* Latest update has no host changes.
* Issue #91: fix - make the date and time windows filesystem-compatible.
* Latest amalgamated hosts file with 27,143 unique entries.
* Issue #91: fix - hoping this works better under windows.
* Fresh data from someonewhocares.org.
* Updated readme.
* Reference wikipedia for a fuller list of hosts file locations.
* Latest hosts file with 27,142 unique entries.
* Add 'fe80::1%lo0 localhost' which is in the OS X default hosts file.
* Latest amalgamated hosts file, with 27,142 unique entries.
* Update from malwaredomainlist.com.
* Latest amalgamated hosts file with 27,140 unique entries.
* Fix rendering of the 'local' domain found in someonewhocares.org. Resolves #89.
* More concise file summary details.
* The latest amalgamated hosts file with 27,141 unique entries.
* Add localhost.localdomain and broadcasthost to the base hosts. This fixes Issue #87.
* Updated hosts from yoyo.org.
* Latest amalgamated hosts file with 27,145 unique entries.
* Updated data from someonewhocares.org and malwaredomainlist.com.
* Use 'GMT' instead of +0000 notation.
* Better way to express the updated date.
* Latest amalgamated hosts file with 27,139 unique entries.
* Updated date from malwaredomainlist.org
* Update the readme to include a freshness date.
* Better elaborate the repo in the opening paragraph of the readme.
* Clarify different calls for Python 2.7 and Python 3.
* Update the readme. Closes #75.
* Issue #75: document the new --ip (long) and -i (short) option flags.
* Issue #75: pass-in the target IP address as an option.
* TARGET_HOST is now targetIP.
* Removed needless line feed in header.
* Merge pull request #82 from FadeMind/patch-1
* Automatically restart wicd service rule
* Issue #64: fix - ignore the backup copies of prior hosts files.
* Issue #77: fix - replace tabs with space.
* Issue #77: fix - Remove spurrious spaces.
* Small cleanup in the readme.
* Latest amalgamated hosts file, with 27,140 unique entries.
* Updated data sources.
* Readme improvements. Document the --auto option.
* Add a link to the latest raw version of the hosts file.
* Merge pull request #80 from gigaslayer131890/master
* Modified the removeOldHostsFile() function to keep backups of the old hosts file.
* Merge pull request #78 from joshuarosato/patch-1
* Update readme_template.md
* Suppress marginal messages in --auto mode.
* Less verbose when echoing source updates.
* Fresh new amalgamated hosts file, this one with 27,139 unique entries.
* Updates from three data sources.
* Merge pull request #73 from likyng/patch-2
* add service restart command for Arch Linux
* Happy New Year
* Import argparse, and add an --auto flag to run the update and merge with no prompts.
* Updated data and generated hosts file.
* Updated data, now with 27,146 unique entries.
* Latest hosts file with 27,145 unique entries.
* Updated data from mvps.org.
* Fixes #65.
* Remove initialized but thereafter unused variables.
* Added local pylint directives.
* Going with pylint's recommendation for singleton comparisons.
* Standardize on double quotes in print() calls everywhere.
* Split long code lines.
* Removed more superfluous parens.
* Removed unnecessary semicolons.
* Split long code line.
* Removed superfluous parens.
* Split long code line.
* Removed spaces after '(' and before ')'.
* Indent with spaces.
* Latest hosts file with 27,169 unique entries.
* Updated data sources.
* Revert "Variable 'target' is never used."
* Variable 'target' is never used.
* Line breaks in the readme.
* Line breaks in the readme.
* Updated amalgamated hosts file with 27,158 unique entries.
* Updated readme to clarify the goals of the repo.
* Updated two hosts sources.
* New amalgamated hosts file, now with 27,158 unique entries.
* Updated host file data from three sources.
* Merge pull request #63 from FadeMind/master
* automatic systemd NetworkManager service restart
* New amalgamated hosts file, now with 27,147 unique entries.
* Latest data refreshed.
* Adding a reference to hosts-file.net to the readme even though it's not included here anymore.
* Updated hosts file, now with 27,138 unique entries.
* Updated sata sources.
* Removed hosts-file.net as a source.
* Merge pull request #59 from FadeMind/patch-1
* Revert HTTPS for MDL due connection issue
* Update readme.md for the recent addition of the hosts-file.net data source (part deux).
* Update readme.md for the recent addition of the hosts-file.net data source.
* New amalgamated hosts file, now with 356,328 unique entries.
* Updated data from mvps.org, someonewhocares.org, and hosts-file.net.
* Merge pull request #55 from Jonadabe/Jonadabe-patch-4
* Create update.info
* Update hosts
* Create hosts
* Latest amalgamated hosts file, with 27,157 unique entries.
* Better handling of download errors.
* Updated three data sources.
* Updating my hosts list.
* Merge pull request #54 from FadeMind/master
* Using HTTPS for MDL hosts file source
* Updated the amalgamated hosts file, now with 27,199 entries.
* Update from MalwareDomainlist.com
* Updated personal hosts list.
* New amalgamated hosts file with 27,195 entries.
* Updated host sources.
* New amalgamated hosts file, containing 26,831 unique entries.
* Updated data source.
* Updated data sources.
* Updated the amalgamated hosts file with 26,799 unique entries.
* Updates from four data sources.
* Updated my hosts list.
* Merge pull request #48 from FadeMind/master
* update Reloading hosts file instructions for Linux
* Updated hosts file with 26,933 entries.
* Updated data from malwaredomainlist.com.
* Add at the top.
* Merge pull request #46 from FrancoGag/master
* Don't print '::1 localhost'
* Fix IndentationError.
* Refactor: whitespace for consistency and readability.
* Fresh amalgamated hosts file with 26,932 unique entries.
* Updated data sources.
* Merge pull request #45 from hd074/master
* Merge pull request #43 from FrancoGag/master
* better delete after updating so we dont end up with an empty hosts file if update goes wrong and causes a crash
* hotfix for duplicates and artefacts
* Removed sys.exit()
* Merge pull request #44 from mariusv/patch-2
* OSX DNS flush to cover El Capitan
* Check if 'hosts' file exists
* Latest readme: 26,899 entries.
* Why list the local data file name. I don't get it.
* Revert "Why list the local source file name? I don't get it."
* Why list the local source file name? I don't get it.
* Not happy with the way this lists not the source URLS, but the local file names.
* Updated data files.
* Better handle the no-domain-in-the-line error in data. This closes #38.
* Merge pull request #36 from FrancoGag/master
* Renamed removeDups() to removeDupsAndExcl()
* Fixed: Exclude domains in the whitelist (2)
* Fixed: Exclude domains in the whitelist
* Create whitelist
* Exclude domains contained in a whitelist
* Ignore whitelist file
* Update updateHostsFile.py
* Delete .DS_Store from Data
* Updated hosts file, still with 26,888 entries.
* Updated data and new amalgamated hosts file with 26,888 entries.
* Added a line to myhosts, for better clarity in the generated file.
* Documentation for the myhosts file.
* Merge pull request #34 from qutorial/myhosts
* Merge pull request #35 from qutorial/ubuntufix
* Fixed ubuntu hosts file relaod
* Update to include preamble handling
* One new host, so updated hosts file.
* New host
* Updated hosts file with 26,891 unique entries.
* File is unavailable. Don't raise this error; just eat it.
* Trim whitespace in updateHostsFile.py
* Updated data files.
* Merge pull request #33 from qutorial/migrationToPython3
* Cross-python implementation
* Migrated to Python 3
* Merge pull request #30 from qqo/master
* 'suffix' in regex matches empty string on all the data files, except one (incorrect) line containing port: 0.0.0.0 telemetry.appex.bing.net:443 The resulting entry in hosts file generated like this: 0.0.0.0 telemetry.appex.bing.net :443 which is incorrect. The bug was not spotted only because the incorrect line in the data source was after the correct line without port, thus it was ignored and not added to resulting hosts file.
* Explicitly lowercase hostname to prevent mixed-case duplicates.
* New amalgamated hosts file, now with 26,938 unique entries.
* Updated data from three hosts providers.
* Fresh amalgamated hosts file with 26,826 entries.
* Updated data from someonewhocares.org.
* Merge pull request #29 from qutorial/master
* os.path.join introduced
* Latest amalgamated hosts file.
* This domain dishes autoplay video which I hate.
* New amalgamated hosts file with 26,827 unique entries.
* Refinements to the readme template.
* Updated data from yoyo.org.
* New amalgamated hosts file with 26,827 unique entries.
* Refreshed data sources.
* Better explanation of why 0.0.0.0 is faster than 127.0.0.1.
* Prettier formatting of the number of host records.
* Latest amalgamated hosts file, now 26,823 entries.
* Update my ad-hoc hosts list.
* Fresh amalgamated hosts file: 26,822 entries.
* Updated other data sources.
* Added apps.id.net. Also sorted my hosts.
* Latest amalgamated hosts file.
* Two more data updates.
* Added save-your-pc.info
* New hosts file, 26,792 uniques.
* Update from host data sources.
* Host file now lists 127.0.0.1 localhost, 0.0.0.0 the others.
* The latest amalgamated hosts file with 26792 unique entries.
* Updated readme.
* Updated source files.
* Reverting the target host back to 0.0.0.0.
* Updated hosts from data, and generated a new amalgamated hosts file.
* Fix the update script so we don't write any dupes.
* Replace the target host from `0.0.0.0` with `0`.
* Use the proper URL for my list of hosts.
* New popup seen today.
* Added the readme changes suggested by @mpsOxygen to the template file.
* Merge pull request #23 from mpsOxygen/patch-1
* Updated all sources and the amalgamated hosts file.
* Update readme.md
* Update the readme-template and, so, readme.md.
* Deleted the otherData folder - not in use.
* Issue #16: fix - Script is Python version 2.7.10
* Latest consolidated hosts file, 26,385 entries.
* Latest hosts files from all providers.
* Issue #12: fix - refresh from adaway.org is failing with HTTPS so fallback to HTTP.
* Issue #12: Adding the hosts from adaway.org.
* MIT License. Fixes Issue #19.
* Updated all data sources, and the amalgamated hosts file.
* Merge pull request #11 from nomadturk/patch-2
* Updated all the host-record sources, and generated a fresh consolidated hosts file.
* Updated all input sources and merged into a new consolidated hosts file; 25803 items now.
* Updated the hosts data from all sources, and updated the amalgamated hosts file.
* Update update.info
* Merge pull request #10 from nomadturk/patch-1
* Update update.info
* Issue #8: fix - Update the stripRule() function to be smarter about whitespace preceding comments. Thanks @caneylan.
* Merge pull request #7 from borisschapira/master
* Updated the hosts file with fresh data from all sources.
* Updated the hosts file with fresh data from all sources.
* Updated the hosts file with fresh data from all sources.
* Updated data and the generated consolidated hosts file.
* Removed hosts-file.net, too many false-positives.
* Updated latest data
* Updated hosts file now has 446,743 entries.
* Merge branch 'linuxlefty-master'
* (Ibid.)
* Merge branch 'master' of https://github.com/linuxlefty/hosts into linuxlefty-master
* Addeed mackeeperapp.zeobit.com to my set of bad domains.
* livepassdl.conviva.com is required for streaming CBC Sports in Canada.
* Latest update of all source files.
* Normalizing hosts and better duplicate detction added
* Added hpHosts (hosts-file.net) as a source
* Added support for ZIP compressed files
* Removing vim swap file
* Added yoyo.org adserver lists as data source
* Refreshed hosts from malwaredomainlist.com, mvps.org, and someonewhocares.org
* Refreshed the hosts from http://malwaredomainlist.com/hosts and http://someonewhocares.org/hosts.
* giving some love to readme.md
* Updated the hosts file from all sources.
* Updated all hosts, and the combined merged hosts file
* Whoops, corrected an section that somehow went unresolved.
* Merge branch 'master' of https://github.com/l1m5/hosts into l1m5-master
* Source update.
* Added query to user for moving the hosts file into place.
* Source update.
* Correcting syntax error with elif.
* Added back instructions for Windows users on where to move their hosts file to. Resolves #5. I'm opening a new issue for adding this for Windows.
* Added support for automatically moving the hosts file into place and flushing the DNS Cache for Mac and Linux. This addresses part of Issue #5, but I still need to do Windows.
* Updated sources.
* Write out how many unique entries were generated in the readme.md file. Resolves #3.
* Updated the read me -- now it has 23,073 host entries.
* Updates from all sources, and a new merge.
* Print out copy locations on success. Now it's easy to copy/paste where the host file needs to go.
* Updating sources
* Source update.
* Update sources.
* Updated from sources.
* Other data, not included in the processing, but under consideration for the future.
* Updated with the latest from the Maleware Domain List and Someone Who Cares.
* Updated sources.
* Updated hosts files.
* Update sources.
* Updated sources and hosts file.
* Updated readme file: 22,690 entries.
* Updated amalgamated hosts file
* Latest hosts file from mvps.org
* Latest hosts file from malwaredomainlist.com
* Fresh hosts file from someonewhocares.org
* Source update.
* Updated the readme to include a reference to malwaredomainlist.com.
* Merge pull request #2 from l1m5/master
* Updated README to include info on flushing DNS cache.
* Updating with new entries from sources.
* Colorized prompts for readability. This commit closes #2.
* Resolves infinite loop error introduced in 997606b. Whether you entered yes or no to the "more entries" dialog, you'd still be in the loop. Also, we now check to see if the custom domain is blank
* Woops, left debug logic in last commit.
* Added ability to exclude domains. This commit closes #1. I always hated that Hulu would freak out when I generated a new hosts file. It checks to make sure that it can access its ad servers before it will start streaming. I'm assuming people have other sites similar to this, so the script now can be extended with common and custom domains to exclude.
* Added new source malwaredomainlist.com. This source does not add much in the way of ad-blocking, but it a trusted source of malware domains.
* New hosts file generated using script. This commit is the first merged hosts file to utilize the updateHostsFile.py script. The only working difference is that it pulled in a new someonewhocares.org hosts file.
* Added script to handle updates to hosts sources. updateHostsFile.py can handle either simply combining local hosts files you have checked in, or it can go out to the Internet to update your source files. It also handles automatically generating a header and removing duplicates from the list.
* New merge without duplicates -- these were commented-out previously
* Latest merged hosts file.
* Google analytics handled by someonewhocares.org host file
* Jan 30th, 2013 hosts file from someonewhocares.org
* January 2018 2013 hosts file from MVPs.org
* Hosts file, Dec 26 2012 version, by Dan Pollock at http://someonewhocares.org/hosts/
* Updated Readme. Now with 24,245 hosts listed.
* Latest merged hosts file.
* Latest MVPs hosts file
* Latest hosts file
* Latest merged hosts file.
* Dan Pollock's latest version, Nov 3 2012.
* Latest version available of the hosts from MVPs.org Oct 18 2012 version.
* Readme: removed a style block.
* Updated the readMe
* Updated the readMe
* This reverts commit cc759532b0d3c1461ac12d9e0ffb738c2d249e00.
* Updated the readMe
* Updated the readMe.
* Added hosts file location for Android devices.
* Docs are now the main readMe.
* Added a rfirst eadMe to the repo.
* Merge and deduce of all sources. Result: 22210 unique host entries.
* Updated to the September 21 2012 version from http://someonewhocares.org/hosts/
* Updated to the August 18th 2012 version of the MVPs host file.
* Updating new hosts files from Dan and the MVPs.
* Blocked ssl.google-analytics.com, which the MVPs block.
* Latest merge.
* Added twitter.cm as one of my peeves.
* Promoted the output folder to the root. Added my own domains.
* Hosts file from mvps.org, http://winhelp2002.mvps.org/hosts.txt, updated: March-30-2012
* Hosts file from http://someonewhocares.org/hosts/ Last updated: Apr 11th, 2012
* DOcs folder and first entry: hostsLocations.md
+48318 -16798
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 © 2016 Steven Black
Copyright © 2018 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
-14
View File
@@ -1,14 +0,0 @@
#!/bin/sh
# These create various alternate hosts files by combining and adding the gambling, porn, and social media extensions.
python3 updateHostsFile.py -a -o alternates/gambling -e gambling
python3 updateHostsFile.py -a -n -o alternates/porn -e porn
python3 updateHostsFile.py -a -n -o alternates/social -e social
python3 updateHostsFile.py -a -n -o alternates/gambling-porn -e gambling porn
python3 updateHostsFile.py -a -n -o alternates/gambling-social -e gambling social
python3 updateHostsFile.py -a -n -o alternates/porn-social -e porn social
python3 updateHostsFile.py -a -n -o alternates/gambling-porn-social -e gambling porn social
python3 updateHostsFile.py -a -n
# Update the readmes.
python3 updateReadme.py
+118
View File
@@ -0,0 +1,118 @@
#!/usr/bin/env python
# Script by gfyoung
# https://github.com/gfyoung
#
# This Python script will generate hosts files and update the readme file.
from __future__ import print_function
import sys
import argparse
import subprocess
def print_failure(msg):
"""
Print a failure message.
Parameters
----------
msg : str
The failure message to print.
"""
print("\033[91m" + msg + "\033[0m")
def update_hosts_file(*flags):
"""
Wrapper around running updateHostsFile.py
Parameters
----------
flags : varargs
Commandline flags to pass into updateHostsFile.py. For more info, run
the following command in the terminal or command prompt:
```
python updateHostsFile.py -h
```
"""
if subprocess.call([sys.executable, "updateHostsFile.py"] + list(flags)):
print_failure("Failed to update hosts file")
def update_readme_file():
"""
Wrapper around running updateReadme.py
"""
if subprocess.call([sys.executable, "updateReadme.py"]):
print_failure("Failed to update readme file")
def main():
parser = argparse.ArgumentParser(description="Creates custom hosts "
"file from hosts stored in "
"data subfolders.")
parser.parse_args()
update_hosts_file("-a", "-o",
"alternates/gambling",
"-e", "gambling")
update_hosts_file("-a", "-n", "-o",
"alternates/porn",
"-e", "porn")
update_hosts_file("-a", "-n", "-o",
"alternates/social",
"-e", "social")
update_hosts_file("-a", "-n", "-o",
"alternates/fakenews",
"-e", "fakenews")
update_hosts_file("-a", "-n", "-o",
"alternates/fakenews-gambling",
"-e", "fakenews", "gambling")
update_hosts_file("-a", "-n", "-o",
"alternates/fakenews-porn",
"-e", "fakenews", "porn")
update_hosts_file("-a", "-n", "-o",
"alternates/fakenews-social",
"-e", "fakenews", "social")
update_hosts_file("-a", "-n", "-o",
"alternates/gambling-porn",
"-e", "gambling", "porn")
update_hosts_file("-a", "-n", "-o",
"alternates/gambling-social",
"-e", "gambling", "social")
update_hosts_file("-a", "-n", "-o",
"alternates/porn-social",
"-e", "porn", "social")
update_hosts_file("-a", "-n", "-o",
"alternates/fakenews-gambling-porn",
"-e", "fakenews", "gambling", "porn")
update_hosts_file("-a", "-n", "-o",
"alternates/fakenews-gambling-social",
"-e", "fakenews", "gambling", "social")
update_hosts_file("-a", "-n", "-o",
"alternates/fakenews-porn-social",
"-e", "fakenews", "porn", "social")
update_hosts_file("-a", "-n", "-o",
"alternates/gambling-porn-social",
"-e", "gambling", "porn", "social")
update_hosts_file("-a", "-n", "-o",
"alternates/fakenews-gambling-porn-social",
"-e", "fakenews", "gambling", "porn", "social")
update_hosts_file("-a", "-n")
# Update the readme files.
update_readme_file()
if __name__ == "__main__":
main()
+39
View File
@@ -0,0 +1,39 @@
{
"name": "hosts",
"version": "1.3.6",
"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": "",
"scripts": {
"test": "python3 testUpdateHostsFile.py",
"start": "python3 makeHosts.py",
"release": "release-it"
},
"repository": {
"type": "git",
"url": "git+https://github.com/StevenBlack/hosts.git"
},
"keywords": [
"python",
"unified-hosts",
"malware",
"ad-blocker",
"porn-filter",
"social-media-filter",
"hosts",
"privacy",
"protection",
"pornblocker",
"gambling-filter",
"ransomware",
"trojans"
],
"author": "Steven Black (https://github.com/StevenBlack)",
"license": "MIT",
"bugs": {
"url": "https://github.com/StevenBlack/hosts/issues"
},
"homepage": "https://github.com/StevenBlack/hosts#readme",
"devDependencies": {
"release-it": "^4.2.0"
}
}
+254 -84
View File
@@ -1,49 +1,94 @@
#Unified hosts file with base extensions
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
This repository consolidates several reputable `hosts` files, and merges them into a unified hosts file
with duplicates removed. This repo provides several hosts files tailored to you need to block.
# Unified hosts file with base extensions
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: **March 23 2018**.
* Here's the [raw hosts file with base extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) containing 56,125 entries.
* Last updated: **June 04 2016**.
* Here's the [raw hosts file with base extensions](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) containing 27,050 entries.
### List of all hosts file variants
Host file recipe | Readme | Raw hosts | Unique domains
---------------- |:------:|:---------:|:-------------:
Unified hosts = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 27,050
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) | 27,764
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) | 32,323
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) | 27,280
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) | 33,037
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) | 27,994
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) | 32,553
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) | 33,267
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
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) | 56,125 | [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) | 56,798 | [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) | 57,637 | [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) | 65,663 | [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,272 | [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) | 58,310 | [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) | 66,336 | [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) | 57,945 | [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) | 67,175 | [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) | 58,784 | [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) | 66,810 | [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) | 67,848 | [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) | 59,457 | [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) | 67,483 | [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) | 68,322 | [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) | 68,995 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**Expectation**: These unified hosts files should serve all devices, regardless of OS.
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified here
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and
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](http://www.malwaredomainlist.com/) | [raw](http://www.malwaredomainlist.com/hostslist/hosts.txt) | weekly | 'can be used for free by anyone' | [issues](http://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)
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](http://someonewhocares.org) | How to make the internet not suck (as much). |[link](http://someonewhocares.org/hosts/) | [raw](http://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)
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 | 'non-commercial with attribution' | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)
CoinBlocker | Simple lists that can help prevent cryptomining in the browser or other applications |[link](https://github.com/ZeroDot1/CoinBlockerLists) | [raw](https://raw.githubusercontent.com/ZeroDot1/CoinBlockerLists/master/hosts_browser) | frequently | GPLv3 | [issues](https://github.com/ZeroDot1/CoinBlockerLists/issues)
tyzbit | Microsoft tracking domains. A fork of this repo providing additional data. |[link](https://github.com/tyzbit/hosts/blob/master/data/tyzbit/hosts) | [raw](https://raw.githubusercontent.com/tyzbit/hosts/master/data/tyzbit/hosts) | rarely | | [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 | | [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://github.com/azet12/KADhosts) | [raw](https://raw.githubusercontent.com/azet12/KADhosts/master/KADhosts.txt) | frequently | GPLv3 | [issues](https://github.com/azet12/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)
Updated `hosts` files from the following locations are always unified and included:
* The [Adaway hosts file](http://adaway.org/hosts.txt), updated regularly.
* MVPs.org Hosts file at [http://winhelp2002.mvps.org/hosts.htm](http://winhelp2002.mvps.org/hosts.htm), updated
monthly, or thereabouts.
* Dan Pollock at [http://someonewhocares.org/hosts/](http://someonewhocares.org/hosts/) updated regularly.
* Malware Domain List at [http://www.malwaredomainlist.com/](http://www.malwaredomainlist.com/), updated regularly.
* Peter Lowe at [http://pgl.yoyo.org/adservers/](http://pgl.yoyo.org/adservers/), updated regularly.
* My own small list in raw form [here](https://raw.github.com/StevenBlack/hosts/master/data/StevenBlack/hosts).
## Extensions
The unified hosts file is extensible. You manage extensions by curating the `extensions/` folder tree.
See the `social`, `gambling`, and `porn` extension which are included in this repo, for example.
The unified hosts file is extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
The `updateHostsFile.py` script, which is python 2.7 and Python 3-compatible, will generate a unified hosts file
based on the sources in the local `data/` subfolder. The script will prompt you Whether it should fetch updated
versions (from locations defined by the update.info text file in each source's folder), otherwise it will use the
`hosts` file that's already there.
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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
@@ -62,78 +107,143 @@ versions (from locations defined by the update.info text file in each source's f
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace` flag.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate over them.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names of subfolders below the `extensions` folder
containing additional category-specific hosts files to include in the amalgamation. Example: `--extensions porn` or
`-e social porn`.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the target. Default is `0.0.0.0`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file in a subfolder. If the subfolder does not
exist, it will be created.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard section, at the top containing lines like `127.0.0.1 localhost`. This is useful for configuring proximate DNS services on the local network.
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/` folder, and specify its update url in
`update.info` file.
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the `extensions/` folder. Again the url in
`update.info` controls where this extension finds its updates.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents of this file are prepended to the
unified hosts file during the update process.
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo from `origin` in the future.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts file.
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist `google-analytics.com`, that domain and all its
subdomains won't be merged into the final hosts file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo
from `origin` in the future.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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 used by all operating
systems to map hostnames to IP addresses.
A hosts file, named `hosts` (with no file extension), is a plain-text file
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`. Therefore if a domain name is
resolved by the `hosts` file, the request never leaves your computer.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware, and other irritants.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these lines to your hosts
file will do it:
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
127.0.0.1 ad.ae.doubleclick.net
127.0.0.1 ad.ar.doubleclick.net
127.0.0.1 ad.at.doubleclick.net
127.0.0.1 ad.au.doubleclick.net
127.0.0.1 ad.be.doubleclick.net
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Using `0.0.0.0` is faster because you don't have to wait for a timeout. It also does not interfere
with a web server that may be running on the local PC.
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
We tried that. Using `0` doesn't work universally.
@@ -147,17 +257,22 @@ editor.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## 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.
## Updating hosts file on Windows
### Mac OS X
Open a Terminal and run:
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
`sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder`
```
updateHostsWindows.bat
```
### Windows
Open a Command Prompt:
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
@@ -167,11 +282,38 @@ Open a Command Prompt:
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
and run:
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
`ipconfig /flushdns`
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
@@ -186,6 +328,19 @@ Open a Terminal and run with root privileges:
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
@@ -199,13 +354,28 @@ The goals of this repo are to:
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A hosts source should be frequently
updated by its maintainers with both additions and removals. The larger the hosts file, the higher the level of
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](http://hosts-file.net) is **not** included
here because it is very large (300,000+ entries) and doesn't currently display a corresponding high level of curation
activity.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile devices under a variety of operating
systems.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.
+1 -1
View File
File diff suppressed because one or more lines are too long
+221 -74
View File
@@ -1,41 +1,63 @@
#Unified hosts file @EXTENSIONS_HEADER@
[![Build Status](https://travis-ci.org/StevenBlack/hosts.svg?branch=master)](https://travis-ci.org/StevenBlack/hosts)
This repository consolidates several reputable `hosts` files, and merges them into a unified hosts file
with duplicates removed. This repo provides several hosts files tailored to you need to block.
# Unified hosts file @EXTENSIONS_HEADER@
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: **@GEN_DATE@**.
* Here's the [raw hosts file @EXTENSIONS_HEADER@](https://raw.githubusercontent.com/StevenBlack/hosts/master/@SUBFOLDER@hosts) containing @NUM_ENTRIES@ entries.
### List of all hosts file variants
Host file recipe | Readme | Raw hosts | Unique domains
---------------- |:------:|:---------:|:-------------:
The **Non GitHub mirror** is the link to use for some hosts file managers like
[Hostsman for Windows](http://www.abelhadigital.com/hostsman) that don't work
with Github download links.
Host file recipe | Readme | Raw hosts | Unique domains | Non Github mirror
---------------- |:------:|:---------:|:--------------:|:-------------:
@TOCROWS@
**Expectation**: These unified hosts files should serve all devices, regardless of OS.
**Expectation**: These unified hosts files should serve all devices, regardless
of OS.
## Sources of hosts data unified here
## Sources of hosts data unified in this variant
Updated `hosts` files from the following locations are always unified and included:
Updated `hosts` files from the following locations are always unified and
included:
Host file source | Description | Home page | Raw hosts | Update frequency | License | Issues
-----------------|-------------|:---------:|:---------:|:----------------:|:-------:|:------:
@SOURCEROWS@
* The [Adaway hosts file](http://adaway.org/hosts.txt), updated regularly.
* MVPs.org Hosts file at [http://winhelp2002.mvps.org/hosts.htm](http://winhelp2002.mvps.org/hosts.htm), updated
monthly, or thereabouts.
* Dan Pollock at [http://someonewhocares.org/hosts/](http://someonewhocares.org/hosts/) updated regularly.
* Malware Domain List at [http://www.malwaredomainlist.com/](http://www.malwaredomainlist.com/), updated regularly.
* Peter Lowe at [http://pgl.yoyo.org/adservers/](http://pgl.yoyo.org/adservers/), updated regularly.
* My own small list in raw form [here](https://raw.github.com/StevenBlack/hosts/master/data/StevenBlack/hosts).
## Extensions
The unified hosts file is extensible. You manage extensions by curating the `extensions/` folder tree.
See the `social`, `gambling`, and `porn` extension which are included in this repo, for example.
The unified hosts file is extensible. You manage extensions by curating the
`extensions/` folder tree. See the `fakenews`, `social`, `gambling`, and `porn` extension
folders.
## Generate your own unified hosts file
The `updateHostsFile.py` script, which is python 2.7 and Python 3-compatible, will generate a unified hosts file
based on the sources in the local `data/` subfolder. The script will prompt you Whether it should fetch updated
versions (from locations defined by the update.info text file in each source's folder), otherwise it will use the
`hosts` file that's already there.
**Note** if you are using Python 3, please install the dependencies with:
pip3 install --user -r requirements.txt
**Note** if you are using Python 2, please install the dependencies with:
pip2 install --user -r requirements_python2.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, just run:
python testUpdateHostsFile.py
The `updateHostsFile.py` script, which is Python 2.7 and Python 3-compatible,
will generate a unified hosts file based on the sources in the local `data/`
subfolder. The script will prompt you whether it should fetch updated
versions (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
@@ -54,78 +76,143 @@ versions (from locations defined by the update.info text file in each source's f
`--auto`, or `-a`: run the script without prompting. When `--auto` is invoked,
* Hosts data sources, including extensions, are updated.
* No extensions are included by default. Use the `--extensions` or `-e` flag to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace` flag.
* No extensions are included by default. Use the `--extensions` or `-e` flag
to include any you want.
* Your active hosts file is *not* replaced unless you include the `--replace`
flag.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate over them.
`--backup`, or `-b`: Make a backup of existing hosts file(s) as you generate
over them.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names of subfolders below the `extensions` folder
containing additional category-specific hosts files to include in the amalgamation. Example: `--extensions porn` or
`-e social porn`.
`--extensions <ext1> <ext2> <ext3>`, or `-e <ext1> <ext2> <ext3>`: the names
of subfolders below the `extensions` folder containing additional
category-specific hosts files to include in the amalgamation. Example:
`--extensions porn` or `-e social porn`.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the target. Default is `0.0.0.0`.
`--flush-dns-cache`, or `-f`: skip the prompt for flushing the DNS cache.
Only active when `--replace` is also active.
`--ip nnn.nnn.nnn.nnn`, or `-i nnn.nnn.nnn.nnn`: the IP address to use as the
target. Default is `0.0.0.0`.
`--keepdomaincomments`, or `-k`: `false` (default) or `true`, keep the comments
that appear on the same line as domains. The default is `false` since some
router-based implementations can't handle comments in-line with hosts.
`--noupdate`, or `-n`: skip fetching updates from hosts data sources.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file in a subfolder. If the subfolder does not
exist, it will be created.
`--output <subfolder>`, or `-o <subfolder>`: place the generated source file
in a subfolder. If the subfolder does not exist, it will be created.
`--replace`, or `-r`: trigger replacing your active hosts
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard section, at the top containing lines like `127.0.0.1 localhost`. This is useful for configuring proximate DNS services on the local network.
`--skipstatichosts`, or `-s`: `false` (default) or `true`, omit the standard
section at the top, containing lines like `127.0.0.1 localhost`. This is
useful for configuring proximate DNS services on the local network.
`--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
the performances under Windows (with DNS Client service enabled).
`--minimise`, or `-m`: `false` (default) or `true`, like `--compress`, but puts
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.
## How do I control which sources are unified?
Add one or more *additional* sources, each in a subfolder of the `data/` folder, and specify its update url in
`update.info` file.
Add one or more *additional* sources, each in a subfolder of the `data/`
folder, and specify the `url` key in its `update.json` file.
Add one or more *optional* extensions, which originate from subfolders of the `extensions/` folder. Again the url in
`update.info` controls where this extension finds its updates.
Add one or more *optional* extensions, which originate from subfolders of the
`extensions/` folder. Again the url in `update.json` controls where this
extension finds its updates.
Create an *optional* `blacklist` file. The contents of this file (containing a
listing of additional domains in `hosts` file format) are appended to the
unified hosts file during the update process. A sample `blacklist` is
included, and may be modified as you desire.
* NOTE: The `blacklist` is not tracked by git, so any changes you make won't
be overridden when you `git pull` this repo from `origin` in the future.
### How do I include my own custom domain mappings?
If you have custom hosts records, place them in file `myhosts`. The contents of this file are prepended to the
unified hosts file during the update process.
If you have custom hosts records, place them in file `myhosts`. The contents
of this file are prepended to the unified hosts file during the update
process.
The `myhosts` file is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo from `origin` in the future.
The `myhosts` file is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
### How do I prevent domains from being included?
The domains you list in the `whitelist` file are excluded from the final hosts file.
The domains you list in the `whitelist` file are excluded from the final hosts
file.
The `whitelist` uses partial matching. Therefore if you whitelist `google-analytics.com`, that domain and all its
subdomains won't be merged into the final hosts file.
The `whitelist` uses partial matching. Therefore if you whitelist
`google-analytics.com`, that domain and all its subdomains won't be merged
into the final hosts file.
The `whitelist` is not tracked by git, so any changes you make won't be overridden when you `git pull` this repo
from `origin` in the future.
The `whitelist` is not tracked by git, so any changes you make won't be
overridden when you `git pull` this repo from `origin` in the future.
## How can I contribute hosts records?
If you discover sketchy domains you feel should be included here, here are some ways to contribute them.
### Option 1: contact one of our hosts sources
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
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).
Then, submit a pull request.
**WARNING**: this is less desireable than Option 1 because the ongoing curation falls on us and what you've just done is created more work for us.
### Option 3: create your own hosts list as a repo on Github
If you're able to curate your own collection of sketchy domains, then curate your own hosts list. Then signal the existance of your remo 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 used by all operating
systems to map hostnames to IP addresses.
A hosts file, named `hosts` (with no file extension), is a plain-text file
used by all operating systems to map hostnames to IP addresses.
In most operating systems, the `hosts` file is preferential to `DNS`. Therefore if a domain name is
resolved by the `hosts` file, the request never leaves your computer.
In most operating systems, the `hosts` file is preferential to `DNS`.
Therefore if a domain name is resolved by the `hosts` file, the request never
leaves your computer.
Having a smart `hosts` file goes a long way towards blocking malware, adware, and other irritants.
Having a smart `hosts` file goes a long way towards blocking malware, adware,
and other irritants.
For example, to nullify requests to some doubleclick.net servers, adding these lines to your hosts
file will do it:
For example, to nullify requests to some doubleclick.net servers, adding these
lines to your hosts file will do it:
# block doubleClick's servers
127.0.0.1 ad.ae.doubleclick.net
127.0.0.1 ad.ar.doubleclick.net
127.0.0.1 ad.at.doubleclick.net
127.0.0.1 ad.au.doubleclick.net
127.0.0.1 ad.be.doubleclick.net
0.0.0.0 ad.ae.doubleclick.net
0.0.0.0 ad.ar.doubleclick.net
0.0.0.0 ad.at.doubleclick.net
0.0.0.0 ad.au.doubleclick.net
0.0.0.0 ad.be.doubleclick.net
# etc...
## We recommend using `0.0.0.0` instead of `127.0.0.1`
Using `0.0.0.0` is faster because you don't have to wait for a timeout. It also does not interfere
with a web server that may be running on the local PC.
Traditionally most host files use `127.0.0.1`, the *loopback address*, to establish an IP connection to the local machine.
We prefer to use `0.0.0.0`, which is defined as a non-routable meta-address used to designate an invalid, unknown,
or non applicable target.
Using `0.0.0.0` is empirically faster, possibly because there's no wait for a timeout resolution. It also does not
interfere with a web server that may be running on the local PC.
## Why not use just `0` instead of `0.0.0.0`?
We tried that. Using `0` doesn't work universally.
@@ -139,17 +226,22 @@ editor.
**Windows**: `%SystemRoot%\system32\drivers\etc\hosts` folder.
## 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.
## Updating hosts file on Windows
### Mac OS X
Open a Terminal and run:
On Linux and Mac OS X, you can simply run the Python script, but on Windows, more
work is required due to compatibility issues in implementing some of the functionality
for Windows. It is preferable to run the batch file as follows:
`sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder`
```
updateHostsWindows.bat
```
### Windows
Open a Command Prompt:
This file MUST be run in command prompt with administrator privileges in
the repository directory. In addition to updating the hosts file, it can also
replace the existing hosts file, and reload the DNS cache. It goes without
saying that in order for this to work, you must be connected to the internet.
To open a command prompt as administrator in the repository's directory, do the following:
**Windows XP**: Start -> Run -> `cmd`
@@ -159,11 +251,38 @@ Open a Command Prompt:
**Windows 8**: Start -> Swipe Up -> All Apps -> Windows System -> right-click Command Prompt ->
"Run as Administrator"
and run:
**Windows 10**: Start Button -> type `cmd` -> right-click Command Prompt ->
"Run as Administrator"
`ipconfig /flushdns`
You can also refer to the "Third-Party Hosts Managers" section for further recommended solutions from third parties.
## 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
Open a command prompt with administrator privileges and run this command:
```
ipconfig /flushdns
```
|If you want to use a huge hosts file by merging [hphosts](https://www.hosts-file.net) (NOT INCLUDED HERE) you need to DISABLE and STOP `Dnscache` service before you replace hosts file in Windows Systems. You have been warned.|
:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Before flushing the DNS cache, open a command prompt with administrator privileges and run this command:
```
sc config "Dnscache" start= disabled
sc stop "Dnscache"
```
### Linux
Open a Terminal and run with root privileges:
**Debian/Ubuntu** `sudo /etc/rc.d/init.d/nscd restart`
@@ -178,6 +297,19 @@ Open a Terminal and run with root privileges:
**Others**: Consult [this wikipedia article](https://en.wikipedia.org/wiki/Hosts_%28file%29#Location_in_the_file_system).
### Mac OS X
Open a Terminal and run:
```
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
```
## Release management
This repository uses [Release-It!](https://webpro.github.io/release-it/), an excellent CLI release
tool for Github repos and npm packages, to automate creating [releases](https://github.com/StevenBlack/hosts/releases).
This is why the [package.json](https://github.com/StevenBlack/hosts/blob/master/package.json) and
[.release-it.json](https://github.com/StevenBlack/hosts/blob/master/.release-it.json) files are bundled.
## Goals of this unified hosts file
@@ -191,13 +323,28 @@ The goals of this repo are to:
4. and keep the resultant file reasonably sized.
A high-quality source is defined here as one that is actively curated. A hosts source should be frequently
updated by its maintainers with both additions and removals. The larger the hosts file, the higher the level of
A high-quality source is defined here as one that is actively curated. A
hosts source should be frequently updated by its maintainers with both
additions and removals. The larger the hosts file, the higher the level of
curation is expected.
For example, the (huge) hosts file from [hosts-file.net](http://hosts-file.net) is **not** included
here because it is very large (300,000+ entries) and doesn't currently display a corresponding high level of curation
activity.
For example, the (huge) hosts file from [hosts-file.net](https://hosts-file.net)
is **not** included here because it is very large (780,000+ entries)
and doesn't currently display a corresponding high level of curation activity.
It is expected that this unified hosts file will serve both desktop and mobile devices under a variety of operating
systems.
It is expected that this unified hosts file will serve both desktop and mobile
devices under a variety of operating systems.
## Third-Party Hosts Managers
* [Unified Hosts AutoUpdate](https://github.com/ScriptTiger/Unified-Hosts-AutoUpdate "Unified Hosts AutoUpdate") (for Windows): The Unified Hosts AutUpdate package is purpose-built for this unified hosts project as well as in active development by community members. It's sophisticated enough to allow any novice the ability to install and uninstall the blacklist of their choosing to their local hosts file and keep it automatically up to date, while also being minimal enough to be able to be easily placed in a shared network location and deployed across an organization via group policies. And since it is in active development by community members, your bug reports, feature requests, and other feedback are most welcome.
## Interesting Applications
* [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.
* [Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server](https://scripttiger.github.io/dualserver "Block ads, malware, and deploy parental controls via local DualServer DNS/DHCP server") (for BSD, Windows & Linux): Set up a blacklist for everyone on your network using the power of the unified hosts reformatted for DualServer. And if you're on Windows, this project also maintains an update script to make updating DualServer's blacklist even easier.
* [Blocking ads and malwares with unbound](https://deadc0de.re/articles/unbound-blocking-ads.html "Blocking ads and malwares with unbound") – [Unbound](https://www.unbound.net/ "Unbound is a validating, recursive, and caching DNS resolver.") is a validating, recursive, and caching DNS resolver.
* [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). Script is short and easily edited, also has a short document attached with notes on dnsmasq setup.

Some files were not shown because too many files have changed in this diff Show More