Wednesday 15 May 2013

Website Blocker - Using C# with Visual Studio 2010

Developed In:
-  Visual Studio 2010 (using .net framework 3.5)


Method:
Editing Host file located at C:\WINDOWS\system32\drivers\etc\hosts

Working:
Block Button:
Takes your text from Textbox and put it at the end of lines in host file like:
127.0.0.1        (your text eg. www.facebook.com)
*"127.0.0.1" is your Lan Card's IP and next to it is the "webaddress" you wanted to block access to.

UnBlock Button:
Takes your text from Textbox and search it at host file line by line. If found a line containing it then simply it will erase the whole line.

UnBlockAll Button:
Restore hosts file back to "default" by using hard-coded text in the code.

Compatibility:
-   Tested On MS Windows XP, MS Windows 7 and MS Windows 8.1
-   Requires (.net framework 3.5) in MS Windows XP

Download:
Filename: BlockIt.rar
FileSize: 122kb
Package Contains: Project (VS 2010) and Executable (.exe)


Mirror 1:              Click to Download