i need help on making anti porn programe
hi every body
i heared about aprograme called anti *** programe this programe block any such sites when the user try to open it but this programe use very large data base containig this sites
iam trying to make programe like this programe but i have diffrent idea
i will make the programe chek what has written in the addres bar if the address bar contain any of certain words the intrent explorer open other site or open blank page .....
see you ......
iam waiting for your sweet posts
well you can go through each process of IExplorer opened:
Process[] theProcesses = System.Diagnostics.Process.GetProcessesByName("iexplore")
then for each process, get the MainWindowTitle and do some checking. Example:
foreach(Process curProcess in theProcesses)
{
if (curProcess.MainWindowTitle.Contains("Word"))
{
//process contains some word and you have to handle it
}
}
does this help?
thax my brother for your pos but i think there is some thing wron in this code
i try to use it but there is an error
Process[] theProcesses = System.Diagnostics.Process.GetProcessesByName("iexplore");
foreach
(Process curProcess in theProcesses){
if (curProcess.MainWindowTitle.Contains("Word")){
MessageBox.Show("don't open it again") ;
//process contains some word and you have to handle it}
the error is in Contains ("words")
the compiler told me that 'string' doesn't contain definition for 'Contains'
remember that "word" is just a placeholder/marker - you have to replace "word" with whatever you are looking for.
Which version of .NET Framework are you using? I believe .Contains() was introduced in .NET 2.0
just to add, I think you maybe looking towards more of an enterprise type/local network security system. Perhaps by aid of proxy servers with website filtering or something, I'm not sure. That would probably be a better solution overall
Just to add, thinking more and more, even though there maybe words in the title bar of the words you are wanting to detect, it may not mean that the entire website content is relating to the "illegal" websites. Some websites have meta data tags, describing the website or search key words etc.... in which case filtering this would maybe be a better option. However you are better to implement a real security system, proxies/filtering.
hello,
first of all, sorry for my English, I'm Spanish
I'm trying to do something similar and I managed it using an Application for Windows Proyect but when I try it in a Service for Windows Proyect, MainWindowTitle doesn't works. It always return "", and MainWindowHandle returns 0.
Whats the problem?, why does it works in a kind of proyect but not in the other?
thank you very much
the reason being because Windows Service runs under a different account (The Local System account I think) and is different to your useraccount when logged into your computer. You would need to start the service using your user credential details in the service, but going into the services configuration on your system, selecting your service from the service MMC and editing the Log on information to your user account
thanks thanks thanks,
yes, that's the problem!!!
i've managed it doing the follow:
- service type: LocalSystem
- changing manually the checkbox "Allow service to interact with the desktop" in the service window properties.
The only thing i have to do now is to change that checkbox by code. I've tried it modifying the registry but it doesn't work. I'll follow trying it.
thank you very much