🛡️ Website Blocker (Windows)
A simple desktop tool to block or unblock websites on a Windows machine using a graphical interface. It works by modifying the hosts
file to redirect unwanted domains to 127.0.0.1
.
Built with Python + Tkinter, packaged into a .exe
with PyInstaller.
Features
- ✅ Block any website (e.g.,
adult website
,youtube.com
) - ✅ View currently blocked websites
- ✅ Unblock websites easily
- ✅ Simple GUI, no terminal needed
- ✅ Single
.exe
file with icon
How It Works
This app modifies the Windows hosts
file:
C:\Windows\System32\drivers\etc\hosts
It maps domains to 127.0.0.1
, effectively blocking them:
127.0.0.1 facebook.com
Installation
-
Right-click the
.exe
and choose "Run as Administrator". - Use the buttons to:
- Block new websites
- Unblock selected websites
- View the current list
🛠 Build It Yourself (For Developers)
Make sure Python 3.x is installed and added to PATH.
1. Install dependencies:
pip install pyinstaller