Skip to content

darsono6/HOTS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

HOTS Banner

HOTS โ€” Windows Hosts File Editor v1.1

A powerful, dark-themed desktop application for managing the Windows hosts file.

License: GPLv3 Platform Python Language


๐Ÿ“‹ Overview

HOTS is a lightweight, feature-rich Windows application that lets you view, edit, and manage the system hosts file through a clean dark-themed GUI โ€” no more manually navigating to C:\Windows\System32\drivers\etc\ and fighting with Notepad permissions.

Built as a personal hobby project, released free under GPLv3.


๐Ÿ“ธ Screenshots

Main Window

Main window โ€” table view with live search and entry management


Parental Control Panel

Parental Control โ€” category blocklists with Cloudflare Family DNS toggle


Backup Manager

Backup Manager โ€” browse, restore, or delete rotating backups


โœจ Features

Core editing

  • ๐Ÿ“„ Real-time table view of all hosts entries โ€” active, disabled, and comments
  • โž• Add / Edit / Delete entries with a polished dialog
  • โป Enable / Disable entries without deleting them (toggles the # prefix)
  • ๐Ÿ” Live search & filter across IP, hostname, and comment columns
  • ๐Ÿ“‹ Bulk paste โ€” paste multiple IP hostname lines at once
  • ๐Ÿ”ƒ Column sorting by any field

Safety & backups

  • ๐Ÿ’พ Auto-backup before every save โ€” rotating archive of the last 10 backups
  • ๐Ÿ—‚ Backup Manager โ€” browse, restore, or delete any backup
  • ๐Ÿ‘ Diff preview โ€” see exact line-by-line changes before writing to disk
  • โœ… Post-save verification โ€” confirms the file was written correctly
  • ๐Ÿ”’ 20 000 entry limit โ€” blocks saves that would freeze Windows DNS Client

Import / Export

  • ๐Ÿ“ฅ Import any hosts-format .txt file
  • ๐Ÿ“ค Export to .txt (hosts format) or .csv (with Status, IP, Hostname, Comment columns)

Diagnostics

  • ๐Ÿ” Domain existence check โ€” queries Google DNS (8.8.8.8) directly, bypassing the local hosts file; flags domains that no longer exist in DNS
  • ๐Ÿ›ก Malware scanner โ€” detects 6 risk patterns:
    • Known system/payment domains redirected to non-loopback IPs
    • Windows Update / antivirus update domains being blocked
    • Entries redirecting to public IPs
    • Mass-redirect patterns (many domains โ†’ one IP)
    • Cyrillic homoglyph characters in hostnames
    • Hostnames that are raw IP addresses

Parental Control

  • ๐Ÿ›ก Built-in blocklist manager for 14 categories:
    • ๐Ÿ”ž Adult content ยท ๐Ÿฆ Twitter/X ยท ๐Ÿ“ธ Instagram ยท โ–ถ YouTube ยท ๐Ÿ‘ค Facebook
    • ๐Ÿ’ฌ WhatsApp ยท ๐ŸŽต TikTok ยท ๐ŸŽฎ Twitch ยท ๐Ÿ‘ป Snapchat ยท ๐Ÿ“Œ Pinterest
    • ๐Ÿค– Reddit ยท ๐Ÿ•น๏ธ Games ยท ๐Ÿ›ก Windows AntiSpy ยท โ›” Torrent
  • Each category uses unique section tags โ€” categories never overwrite each other
  • Toggle any category on/off with one click; DNS cache flushed automatically
  • ๐ŸŒ Cloudflare Family DNS โ€” one-click enforcement of DNS-level adult content blocking (1.1.1.3 / 1.0.0.3):
    • Automatically detects all active (Connected) network interfaces via netsh
    • Backs up original DNS settings per interface to %APPDATA%\HOTS\dns_backup.json before switching
    • Restores previous DNS (or falls back to DHCP) when Parental Control is disabled
    • State persists across HOTS sessions โ€” DNS remains protected even after the app is closed
    • Works correctly regardless of Windows UI language (handles both English and Polish netsh output)

Windows AntiSpy

  • ๐Ÿ›ก One-click Windows telemetry blocker โ€” reduces data sent to Microsoft without third-party tools:
    • Disables two telemetry services: DiagTrack (Connected User Experiences and Telemetry) and dmwappushservice (WAP Push Message Routing)
    • Blocks three system binaries via Windows Firewall outbound rules: CompatTelRunner.exe, devicecensus.exe, WerFault.exe
    • Sets AllowTelemetry = 0 in HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection
  • Before making any changes, the original state of all services and the registry value is saved to %APPDATA%\HOTS\HOTS_antispy_state.json
  • Full restore โ€” disabling AntiSpy reads the backup and returns every service and registry value to its exact pre-HOTS state
  • Requires Administrator rights (UAC prompt on launch covers this)
  • Intentionally narrow scope โ€” HOTS is not a comprehensive privacy suite; this targets the most impactful telemetry vectors only

UI & UX

  • ๐ŸŒ™ Full dark theme โ€” custom titlebar, dark dialogs, dark scrollbars
  • ๐ŸŒ 3 languages โ€” English (default), Polish, Franรงais โ€” switch in Options, saved across sessions
  • ๐Ÿ”‘ Password protection โ€” optional SHA-256 hashed startup password stored in Windows Registry
  • ๐Ÿ“ Raw text view โ€” edit the hosts file directly like Notepad, with syntax highlighting
  • ๐Ÿ—ƒ Geometry persistence โ€” remembers window size and position
  • ๐Ÿ”ง File repair โ€” auto-fixes wildcard entries, removes duplicates and malformed lines
  • ๐Ÿงน Restore default โ€” replaces current hosts with Microsoft's clean default (backup created first)
  • ๐Ÿš€ Auto-elevation โ€” requests UAC Administrator rights on launch

๐Ÿ›ก๏ธ Parental Control โ€“ Known Limitations

The Parental Control module blocks domains at the system level using the Windows hosts file, combined with Cloudflare Family DNS (1.1.1.3 / 1.0.0.3). This approach is effective but has inherent limitations you should be aware of:

๐ŸŒ The "Moving Target" Problem (TikTok, YouTube, Facebookโ€ฆ)

Large platforms use hundreds of dynamically changing subdomains and CDN endpoints. A blocklist can never be 100% complete at any given moment.

  • Built-in lists are updated with each HOTS release to keep up with infrastructure changes.
  • You can add missing domains manually โ€” HOTS is first and foremost a hosts file editor. Map any bypassing domain to 0.0.0.0 directly from the main table.

โš ๏ธ Filters Not Working? Disable DNS-over-HTTPS in Your Browser

Modern browsers (Chrome, Firefox, Edge, Opera) include a feature called Secure DNS / DNS-over-HTTPS (DoH). When enabled, the browser sends DNS queries directly to an external encrypted server, completely bypassing the system hosts file.

To make HOTS parental filters effective, disable DoH in each browser's privacy/security settings:

  • Chrome / Edge: Settings โ†’ Privacy and security โ†’ Security โ†’ Use secure DNS โ†’ Off
  • Firefox: Settings โ†’ Privacy & Security โ†’ DNS over HTTPS โ†’ Off

๐Ÿ“ฑ Mobile Devices & VPNs Are Not Covered

The hosts file only affects the Windows PC it runs on. Phones, tablets, and any device using a VPN will not be subject to these rules.

Option A โ€” Run the .exe (recommended)

  1. Download HOTS_setup.exe (installer) or HOTS.exe (portable, no install) from the Releases page
  2. Double-click โ€” UAC will prompt for Administrator rights
  3. Done. No further setup required.

System requirements: Windows 10 or Windows 11, 64-bit. Windows 7/8/8.1 and 32-bit systems are not supported.

โš ๏ธ "Windows protected your PC" / SmartScreen warning

Since HOTS is a small independent project without a paid code-signing certificate, Windows SmartScreen may show a warning like "this app isn't commonly downloaded" the first few times it's downloaded. This is expected and does not mean the file is unsafe โ€” it simply means Microsoft hasn't yet built up a download reputation for it (this happens to every new, unsigned .exe, regardless of safety).

To proceed:

  1. If you see a screen titled "Windows protected your PC", click More info, then click Run anyway
  2. If you see the Edge/browser download warning shown above, click the "โ€ฆ" (more actions) menu next to the downloaded file โ†’ Keep โ†’ Show more โ†’ Keep anyway

If you'd rather verify the file yourself first, you can always build it from source instead โ€” see Option B below โ€” or inspect the full source code in this repository.

Option B โ€” Run from source

Requirements: Python 3.10+, tkinter (included with Python on Windows), Pillow (for the banner image in the Support window)

pip install pillow
git clone https://github.com/darsono6/hots.git
cd hots
pythonw -m hosts_editor

โš ๏ธ Must be run as Administrator โ€” the hosts file is write-protected by Windows.


๐Ÿ—‚ Project Structure

hosts_editor/
โ”œโ”€โ”€ __main__.py          # Entry point โ€” UAC elevation, password prompt, language init
โ”œโ”€โ”€ app.py               # Main window (HostsEditor)
โ”œโ”€โ”€ core.py              # Data logic โ€” parse, save, import/export, DNS, parental control
โ”œโ”€โ”€ core_antispy.py      # Windows AntiSpy engine โ€” services, firewall rules, registry
โ”œโ”€โ”€ constants.py         # Theme colors, paths, settings load/save
โ”œโ”€โ”€ widgets.py           # Reusable UI components โ€” buttons, dark dialogs, titlebar
โ”œโ”€โ”€ dns_utils.py         # DNS management โ€” active interface lookup, Cloudflare Family DNS orchestration
โ”œโ”€โ”€ i18n.py              # Multilingual string system (EN / PL / FR)
โ”œโ”€โ”€ assets/
โ”‚   โ””โ”€โ”€ banner.png       # Banner image for the Support window
โ”œโ”€โ”€ blocklists/          # Plain-text domain lists for Parental Control
โ”‚   โ”œโ”€โ”€ xxx.txt
โ”‚   โ”œโ”€โ”€ youtube.txt
โ”‚   โ””โ”€โ”€ ...
โ””โ”€โ”€ dialogs/
    โ”œโ”€โ”€ entry_dialog.py       # Add / Edit entry form
    โ”œโ”€โ”€ diff_dialog.py        # Diff preview before save
    โ”œโ”€โ”€ backup_dialog.py      # Backup Manager
    โ”œโ”€โ”€ diagnostics_dialog.py # Domain check & malware scan
    โ”œโ”€โ”€ parental_dialog.py    # Parental Control panel
    โ”œโ”€โ”€ support_dialog.py     # Support / donate window
    โ””โ”€โ”€ password_dialog.py    # Set / verify startup password

๐ŸŒ Multilingual Support

The interface language can be changed in the Options โ†’ Language panel.
The selected language is saved to %APPDATA%\HOTS\settings.json and applied on the next launch โ€” including the startup password prompt.

Code Language
en English (default)
pl Polski
fr Franรงais

All UI strings, dialogs, error messages, column headers, and system comments (e.g. Parental Control entries in the hosts file) are fully translated.


โš ๏ธ Disclaimer

HOTS is provided in good faith but without any warranty.
The author is not responsible for any damage, data loss, system issues, or other consequences resulting from the use of this application.
Modifying the hosts file affects system-level network resolution โ€” use with care.
You use this software at your own risk.


โค๏ธ Support

If HOTS saves you time or you simply want to say thanks:

PayPal: paypal.me/darsonodark

Support: hots.support@gmail.com

No registration required. Any amount is appreciated.


๐Ÿ“„ License

GNU General Public License v3.0
ยฉ 2026 Darsono