Solved

URL filter

Posted on 1998-11-10
6
270 Views
Last Modified: 2013-12-03
I need to write a URL filter so I can prevent people who use
a computer from accessing certian websites. I got the Microsoft Internet Client SDK and I looked at creating a pluggable protocol handler, but now I'm thinking that that's the wrong place to start.

Does anyone know how this is done? Does anyone know of any source or documents that touch on this?

Corey
0
Comment
Question by:cdgough
6 Comments
 
LVL 15

Expert Comment

by:NickRepin
ID: 1415953
Create your own wsock32.dll which contans all functions from original dll. Rename original dll. Most of the functions in your dll will be only a thunk which will call appropriate function in renamed original dll.
But some of your functions will check their parameters and return error result if user tries to call to restricted sites.
This will works for all winsock apps - explorer, ftp, etc.
That's the way (two dlls - original and fake) the MS Proxy server works.

0
 

Author Comment

by:cdgough
ID: 1415954
Thinks Nick. The only problem I had with that solution is that so many developers already do that. When you chain together the content filters, proxy servers, the original .dll and all the other ones it seems like you are bound to get some unwanted side effects. I'm wondering if it would be possible to do the same type of thing by rewriting the .dll for the http:// protocol handler.
0
 

Expert Comment

by:sbeebe
ID: 1415955
I have been looking into the same subject (see Q.10094773). Unfortunately I have not found a satisfactory answer yet. But I have come across some documents that may be of interest. Here are the links:

http://www.microsoft.com/msj/0997/hood0997.htm
http://www.sstinc.com/winsock.html
http://www.win-tech.com/toolkit.htm (this one recommended to me by mite51)

If somebody comes up with an answer please post it on my question as well.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 15

Accepted Solution

by:
Tommy Hui earned 200 total points
ID: 1415956
If you are targetting IE, your best bet is to use DDE. Search for Dynamic Data Exchange Support in Microsoft Internet Explorer
in MSDN. In particular, search for RegisterURLEcho, so your application can get notified of when an URL is loaded, then you can use OpenURL to change it to something more appropriate.

0
 

Expert Comment

by:sbeebe
ID: 1415957
I have been looking into the same subject (see Q.10094773). Unfortunately I have not found a satisfactory answer yet. But I have come across some documents that may be of interest. Here are the links:

http://www.microsoft.com/msj/0997/hood0997.htm
http://www.sstinc.com/winsock.html
http://www.win-tech.com/toolkit.htm (this one recommended to me by mite51)

If somebody comes up with an answer please post it on my question as well.
0
 

Author Comment

by:cdgough
ID: 1415958
Do you know of any code samples or documents that show this URL interception?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question