Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ Website Blocker System

A Modern, Secure & Password-Protected Website Blocking Application

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


πŸ“– Overview

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.


✨ Features

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

πŸ› οΈ Built With

  • Python 3.x
  • Tkinter
  • hashlib
  • shutil
  • logging
  • os
  • ctypes
  • time

πŸ“‚ Project Structure

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

πŸš€ Quick Start

1️⃣ Clone Repository

git clone https://github.com/muhammadali-69/Website-Blocker-System.git

2️⃣ Enter Project Folder

cd Website-Blocker-System

3️⃣ Install Requirements

pip install -r requirements.txt

4️⃣ Run Application

Windows

python main.py

Linux / macOS

sudo python3 main.py

πŸ“‹ Requirements

  • Python 3.x
  • Tkinter
  • Administrator / Root privileges
  • Permission to modify the system hosts file

βš™οΈ How It Works

  1. Launch the application.

  2. Create a password if it's your first time.

  3. Login using your password.

  4. The application checks administrator privileges.

  5. A backup of the hosts file is created automatically.

  6. Select websites to block.

  7. The selected domains are redirected to 127.0.0.1.

  8. All actions are stored inside blocker.log.


🌐 Supported Websites

The application currently supports blocking:

  • Facebook
  • Instagram
  • TikTok
  • Snapchat
  • Pinterest
  • Reddit
  • YouTube

More websites can easily be added.


πŸ” Security Features

βœ” SHA-256 Password Encryption

βœ” Administrator Privilege Verification

βœ” Automatic Hosts File Backup

βœ” Secure Password Recovery

βœ” Activity Logging

βœ” Safe Hosts File Editing


πŸ“Έ Screenshots

🏠 Dashboard

Dashboard


πŸ”‘ Login Screen

Login


🌐 Website Selection

Block


🚫 Blocked Websites

Unblock


πŸ”’ Password Window

Password


πŸ“œ Activity Log

Logs


πŸ“ˆ Performance

  • ⚑ Fast startup

  • πŸ’Ύ Lightweight memory usage

  • πŸ›‘οΈ Secure password hashing

  • 🌍 Cross-platform support

  • πŸ–₯️ Responsive GUI


πŸ§ͺ Future Improvements

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

🀝 Contributing

Contributions are welcome and greatly appreciated!

If you'd like to improve this project:

1. Fork the Repository

Click the Fork button on GitHub.

2. Clone Your Fork

git clone https://github.com/your-username/Website-Blocker-System.git

3. Create a New Branch

git checkout -b feature/new-feature

4. Make Your Changes

Implement your improvements.

5. Commit Your Changes

git commit -m "Add new feature"

6. Push to GitHub

git push origin feature/new-feature

7. Create a Pull Request

Open a Pull Request describing your changes.


🐞 Reporting Bugs

Found a bug?

Please open an Issue on GitHub and include:

  • Operating System
  • Python Version
  • Error Message
  • Steps to Reproduce
  • Screenshot (if available)

πŸ’‘ Feature Requests

Have an idea?

Feel free to open an Issue describing your feature request.

Suggestions are always welcome.


❓ Frequently Asked Questions

Why does the application require Administrator privileges?

Because the application modifies the system hosts file.


Is my password secure?

Yes.

Passwords are stored using SHA-256 hashing, which means the original password is never stored in plain text.


Can I add more websites?

Yes.

Simply edit the website list inside the Python source code.


Does it work offline?

Yes.

No internet connection is required.


Which operating systems are supported?

  • Windows
  • Linux
  • macOS

πŸ“œ Changelog

Version 1.0

Initial Release

Added

  • Website Blocking
  • Website Unblocking
  • Password Protection
  • Password Recovery
  • Activity Logging
  • Automatic Hosts Backup
  • Modern GUI
  • Admin Detection

πŸ›‘οΈ Security

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.


πŸ“š Learning Purpose

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

🌍 Compatibility

Operating System Supported
Windows βœ…
Linux βœ…
macOS βœ…

πŸ“Š Repository Information

Category Details
Language Python
GUI Tkinter
License MIT
Platform Windows, Linux, macOS
Status Active Development

πŸ“„ License

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.


πŸ‘¨β€πŸ’» Developer

Muhammad Ali Memon

BS Artificial Intelligence Student

Python Developer β€’ Java Developer β€’ AI Enthusiast

Connect With Me

LinkedIn: www.linkedin.com/in/muhammad-ali15


⭐ Support the Project

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.


πŸ™ Acknowledgements

Special thanks to:

  • Python Community
  • Tkinter Developers
  • GitHub
  • Open Source Contributors

πŸ“¬ Contact

If you have questions or suggestions, feel free to connect through GitHub:

GitHub: https://github.com/muhammadali-69


❀️ Thank You for Visiting

If this project helped you,

⭐ Please give it a Star ⭐

Made with ❀️ using Python

Developed by Muhammad Ali Memon

Β© 2026 Muhammad Ali Memon. All Rights Reserved.

About

πŸ›‘οΈ A cross-platform website blocker built with Python and Tkinter that enforces system-level blocking via the hosts file. Includes password protection, SHA-256 hashing, and a modern dark-themed UI with custom URL management.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages