The program has a black list, it contains a list of sites. When the user opens the site in IE (Firefox, Opera, Chrome) he should get an error. (For example 404). How can I do? It is advisable not writing to the file HOSTS. Language C#. Thanks.
A:
The concept behind what you're trying to do is monitoring port 80 outgoing traffic and block any requests addressed to sites/ips contained in the black list.
It's kind of complex posting for you the whole code here.
Regardless, this kind of operation is best suited to a network firewall filter than to a custom C# app that runs on the client.
Matteo Mosca
2010-06-25 09:57:35