I need to write a program to block certain URLs when web browsing, but I
have not been able to really find anything to help. I was hoping to have a
service running in the back that can check browser windows and compare the
URLs then post a message and shut down the web page if it matches....Any one
have a good starting point for me.
TIA
Dave 10 2720
On 2005-02-09, Lespaul36 <le*******@none .net> wrote: I need to write a program to block certain URLs when web browsing, but I have not been able to really find anything to help. I was hoping to have a service running in the back that can check browser windows and compare the URLs then post a message and shut down the web page if it matches....Any one have a good starting point for me.
TIA Dave
That sounds like the job of a proxy server or a firewall...
The problem with using browser windows is that, how are you going to
know the window for every possible browser... So, you hook IE, but what
if the user decides to fire up Firefox (my fav!) or Mozilla or Opera or
.... No, the only way to do this (unless you know that you will always
be dealing with only one browser) is really to intercept outbound traffic
in the form of a proxy as stated above, or on the low level like a
firewall. The low level would involve the use of raw sockets to sniff
all outbound traffic, and you would probably have an easier time doing
that in C# the VB.NET...
If you know it's always going to be one browser, then you would probably
need to do a system wide hook to recieve all messages related to the
creating of top level windows... Probably WH_SHELL would be the best
choice, since it would only send you notifications for top level
windows, and not for every dialog, button, and menu in the system. But,
that would mean that you would have to step outside of .NET for the
actual hook since this kind of hook must reside in a standard non-com
dll.
Is there some reason that you can't use one of the many available
solutions to this?
--
Tom Shelton [MVP]
Tom,
I am glad you write about this in this way, the last time I was scared to
answer this kind of messages because of the lot of messages I had seen about
ports and was in doubt if there was not found a method for this.
You know that I answer this always in context wise exact same way as you did
now.
Cor
It is for my nephew...he has been getting in a bit of trouble and is
restricted on his computer use. In the past I have tried a few of the
parenting products out there, but they over did it and then I couldn't seem
to remove them, was a real pain in the but.
He uses IE and he can't install software. I thought there was a way to
block sites using Security Policies, but haven't been able to find much out
about it. I was thinking there might even be a way to do it with IE itself,
but no luck.
I was interested in finding out how a program like that would work also to
further my knowledge. As far as being easier in C#, don't all .net
languages have the same access to the CLR. I do know c#, but I am more
comfortable with vb.
"Tom Shelton" <ts******@YOUKN OWTHEDRILLcomca st.net> wrote in message
news:uD******** *****@TK2MSFTNG P14.phx.gbl... On 2005-02-09, Lespaul36 <le*******@none .net> wrote: I need to write a program to block certain URLs when web browsing, but I have not been able to really find anything to help. I was hoping to have a service running in the back that can check browser windows and compare the URLs then post a message and shut down the web page if it matches....Any one have a good starting point for me.
TIA Dave
That sounds like the job of a proxy server or a firewall...
The problem with using browser windows is that, how are you going to know the window for every possible browser... So, you hook IE, but what if the user decides to fire up Firefox (my fav!) or Mozilla or Opera or ... No, the only way to do this (unless you know that you will always be dealing with only one browser) is really to intercept outbound traffic in the form of a proxy as stated above, or on the low level like a firewall. The low level would involve the use of raw sockets to sniff all outbound traffic, and you would probably have an easier time doing that in C# the VB.NET...
If you know it's always going to be one browser, then you would probably need to do a system wide hook to recieve all messages related to the creating of top level windows... Probably WH_SHELL would be the best choice, since it would only send you notifications for top level windows, and not for every dialog, button, and menu in the system. But, that would mean that you would have to step outside of .NET for the actual hook since this kind of hook must reside in a standard non-com dll.
Is there some reason that you can't use one of the many available solutions to this?
-- Tom Shelton [MVP]
In article <uD************ **@TK2MSFTNGP14 .phx.gbl>, Lespaul36 wrote: It is for my nephew...he has been getting in a bit of trouble and is restricted on his computer use. In the past I have tried a few of the parenting products out there, but they over did it and then I couldn't seem to remove them, was a real pain in the but.
He uses IE and he can't install software. I thought there was a way to block sites using Security Policies, but haven't been able to find much out about it. I was thinking there might even be a way to do it with IE itself, but no luck.
I was interested in finding out how a program like that would work also to further my knowledge. As far as being easier in C#, don't all .net languages have the same access to the CLR. I do know c#, but I am more comfortable with vb.
The main reason that working with raw sockets may be a little easier in
C# is it's ability to use direct memory access (aka, real pointers) via
the unsafe keyword. It's not impossible in VB.NET - but it would be
slower and not as clean.
I would avoid raw sockets. You can write a proxy server - but you'll want
to get familiar with the RFC's related to http. Really, the easiest and
most practicle way is to setup a firewall and filter from there. If you
can't find a reasonably priced hardware firewall that has this ability -
you can always use something like FreeBSD. The nice thing is that you
don't need much of a machine to run it. I'm running FreeBSD 4.11 as a
firewall on a Pentium 200 box with 128MB of RAM and 4GB harddrive.
--
Tom Shelton [MVP]
OS Name: Microsoft Windows XP Professional
OS Version: 5.1.2600 Service Pack 2 Build 2600
System Up Time: 0 Days, 0 Hours, 1 Minutes, 11 Seconds
Lespaul.
The sites that you want to block for your little nephew can't mostly not be
blocked even not with the most expensive hardware/software.
They change there IP adresses they change their dns names they use
redirectors from homepage style url's or whatever to prevent that.
(When you dont want to block any access)
Just my thought,
Cor
Tom Shelton <to*@YOUKNOWTHE DRILLmtogden.co m> wrote in
news:eK******** ******@TK2MSFTN GP10.phx.gbl: I would avoid raw sockets. You can write a proxy server - but you'll want to get familiar with the RFC's related to http. Really, the easiest and most practicle way is to setup a firewall and filter from
Indy already has proxy components and can be used from VB. Its free with
source too: http://www.indyproject.org/
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"
Empower ASP.NET with IntraWeb http://www.atozed.com/IntraWeb/
In article <e2************ **@TK2MSFTNGP14 .phx.gbl>, Cor Ligthert wrote: Lespaul.
The sites that you want to block for your little nephew can't mostly not be blocked even not with the most expensive hardware/software.
They change there IP adresses they change their dns names they use redirectors from homepage style url's or whatever to prevent that.
(When you dont want to block any access)
Just my thought,
Cor
That's true - there are sites that are hard to block without constant
attention.
--
Tom Shelton [MVP]
I am going to take a look the proxy idea. However, knowing that he is only
using IE, I am checking out BHOs(Browser Heloper Objects), but I think I may
put that on the back burner for a bit and just do some research until I get
more time.
"Tom Shelton" <to*@YOUKNOWTHE DRILLmtogden.co m> wrote in message
news:eK******** ******@TK2MSFTN GP10.phx.gbl... In article <uD************ **@TK2MSFTNGP14 .phx.gbl>, Lespaul36 wrote: It is for my nephew...he has been getting in a bit of trouble and is restricted on his computer use. In the past I have tried a few of the parenting products out there, but they over did it and then I couldn't seem to remove them, was a real pain in the but.
He uses IE and he can't install software. I thought there was a way to block sites using Security Policies, but haven't been able to find much out about it. I was thinking there might even be a way to do it with IE itself, but no luck.
I was interested in finding out how a program like that would work also to further my knowledge. As far as being easier in C#, don't all .net languages have the same access to the CLR. I do know c#, but I am more comfortable with vb.
The main reason that working with raw sockets may be a little easier in C# is it's ability to use direct memory access (aka, real pointers) via the unsafe keyword. It's not impossible in VB.NET - but it would be slower and not as clean.
I would avoid raw sockets. You can write a proxy server - but you'll want to get familiar with the RFC's related to http. Really, the easiest and most practicle way is to setup a firewall and filter from there. If you can't find a reasonably priced hardware firewall that has this ability - you can always use something like FreeBSD. The nice thing is that you don't need much of a machine to run it. I'm running FreeBSD 4.11 as a firewall on a Pentium 200 box with 128MB of RAM and 4GB harddrive.
-- Tom Shelton [MVP] OS Name: Microsoft Windows XP Professional OS Version: 5.1.2600 Service Pack 2 Build 2600 System Up Time: 0 Days, 0 Hours, 1 Minutes, 11 Seconds
I don't mean this to sound sarcastic (although I think it will come across
that way), but have your nephew's parents considered spending time with him
while he is on the computer and being involved in what he does to ensure
that he doesn't do things that can get him in trouble?
Perhaps it would be worthwhile moving his computer away from the solitude
and privacy of his room into a more open environment like the lounge, or
dining room so that he is always aware that people are around and can see
his screen?
On a technology level, install terminal services or VNC or anything that
lets someone else log in and see what he is up to, then point out to the
young man that he will be subject to random checks of his machine using this
tool.
Alternatively, if you really want to write a software solution write some
code that will screenshot the entire screen onto a network share so long as
DirectX Exclusive mode is not in use (which would mean he's in a game). Then
set the software to screenshot at a configurable interval in minutes. This
could be achieved with off the shelf screenshotting software like Snagit,
but there is an obvious risk there that he will simply terminate the program
when he finds it .
My personal view is that attempting to restrict what the kid can do won't
work. However, making him responsible for his actions and aware that his
actions will be monitored and followed up may help more.
--
Pete Wright
Author of ADO.NET Novice to Pro for Apress www.petewright.org
"Lespaul36" <le*******@none .net> wrote in message
news:uD******** ******@TK2MSFTN GP14.phx.gbl... It is for my nephew...he has been getting in a bit of trouble and is restricted on his computer use. In the past I have tried a few of the parenting products out there, but they over did it and then I couldn't seem to remove them, was a real pain in the but.
He uses IE and he can't install software. I thought there was a way to block sites using Security Policies, but haven't been able to find much out about it. I was thinking there might even be a way to do it with IE itself, but no luck.
I was interested in finding out how a program like that would work also to further my knowledge. As far as being easier in C#, don't all .net languages have the same access to the CLR. I do know c#, but I am more comfortable with vb.
"Tom Shelton" <ts******@YOUKN OWTHEDRILLcomca st.net> wrote in message news:uD******** *****@TK2MSFTNG P14.phx.gbl... On 2005-02-09, Lespaul36 <le*******@none .net> wrote: I need to write a program to block certain URLs when web browsing, but I have not been able to really find anything to help. I was hoping to have a service running in the back that can check browser windows and compare the URLs then post a message and shut down the web page if it matches....Any one have a good starting point for me.
TIA Dave
That sounds like the job of a proxy server or a firewall...
The problem with using browser windows is that, how are you going to know the window for every possible browser... So, you hook IE, but what if the user decides to fire up Firefox (my fav!) or Mozilla or Opera or ... No, the only way to do this (unless you know that you will always be dealing with only one browser) is really to intercept outbound traffic in the form of a proxy as stated above, or on the low level like a firewall. The low level would involve the use of raw sockets to sniff all outbound traffic, and you would probably have an easier time doing that in C# the VB.NET...
If you know it's always going to be one browser, then you would probably need to do a system wide hook to recieve all messages related to the creating of top level windows... Probably WH_SHELL would be the best choice, since it would only send you notifications for top level windows, and not for every dialog, button, and menu in the system. But, that would mean that you would have to step outside of .NET for the actual hook since this kind of hook must reside in a standard non-com dll.
Is there some reason that you can't use one of the many available solutions to this?
-- Tom Shelton [MVP]
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mike420 |
last post by:
I think everyone who used Python will agree that its syntax is
the best thing going for it. It is very readable and easy
for everyone to learn. But, Python does not a have very good
macro capabilities, unfortunately. I'd like to know if it may
be possible to add a powerful macro system to Python, while
keeping its amazing syntax, and if it could be possible to
add Pythonistic syntax to Lisp or Scheme, while keeping all
of the...
|
by: Christopher |
last post by:
This should be a quick one.
URL: http://cfa-www.harvard.edu/~cpilman/Stuff/flush.html
Code:
=============================
<!DOCTYPE HTML Public "-//W3C//DTD HTML 4.01//EN">
<HTML><Head><Title>Get my feet off the ground</Title>
<Meta HTTP-Equiv="Content-Type" Content="text/html; charset=us-ascii">
<Style type="text/css">
Body { font-size: 60px; }
|
by: TadPole |
last post by:
Hi all,
My main problems are:::::::::
1. Set a value within a block container that can be used and changed by
subsequent templates/block-containers/tables etc..
2. get/determine/find the setting that tell the process that the new
top of the document region is now at the end of the last
block-container used, this must be set in that last block container.
3. find the value used in the 'top" setting on the prior
|
by: seamoon |
last post by:
Hi,
I'm doing a simple compiler with C as a target language. My language uses
the possibility to declare variables anywhere in a block with scope to the
end of the block. As I remembered it this would be easily translated to C,
but it seems variable declaration is only possible in the beginning of a
block in C. Any suggestions how to get around this?
|
by: morrell |
last post by:
I have a request to find out is there an easy way to solve this little
poblem.
___________________
| Block 1 |
| |
| |
| |
|__________________|
| |
by: foolmelon |
last post by:
If a childThread is in the middle of a catch block and handling an
exception caught, the main thread calls childThread.Abort(). At that
time a ThreadAbortException is thrown in the childThread. The question
is: after the ThreadAbortException is thrown, does the childThread
continue run the remaining code in the catch block?
|
by: Alvin |
last post by:
I'm making a very simple game in SDL, and I'm not asking for SDL help I
hope - this looks like something C++ related, so I'll ask here.
I have a class for a simple block, or tile, in the game, which can be
either on or off. I'm having trouble with the constructor though.
class block
{
private:
SDL_Surface *screen;
|
by: dave8421 |
last post by:
Hi,
I'm a bit confused about the definition about "Prinicpal Block Boxes"
in CSS 2.1 draft specification.
( http://www.w3.org/TR/2006/WD-CSS21-20061106 )
<pre>
9.2.1 Block-level elements and block boxes
The principal block box establishes the containing block for descendant
boxes and generated
|
by: Bob Greschke |
last post by:
This is the idea
Block = pack("240s", "")
Block = pack(">H", W)
Block = pack(">H", X)
Block = pack(">B", Y)
Block = pack(">H", Z))
but, of course, Block, a str, can't be sliced. The real use of this is a
bit more complicated such that I can't just fill in all of the "fields"
|
by: cssExp |
last post by:
hello,
Rather than going on a wild explanation on what's the the problem, it'll be much quicker and easier if i let you look at it yourself, so I'll post my page source (actual contents taken out, of course).
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Language" content="en-us" />
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
| |
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |