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.
- ✅ 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
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
- Right-click the
.exe
and choose "Run as Administrator". - Use the buttons to:
- Block new websites
- Unblock selected websites
- View the current list
Make sure Python 3.x is installed and added to PATH.
pip install pyinstaller
-
main.py
→ main Python script -
icon.ico
→ (optional) icon file -
admin.manifest
→ Windows manifest file to request admin rights
pyinstaller --onefile --windowed --icon=icon.ico --manifest=admin.manifest main.py
Output will be in the dist/
folder.
This app must run as administrator to modify system files. If you see "Permission Denied", do the following:
-
Right-click the
.exe
→ Choose Run as Administrator -
Accept the UAC prompt
-
The app only modifies your local
hosts
file -
No data is sent online or stored externally
-
Code is open-source and inspectable
Contact: [[email protected]]