Skip to content
KitploitKITPLOIT
ツールエクスプロイトブログ
Log in
提出
ツールエクスプロイトブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

フィードお問い合わせプライバシー© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
hosts — 🔒 厳選された複数のソースから hosts ファイルを統合・拡張します。オプションでポルノ、ソーシャルメディア、その他のカテゴリの拡張を選択できます。 | Kitploit
ツール/GitHubGitHub/stevenblack/hosts
情報収集マルウェア分析プライバシー脅威インテリジェンス厳選リソースDNS分析
GitHubstevenblack/hosts

hosts

🔒 厳選された複数のソースから hosts ファイルを統合・拡張します。オプションでポルノ、ソーシャルメディア、その他のカテゴリの拡張を選択できます。

リポジトリを見る
30.8k2.4k3586日前Kitploit レビュー済み
共有
> [!IMPORTANT]
> **このリポジトリのクローンには長い時間がかかる場合があります!**
> おそらく最新バージョンから始めたいはずで、2018年以降の全履歴は必要ないでしょう。
> **したがって**、大幅に時間を節約するには `git clone --depth 1 ...` を使うことをお勧めします。


> [!NOTE]
> `hosts/data/StevenBlack/hosts` への変更に関する issue や PR を除き、
> 生成される hosts ファイルの内容に関するその他の issue は、該当するコンテンツを提供した
> 適切なデータソースに対して行うべきです。すべてのデータソースの連絡先情報は
> `hosts/data/` ディレクトリに記載されています。

---

