A python script to block certain websites using the hosts file.
To run the program, simply clone the repository and run the main.py file.
Using the Tkinter library a simple GUI is shown and allows for the simple adding and removal of website links.
To "block" a website, insert the website inside the entry and press the Block button or simply press Enter. The website will be added to the hosts file and will be shown within the GUI. To "remove" a website, select the row within the GUI you want to remove and press the Unlock button or the "delete" key.
If want to block a certain amount of websites at the same time, you can now do so. Simply copy in the different urls you would like to block and paste them inside the second window. You can save certain lists of urls for different moments. E.g. you could save social media links if you regularly want to block the same list of social media urls. You can both add the urls to the blocked websites, or only block the typed urls in such removing the existing blocked urls. You can also change to redirection adress within the GUI. lastly if you want to remove everything from the blocked list, simply press "reset".
Since I am a beginner, if you have any adviced or remarks on the code please let me know!