tags:

views:

267

answers:

3

Hai I am developing an C# application(not asp.net) in which I have to get the urls typed by the user in the browser and I have to compare the urls with a set of urls and decide whether to allow or to deny the user to navigate to the website. I have tried with appending to C:\windows\system32\drivers\etc\hosts file but its not working.So Is there any way I can do this?How to block the sites by getting the urls.Can someone suggest me how to approach to the solution with some sites or code that can help me.

Thank You Chaithu

A: 

Basically you want a proxy server with a black list?

Richard
I cant develop proxy i need run it as an application
chaithu
And why are you asking this for the third time?
crashmstr
As I have not found a solution for the past two times
chaithu
A: 

The easiest way is to modify the hosts file, but that means the app has to run with administrator access.

Joel Coehoorn
+4  A: 

You're going about it the wrong way. You don't want to intercept at the browser level - I'll use a browser or method you've never heard of to get where I want to go. You need to go deeper. Own the network interface or the operating system's network communication (e.g. the hosts file as people said) and authenticate each connection. Ideally, own it outside of the computer - at the network infrastructure level.

Tom Ritter