![Logo](https://raw.githubusercontent.com/StevenBlack/hosts/master/.github/logo.png)

[![latest release](https://img.shields.io/github/release/StevenBlack/hosts)](https://github.com/StevenBlack/hosts/releases)
[![license](https://img.shields.io/github/license/StevenBlack/hosts)](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[![repo size](https://img.shields.io/github/repo-size/StevenBlack/hosts)](https://github.com/StevenBlack/hosts)
[![contributors](https://img.shields.io/github/contributors/StevenBlack/hosts)](https://github.com/StevenBlack/hosts/graphs/contributors)
[![Build Status](https://img.shields.io/github/actions/workflow/status/StevenBlack/hosts/ci.yml?branch=master)](https://github.com/StevenBlack/hosts/actions/workflows/ci.yml?query=branch%3Amaster)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000)](https://github.com/python/black)
[![commits since last release](https://img.shields.io/github/commits-since/StevenBlack/hosts/latest)](https://github.com/StevenBlack/hosts/commits/master)
[![last commit](https://img.shields.io/github/last-commit/StevenBlack/hosts)](https://github.com/StevenBlack/hosts/commits/master)
[![commit activity](https://img.shields.io/github/commit-activity/y/StevenBlack/hosts)](https://github.com/StevenBlack/hosts/commits/master)

# ベース拡張機能付き統合 hosts ファイル

このリポジトリは、いくつかの信頼できる `hosts` ファイルを統合し、重複を除去した
単一の統合 hosts ファイルにマージします。用途に合わせたさまざまな hosts ファイルを
提供しています。

**したがって、このリポジトリは hosts ファイルのアグリゲーターです。**

![Aggregator](https://raw.githubusercontent.com/StevenBlack/hosts/master/aggregator.png)

- 最終更新: **2026年11月15日**。
- 76,104 件のエントリを含む
  [生の hosts ファイル ベース拡張機能付き統合 hosts ファイル](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts)
  はこちらです。

![Size history](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts_file_size_history.png)

## すべての hosts ファイルバリアントの一覧

このリポジトリでは、ベースバリアントに加えて、
[31 種類の異なる hosts ファイルバリアント](https://github.com/StevenBlack/hosts/tree/master/alternates)
を提供しており、統合 hosts を含むものと含まないものがあります。

**Non GitHub mirror** は、
[Windows 用 Hostsman](https://www.abelhadigital.com/hostsman/) のように GitHub の
ダウンロードリンクでは動作しない一部の hosts ファイルマネージャーで使用するリンクです。

| ホストファイルレシピ | Readme | Raw hosts | ユニークドメイン数 | GitHub以外のミラー |
| ---------------- | :----: | :-------: | :------------: | :---------------: |
統合ホスト = **(adware + malware)** | [Readme](https://github.com/StevenBlack/hosts/blob/master/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts) | 76,104 | [link](http://sbc.io/hosts/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) | 78,493 | [link](http://sbc.io/hosts/alternates/fakenews/hosts)
**fakenews** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-only/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-only/hosts) | 2,187 | [link](http://sbc.io/hosts/alternates/fakenews-only/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) | 83,038 | [link](http://sbc.io/hosts/alternates/gambling/hosts)
**gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-only/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-only/hosts) | 6,744 | [link](http://sbc.io/hosts/alternates/gambling-only/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) | 152,400 | [link](http://sbc.io/hosts/alternates/porn/hosts)
**porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-only/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-only/hosts) | 76,811 | [link](http://sbc.io/hosts/alternates/porn-only/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) | 80,082 | [link](http://sbc.io/hosts/alternates/social/hosts)
**social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/social-only/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social-only/hosts) | 3,808 | [link](http://sbc.io/hosts/alternates/social-only/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) | 85,225 | [link](http://sbc.io/hosts/alternates/fakenews-gambling/hosts)
**fakenews + gambling** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-only/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-only/hosts) | 8,937 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-only/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) | 154,587 | [link](http://sbc.io/hosts/alternates/fakenews-porn/hosts)
**fakenews + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-only/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-only/hosts) | 79,004 | [link](http://sbc.io/hosts/alternates/fakenews-porn-only/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) | 82,269 | [link](http://sbc.io/hosts/alternates/fakenews-social/hosts)
**fakenews + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-social-only/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-social-only/hosts) | 6,001 | [link](http://sbc.io/hosts/alternates/fakenews-social-only/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) | 159,132 | [link](http://sbc.io/hosts/alternates/gambling-porn/hosts)
**gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-only/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-only/hosts) | 83,555 | [link](http://sbc.io/hosts/alternates/gambling-porn-only/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) | 86,814 | [link](http://sbc.io/hosts/alternates/gambling-social/hosts)
**gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-social-only/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social-only/hosts) | 10,552 | [link](http://sbc.io/hosts/alternates/gambling-social-only/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) | 156,174 | [link](http://sbc.io/hosts/alternates/porn-social/hosts)
**porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/porn-social-only/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social-only/hosts) | 80,617 | [link](http://sbc.io/hosts/alternates/porn-social-only/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) | 161,319 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn/hosts)
**fakenews + gambling + porn** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-only/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-only/hosts) | 85,748 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-only/hosts)
統合ホスト **+ fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social/hosts) | 89,001 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social/hosts)
**fakenews + gambling + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-social-only/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-social-only/hosts) | 12,745 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-social-only/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) | 158,361 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social/hosts)
**fakenews + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-porn-social-only/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-porn-social-only/hosts) | 82,810 | [link](http://sbc.io/hosts/alternates/fakenews-porn-social-only/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) | 162,906 | [link](http://sbc.io/hosts/alternates/gambling-porn-social/hosts)
**gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/gambling-porn-social-only/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social-only/hosts) | 87,361 | [link](http://sbc.io/hosts/alternates/gambling-porn-social-only/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) | 165,093 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts)
**fakenews + gambling + porn + social** | [Readme](https://github.com/StevenBlack/hosts/blob/master/alternates/fakenews-gambling-porn-social-only/readme.md) | [link](https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social-only/hosts) | 89,502 | [link](http://sbc.io/hosts/alternates/fakenews-gambling-porn-social-only/hosts)


**想定**: これらの統合 hosts ファイルは、OS に関係なくすべてのデバイスに適用されるべきです。

## このバリアントで統合される hosts データのソース

以下の場所から更新された `hosts` ファイルが常に統合され、含まれます:

| ホストファイルのソース | ホームページ | 生の hosts | ライセンス | Issues | 説明 |
| ---------------- | :-------: | :-------: | :-----: | :----: | ----------- |
Steven Black's ad-hoc list |[link](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) | [raw](https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts) | MIT | [issues](https://github.com/StevenBlack/hosts/issues)| 見つけ次第追加している怪しいドメイン。
AdAway |[link](https://adaway.org/) | [raw](https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt) | CC BY 3.0 | [issues](https://github.com/AdAway/adaway.github.io/issues)| AdAway は hosts ファイルを使用する Android 向けのオープンソース広告ブロッカーです。
add.2o7Net |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts) | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)| [hostsfile.org](https://www.hostsfile.org/hosts.html) のコンテンツに基づく 2o7Net トラッキングサイト。
add.Dead |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Dead/hosts) | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)| [hostsfile.org](https://www.hostsfile.org/hosts.html) のコンテンツに基づく死んだサイト。
add.Risk |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts) | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)| [hostsfile.org](https://www.hostsfile.org/hosts.html) のコンテンツに基づくリスクコンテンツサイト。
add.Spam |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Spam/hosts) | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)| [hostsfile.org](https://www.hostsfile.org/hosts.html) のコンテンツに基づくスパムサイト。
Mitchell Krog's - Badd Boyz Hosts |[link](https://github.com/mitchellkrogza/Badd-Boyz-Hosts) | [raw](https://raw.githubusercontent.com/mitchellkrogza/Badd-Boyz-Hosts/master/hosts) | MIT | [issues](https://github.com/mitchellkrogza/Badd-Boyz-Hosts/issues)| 私の Nginx および Apache の Bad Bot およびスパムリファラーブロッカーからの怪しいドメインと悪質なリファラー
hostsVN |[link](https://github.com/bigdargon/hostsVN) | [raw](https://raw.githubusercontent.com/bigdargon/hostsVN/master/option/hosts-VN) | MIT | [issues](https://github.com/bigdargon/hostsVN/issues)| ベトナムの広告をブロックする hosts
KADhosts |[link](https://kadantiscam.netlify.app/) | [raw](https://raw.githubusercontent.com/FiltersHeroes/KADhosts/master/KADhosts.txt) | CC BY-SA 4.0 | [issues](https://github.com//FiltersHeroes/KADhosts/issues)| 詐欺/アドウェア/スキャムのウェブサイト。
minecraft-hosts |[link](https://github.com/jamiemansfield/minecraft-hosts) | [raw](https://raw.githubusercontent.com/jamiemansfield/minecraft-hosts/master/lists/tracking.txt) | CC0-1.0 | [issues](https://github.com/jamiemansfield/minecraft-hosts/issues)| Minecraft 関連のトラッカー hosts
MVPS hosts file |[link](https://winhelp2002.mvps.org/) | [raw](https://winhelp2002.mvps.org/hosts.txt) | CC BY-NC-SA 4.0 | [issues](mailto:[email protected])| このサイトの目的は、ユーザーに高品質なカスタム HOSTS ファイルを提供することです。
Dan Pollock – [someonewhocares](https://someonewhocares.org/) |[link](https://someonewhocares.org/hosts/) | [raw](https://someonewhocares.org/hosts/zero/hosts) | 非商用(帰属表示あり) | [issues](mailto:[email protected])| インターネットを(できるだけ)不快でなくする方法。
Tiuxo hostlist - ads |[link](https://github.com/tiuxo/hosts) | [raw](https://raw.githubusercontent.com/tiuxo/hosts/master/ads) | CC BY 4.0 | [issues](https://github.com/tiuxo/hosts/issues)| DNS ベースのコンテンツブロッキング向けに分類された hosts ファイル
UncheckyAds |[link](https://github.com/FadeMind/hosts.extras) | [raw](https://raw.githubusercontent.com/FadeMind/hosts.extras/master/UncheckyAds/hosts) | MIT | [issues](https://github.com/FadeMind/hosts.extras/issues)| https://unchecky.com/ のコンテンツに基づく Windows インストーラーの広告配信元サイト。
yoyo.org |[link](https://pgl.yoyo.org/adservers/) | [raw](https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0) |  | [issues](mailto:[email protected])| 広告サーバーおよびトラッキングサーバーのホスト名をブロック。


## 拡張機能

統合 hosts ファイルはオプションで拡張可能です。拡張機能は、カテゴリ別にドメインを含めるために使用されます。現在、以下のカテゴリを提供しています: `fakenews`、`social`、`gambling`、`porn`。

拡張機能はオプションであり、ベースの hosts ファイルとさまざまな方法で組み合わせることができます。組み合わせた成果物は [`alternates`](https://github.com/StevenBlack/hosts/tree/master/alternates) フォルダに保存されます。

拡張機能のデータは [`extensions`](https://github.com/StevenBlack/hosts/tree/master/extensions) フォルダに保存されています。拡張機能はこのフォルダツリーを管理することで運用します。ここには、当方が維持・提供している `fakenews`、`social`、`gambling`、`porn` 拡張機能データがあります。

## 独自の統合 hosts ファイルを生成する

独自の hosts ファイルを生成するには 3 つのオプションがあります。当方のコンテナイメージを使用するか、独自のイメージをビルドするか、あるいは自身の環境で実行するかです。Docker がインストールされた Linux をお持ちの場合、オプション #1 が最も簡単です。

### オプション 1: 当方のコンテナイメージを使用する (Linux のみ)

> これは `/etc/hosts` を置き換えます。

ホスト上で Docker が利用可能であることを前提としています。次のコマンドを実行するだけです。拡張機能はお好みに合わせて設定してください。

```sh
docker run --pull always --rm -it -v /etc/hosts:/etc/hosts \
ghcr.io/stevenblack/hosts:latest updateHostsFile.py --auto \
--replace --extensions gambling porn
```

カスタムホストやホワイトリストを追加したい場合は、[手順](#how-do-i-control-which-sources-are-unified)に従ってどちらか一方または両方のファイルを作成し、使用したいものに応じて `ghcr.io/stevenblack/hosts:latest` の_前に_以下の引数を追加してください。

```sh
-v "path/to/myhosts:/hosts/myhosts" \
-v "path/to/whitelist:/hosts/whitelist" \
```

この正確なコマンドを後で再実行すると、利用可能な最新のホストに基づいて更新できます(たとえば、週次の cron ジョブに追加します)。

### オプション 2: 独自のコンテナイメージを生成する

前の手順で使用した
[Dockerfile](https://github.com/StevenBlack/hosts/blob/master/Dockerfile) を提供しています。これを使用して、必要なものがすべて含まれたコンテナイメージを作成できます。コンテナには Python 3 とそのすべての依存要件、およびこのリポジトリの最新バージョンのコピーが含まれます。

このリポジトリのルートから次のようにして Docker コンテナをビルドします:

```sh
docker build --no-cache . -t stevenblack-hosts
```

またはクローンせずに(GitHubから直接):

```sh
docker build --no-cache https://github.com/StevenBlack/hosts.git -t stevenblack-hosts
```

次に、次のようにコマンドを実行します:

```sh
docker run --rm -it stevenblack-hosts updateHostsFile.py
```

> これにより hosts ファイルが作成され、完了時にコンテナとともに削除されるため、
> あまり有用ではありません。ホスト上のファイルを置き換えるには、オプション #1 の例を使って
> ボリュームを追加できます。

### オプション 3: 自分の環境で生成する

独自の統合 hosts ファイルを生成するには、Python 3.6 以降が必要です。

まず、次のコマンドで依存関係をインストールします:

```sh
pip3 install --user -r requirements.txt
```

**注** 依存関係をユーザーレベルでインストールする `--user` フラグの使用を推奨します。詳細については pip の[ドキュメント](https://pip.pypa.io/en/stable/reference/pip_install/?highlight=--user#cmdoption-user)を参照してください。

### オプション 4: Google Colab で生成する

無料のリモート [Google Colab](https://colab.research.google.com/drive/1tYWXpU2iuPDqN_o03JW9ml3ExO80eBLq?usp=sharing) 環境を起動します。

### 開発環境に関係なく共通の手順

**ユニットテストを実行する**には、トップレベルのディレクトリで次を実行します:

```sh
python3 testUpdateHostsFile.py
```

`updateHostsFile.py` スクリプトは、ローカルの `data/` サブフォルダ内のソースに基づいて統合された hosts ファイルを生成します。このスクリプトは、更新されたバージョンを取得すべきかどうか(各ソースのフォルダ内の `update.json` テキストファイルで定義された場所から)を尋ねるプロンプトを表示します。そうでない場合は、すでに存在する `hosts` ファイルを使用します。

```sh
python3 updateHostsFile.py [--auto] [--replace] [--ip nnn.nnn.nnn.nnn] [--extensions ext1 ext2 ext3]
```

#### コマンドラインオプション

`--help`、または `-h`: ヘルプを表示します。

`--auto`、または `-a`: プロンプトを出さずにスクリプトを実行します。`--auto` を指定した場合、

- 拡張機能を含むホストデータソースが更新されます。
- デフォルトでは拡張機能は含まれません。含めたいものがある場合は `--extensions` または `-e` フラグを使用してください。
- `--replace` フラグを指定しない限り、アクティブな hosts ファイルは _置き換えられません_。

`--backup`、または `-b`: 既存の hosts ファイルを上書き生成する際に、そのバックアップを作成します。

`--extensions <ext1> <ext2> <ext3>`、または `-e <ext1> <ext2> <ext3>`: `extensions` フォルダ配下のサブフォルダ名で、統合に含めるカテゴリ別の追加 hosts ファイルを格納しているものを指定します。例: `--extensions porn` または `-e social porn`。

`--flush-dns-cache`、または `-f`: DNS キャッシュをフラッシュするためのプロンプトをスキップします。`--replace` も有効な場合にのみ機能します。

`--ip nnn.nnn.nnn.nnn`、または `-i nnn.nnn.nnn.nnn`: ターゲットとして使用する IP アドレス。デフォルトは `0.0.0.0` です。

`--keepdomaincomments`、または `-k`: `true`(デフォルト)または `false`。ドメインと同じ行に現れるコメントを保持します。デフォルトは `true` です。

`--noupdate`、または `-n`: hosts データソースからの更新の取得をスキップします。

`--output <subfolder>`、または `-o <subfolder>`: 生成されたソースファイルをサブフォルダに配置します。サブフォルダが存在しない場合は作成されます。

`--replace`、または `-r`: アクティブな hosts の置き換えを実行します。

`--skipstatichosts`、または `-s`: `false`(デフォルト)または `true`。`127.0.0.1 localhost` のような行を含む先頭の標準セクションを省略します。これはローカルネットワーク上で近接 DNS サービスを設定する場合に便利です。

`--nogendata`、または `-g`: `false`(デフォルト)または `true`。readme.md ファイルの生成に使用される readmeData.json ファイルの生成をスキップします。追加のホワイトリストやブラックリストを使って hosts ファイルを生成しつつ、このリポジトリのローカルチェックアウトを変更しないままにしたい場合に便利です。

`--nounifiedhosts`: `false`(デフォルト)または `true`。最終的な hosts ファイルに統合 hosts ファイルを含めません。通常は `--extensions` と併用します。

`--compress`、または `-c`: `false`(デフォルト)または `true`。不要な行(空行やコメント)を無視し、複数のドメインを各行にまとめて hosts ファイルを _圧縮_ します。hosts ファイルの行数を減らすことで、Windows でのパフォーマンスが向上します(DNS Client サービスが有効な場合)。

`--minimise`、または `-m`: `false`(デフォルト)または `true`。`--compress` と同様ですが、各ドメインを別々の行に配置します。`hosts` ファイルに依存する多くの URL ブロッカーの実装が、1 行に複数のホストを許可する標準に準拠していないため、これが必要になります。

`--blacklist <blacklistfile>`、または `-x <blacklistfile>`: 指定した hosts 形式のブラックリストファイルを、生成される hosts ファイルに追加します。

`--whitelist <whitelistfile>`、または `-w <whitelistfile>`: 指定したホワイトリストファイルを使用して、生成される hosts ファイルからホストを削除します。

## 統合するソースを制御するには?

`data/` フォルダのサブフォルダにそれぞれ格納された、1 つ以上の _追加_ ソースを加え、その `update.json` ファイルで `url` キーを指定します。

`extensions/` フォルダのサブフォルダを由来とする、1 つ以上の _オプション_ の拡張機能を加えます。ここでも `update.json` 内の url が、この拡張機能が更新を取得する場所を制御します。

_オプション_ の `blacklist` ファイルを作成します。このファイルの内容(`hosts` ファイル形式で追加ドメインの一覧を含む)は、更新プロセス中に統合 hosts ファイルに追加されます。サンプルの `blacklist` が含まれており、必要に応じて変更できます。

- 注: `blacklist` は git で追跡されないため、加えた変更は将来 `origin` からこのリポジトリを `git pull` しても上書きされません。

### 独自のカスタムドメインマッピングを含めるには?

カスタムの hosts レコードがある場合は、`myhosts` ファイルに記述します。このファイルの内容は、更新プロセス中に統合 hosts ファイルの先頭に追加されます。

`myhosts` ファイルは git で追跡されないため、加えた変更は将来 `origin` からこのリポジトリを `git pull` しても上書きされません。

### ドメインが含まれないようにするには?

`whitelist` ファイルに記載したドメインは、最終的な hosts ファイルから除外されます。

`whitelist` は部分一致を使用します。したがって、`google-analytics.com` をホワイトリストに登録すると、そのドメインとすべてのサブドメインは最終的な hosts ファイルにマージされません。

`whitelist` は git で追跡されていないため、今後 `origin` からこのリポジトリを `git pull` しても、加えた変更が上書きされることはありません。

## hosts レコードにはどうすれば貢献できますか?

ここに含めるべきだと思われる怪しいドメインを発見した場合、それを提供する方法がいくつかあります。

### オプション 1: 当社の hosts ソースのいずれかに連絡する

新しいドメインを追加してもらう最善の方法は、[ここに一覧されている](https://github.com/StevenBlack/hosts#sources-of-hosts-data-unified-in-this-variant)データプロバイダーのいずれかに issue を提出することです。これは、新しいドメインを提出すれば、これらのソースを維持している専任の人々によってキュレーションされ、更新されるため、最善の方法です。

### オプション 2: このリポジトリをフォークし、Steven Black の個人データファイルにドメインを追加して、プルリクエストを送信する

この hosts リポジトリをフォークし、[https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts](https://github.com/StevenBlack/hosts/blob/master/data/StevenBlack/hosts) にリンクを追加してください。

その後、プルリクエストを送信してください。

**警告**: 継続的なキュレーションが当社の負担になるため、これはオプション 1 よりも望ましくありません。そのため、当社の作業が増えることになります。

### オプション 3: GitHub 上のリポジトリとして独自の hosts リストを作成する

怪しいドメインの独自のコレクションをキュレーションできる場合は、独自の hosts リストをキュレーションしてください。その後、[新しい issue](https://github.com/StevenBlack/hosts/issues) としてリポジトリの存在を知らせてください。新しいバージョンを作成するたびに取得するソースのコレクションに、あなたの新しいリポジトリを含める場合があります。

## hosts ファイルとは何ですか?

`hosts`(ファイル拡張子なし)という名前の hosts ファイルは、すべてのオペレーティングシステムでホスト名を IP アドレスにマッピングするために使用されるプレーンテキストファイルです。

ほとんどのオペレーティングシステムでは、`hosts` ファイルは `DNS` より優先されます。したがって、ドメイン名が `hosts` ファイルによって解決される場合、リクエストがコンピューターの外に出ることはありません。

スマートな `hosts` ファイルがあれば、マルウェア、アドウェア、その他の迷惑なものをブロックするのに大いに役立ちます。

---

[Read more](https://github.com/stevenblack/hosts)
ツールをダウンロード

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 究極のOSINTツールキット:調査グラフ、信頼度スコアリング、エイリアスファミリー、マップ、タイムライン、レポート。49個のモジュール、400以上のサイト、APIキー不要。

    926
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock ワンタップ実行アプリ(CVE-2026-43499)

    699
  • 3

    looking-glass

    anonghosty/looking-glass

    ShadowserverレポートをMongoDBに取り込み、インタラクティブなマップ、分析、調査結果、アドバイザリ、エグゼクティブダッシュボードとして再生するCSIRTプラットフォーム。

    428
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServerは、オープンソースの特権アクセス管理(PAM)プラットフォームであり、DevOps および IT チームに対し、Webブラウザを介してSSH、RDP、Kubernetes、データベース、RemoteAppエンドポイントへのオンデマンドで安全なアクセスを提供します。

    397
  • 5

    SafeLine

    chaitin/safeline

    セルフホスト型のWAFおよびリバースプロキシで、悪意のあるHTTPトラフィックをフィルタリングし、SQLインジェクション、XSS、ボット攻撃をブロックします。また、レート制限と動的なHTML/JS暗号化機能を備えています。

    347
  • 6

    ARTEX

    baarai/artex

    プランナー/ワーカーエージェント、資産グラフと探索グラフ、MITMトラフィック記録、脆弱性の再テストを備えたLLMマルチエージェント自律ペネトレーションテストプラットフォーム。

    337

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →