IE, Firefox, Safari: want to write an Internet filter: are there any known “hooks” with which I can associate?

For each of the modern browsers, there are well-known hooks that I can tie so that I can write an Internet filter while browsing, for example, an interface where I can write implementations for these types of events:

OnBeginSurf(URL) { // check URL to see if goes to porn site } OnContentFinishedDownloading(HTML) { // check HTML for "bad" content } 

I suppose I would write COM code for IE? I assume Firefox and Safari have some well-known interfaces for these things?

Can someone point me to some web pages that describe this? I could not find much in Googling ...

+4
source share
3 answers

Do not try to connect to browsers to record a content filter.

Write a proxy server. Each browser will request web content through your proxy server, which will be able to check and filter the content before it returns to the browser. You can write your code once and make it work on what the web content is requesting.

+3
source

For IE, these are the BeforeNavigate2 , NavigateComplete2 and DocumentComplete events on the DWebBrowserEvents2 web browser dispinterface control.

+2
source

Although I agree with Justin Niessner that a proxy server is the way to go, but if you are the goal of protecting children from porn, I think that you would probably be better off using an existing product.

A lot of time and energy went into technical web filters. In addition to compiling a large database of banned sites, you will need to develop a heuristic to guess if the unknown site is safe, advanced filters also perform image analysis to determine if the image contains nudity. You also need to do a lot of testing to make sure that protection cannot be easily turned off or bypassed, as well as constant updates to work with new adult content sources.

If you do not have developers, or plan to work full time for several years, it will be difficult for you to find the level of protection against solutions on the shelf.

+1
source

Source: https://habr.com/ru/post/1305549/


All Articles