A powerful desktop application built with Python and Tkinter that helps improve productivity by blocking distracting websites through the system hosts file.
β Improve Productivity β’ π Secure β’ β‘ Fast β’ π Cross Platform
Website Blocker System is a professional desktop application developed in Python that helps users stay focused by blocking distracting websites.
The application securely edits the system hosts file, redirects selected websites to 127.0.0.1, protects all actions using password authentication, creates automatic backups, and records every action in a log file.
Whether you're a student, programmer, freelancer, or professional, this application helps reduce distractions and increase productivity.
| Feature | Description |
|---|---|
| π Website Blocking | Block popular distracting websites instantly |
| π Website Unblocking | Unblock websites anytime |
| π Password Protection | Passwords secured using SHA-256 hashing |
| π€ Forgot Password | Recover password through username verification |
| π§Ύ Activity Logging | Logs all block/unblock actions |
| π Automatic Backup | Backup hosts file before modifications |
| β‘ Admin Detection | Checks administrator/root privileges |
| π₯οΈ Modern GUI | Clean and user-friendly Tkinter interface |
| π Cross Platform | Supports Windows, Linux & macOS |
| π Lightweight | Fast startup and low memory usage |
- Python 3.x
- Tkinter
- hashlib
- shutil
- logging
- os
- ctypes
- time
Website-Blocker-System/
β
βββ assets/
β βββ dashboard.png
β βββ login.png
β βββ block.png
β βββ unblock.png
β βββ password.png
β βββ log.png
β
βββ main.py
βββ blocker.py
βββ README.md
βββ LICENSE
βββ requirements.txt
βββ password.txt
βββ blocker.log
git clone https://github.com/muhammadali-69/Website-Blocker-System.gitcd Website-Blocker-Systempip install -r requirements.txtpython main.pysudo python3 main.py- Python 3.x
- Tkinter
- Administrator / Root privileges
- Permission to modify the system hosts file
-
Launch the application.
-
Create a password if it's your first time.
-
Login using your password.
-
The application checks administrator privileges.
-
A backup of the hosts file is created automatically.
-
Select websites to block.
-
The selected domains are redirected to 127.0.0.1.
-
All actions are stored inside blocker.log.
The application currently supports blocking:
- TikTok
- Snapchat
- YouTube
More websites can easily be added.
β SHA-256 Password Encryption
β Administrator Privilege Verification
β Automatic Hosts File Backup
β Secure Password Recovery
β Activity Logging
β Safe Hosts File Editing
-
β‘ Fast startup
-
πΎ Lightweight memory usage
-
π‘οΈ Secure password hashing
-
π Cross-platform support
-
π₯οΈ Responsive GUI
The following features are planned for future releases:
- β° Schedule website blocking
- π Productivity analytics dashboard
- π Add custom websites manually
- π Desktop notifications
- βοΈ Cloud synchronization
- π Multiple user profiles
- π± Android companion application
- π¨ Dark & Light themes
- π Browser extension support
- π Daily and weekly productivity reports
Contributions are welcome and greatly appreciated!
If you'd like to improve this project:
Click the Fork button on GitHub.
git clone https://github.com/your-username/Website-Blocker-System.gitgit checkout -b feature/new-featureImplement your improvements.
git commit -m "Add new feature"git push origin feature/new-featureOpen a Pull Request describing your changes.
Found a bug?
Please open an Issue on GitHub and include:
- Operating System
- Python Version
- Error Message
- Steps to Reproduce
- Screenshot (if available)
Have an idea?
Feel free to open an Issue describing your feature request.
Suggestions are always welcome.
Because the application modifies the system hosts file.
Yes.
Passwords are stored using SHA-256 hashing, which means the original password is never stored in plain text.
Yes.
Simply edit the website list inside the Python source code.
Yes.
No internet connection is required.
- Windows
- Linux
- macOS
Initial Release
- Website Blocking
- Website Unblocking
- Password Protection
- Password Recovery
- Activity Logging
- Automatic Hosts Backup
- Modern GUI
- Admin Detection
Security is one of the main goals of this project.
Implemented protections include:
- SHA-256 Password Encryption
- Hosts File Backup
- Administrator Verification
- Secure File Handling
- Action Logging
If you discover a security issue, please report it responsibly by opening a GitHub Issue.
This project demonstrates practical implementation of:
- Python Programming
- Tkinter GUI Development
- File Handling
- Operating System Interaction
- Password Hashing
- Logging
- Object-Oriented Programming
- System Administration
- Productivity Software Development
| Operating System | Supported |
|---|---|
| Windows | β |
| Linux | β |
| macOS | β |
| Category | Details |
|---|---|
| Language | Python |
| GUI | Tkinter |
| License | MIT |
| Platform | Windows, Linux, macOS |
| Status | Active Development |
This project is licensed under the MIT License.
You are free to:
- Use
- Modify
- Distribute
- Fork
- Improve
Please refer to the LICENSE file for complete details.
BS Artificial Intelligence Student
Python Developer β’ Java Developer β’ AI Enthusiast
LinkedIn: www.linkedin.com/in/muhammad-ali15
If you found this project useful, please consider supporting it.
β Star this repository
π΄ Fork the repository
π’ Share it with others
π‘ Suggest new features
π Report bugs
Every contribution helps improve the project.
Special thanks to:
- Python Community
- Tkinter Developers
- GitHub
- Open Source Contributors
If you have questions or suggestions, feel free to connect through GitHub:
GitHub: https://github.com/muhammadali-69