Skip to content

This is a simple python script that organizations can use in their office computers to block certain websites, for example, www.bing.com or www.facebook.com, during their working hours.

License

Notifications You must be signed in to change notification settings

yash022/website-blocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Website Blocker

This is a simple python script that organizations can use in their office computers to block certain websites, for example, www.bing.com or www.facebook.com, during their working hours.

to change the webiste you need to block , open the py file in any code editor , replace the webiste in this line

image

and save it as pyw file .

first, you need to make some administration changes in the host file, which is located

for windows

image

C:\Windows\System32\drivers\etc\hosts

right-click on the host file and click properties

image

after that, click on the safety

image

then in the groups or usernames box, select all applications packages

image

, click on edit, then in the permission for users box, click on write permission

image

now click on ok

now you need to schedule this script

Scheduling in Windows: Scheduling of above script is little bit trick but I will guide you step by step-

1.First of all change the extension of your script from “.py” to “.pyw”. 2.Now open task scheduler. Task scheduler should look like this:

image

You may see website blocker already scheduled because I have already scheduled in my computer for my testing purpose. Follow further instruction of scheduling carefully in order to schedule website blocker in your computer.

3.Click on “create task”. Fill the name of your choice and flag “Run with highest privilege”.

image

image

  1. Now go to triggers, select “At startup” for begin the task.

image

5.Go to Action bar and create a new action and give path of your script.

image

image

  1. Go to conditions bar and unflag the power section.

image

image

  1. Press ok and you can see the script scheduled.

image

  1. Finally restart your computer and see the magic.

image

Note: You can also check instantly by clicking run button.

About

This is a simple python script that organizations can use in their office computers to block certain websites, for example, www.bing.com or www.facebook.com, during their working hours.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages