This is a script that aims to implement a website blocking utility for Windows-based systems. It makes use of the computer's hosts files and runs it as a background process, preventing access to the sites entered by the user in list format.
The project does not require any third party libraries
After opening the script in your Python IDE, execute the code so that you get the UI output window. Open your browser and try to visit the websites you blocked. When the script runs successfully, you will see This site can't be reached
error or similar 404 error's on the browser.
Note:
In some systems, access to the computers's hosts files maybe denied by default to prevent malware attacks. So the script while executing may show an error while modifying the hosts files. Please visit here for a brief readup on how to solve the issue.
Recommended: Please revert to the original access settings after testing the script to prevent any future compromise