Hello guys,
most anti-virus not block know dangerous web pages. just like the picture in this post.
how do i implement this feature in my program
Any Ideas?
thanks
Printable View
Hello guys,
most anti-virus not block know dangerous web pages. just like the picture in this post.
how do i implement this feature in my program
Any Ideas?
thanks
there's usually a list somewhere.... could be in the app itself, or in somekind of data file, or online. Before navigating to the page, it checks the destination address, and if it's in the list, re-routes the navigation and displays the access denied notice.
-tg
techgnome
Thats true. I will have a list somewhere in my app that can be edited from time to time.
but the question is how do i go about it?
i heard i would need to enumerate opened IE and Fox. but what if the user has many tabs or windows opened?
any ideas?
oh... so this isn't inside of some browser you built... but rather you're trying to hook into the user's browser, what ever they have.... no clue how exactly they do that. Probably scanning the tcp traffic somehow... and some how returns a false response from the server...
???
Got me.
-tg
techgnome that is another idea, but how do i scan tcp traffic of the computer. remember that some anti-virus might not like this, like Norton
How do i do that?
What you are trying to make is a 'basic' Firewall, and it is not a trivial task... I recommend you find a pre-made one (perhaps on PlanetSourceCode), and try to find out how it works.
There are no real firewalls written in VB on pscode.com. They do not block connections, but they disconnect already established connections to your computer.
The way they do it is by continuously looping through the TCP table with the GetTcpTable API and a timer. But it might not be fast enough, because you need to convert each hostname (mscracks.com) to an IP address in order to disconnect it and that takes time, especially when you have a huge list of websites.
Here's a small tool I wrote years ago to disconnect certain IP addresses you might want to play around with.
http://www.vbforums.com/showpost.php...9&postcount=14
In the picture i placed above Eset detected the website as soon as i pressed go, that is very ok. because scanning tcp port is not a good idea. most antivirus don't like this.
Search for a pre-made firewall project written in VB, and run the ones that seem good to see whether they seem to be capable of doing this (despite what Chris001 posted, I have seen VB projects that are real firewalls).
If you find one that seems about right, try to make changes so that it does what you want.
What Chris001 linked to could also be a good place to start, but I haven't looked at it.
As I said before this kind of thing is not a trivial task, even if you manage to find a pre-made project it will still be far more complex than walking a treeview... so it may be best if you don't try to implement something like this (and instead use a pre-made program).
If you've seen VB6 projects that are real firewalls, then I would like to see one. Real firewalls do low level packet filtering (probably requires a driver) and check a packet before it's allowed to go through.
I've looked at this, this, this, this, this, this and this 'firewall' from pscode.com and all of them simply check the TCP Table after the connection has already been fully made. Then they set the State to 12 (MIB_TCP_STATE_DELETE_TCB) and disconnect with the SetTcpEntry API and that's too late.
I have seen at least one that does it properly, but it was a few years ago so unfortunately I can't remember where I found it (and I didn't keep a copy, as I wasn't that interested).
I can't remember details of it either, but I wouldn't be surprised if it had a C based DLL to act as a driver.
Thanks Si and Chris!
So you are saying that it involves packet filtering,
I think start from there.
but please don't forget to post back if you find it.
Si
Am not planing on building a full fledge firewall, just a simple program to prevent browsing the site i specify. plus the fact that it wont look nice if i add third party to my program except its a dll or activex.
Can you suggest a premadeone that is free anyways
Thanks
you can search 'local webserver' source code.
and you can set your default page to local file with that.
and you can edit file 'hosts' (without extension) in system32\driver directory.
and direct it into 127.0.0.1
i know, i know, but how? Any code sample would be ok. the examples posted that refers to PSC is not exactly what i want, but am presently working on seeing how to make it work. untill then, any suggestion and code samples would be appreciated
You can use a Browser Helper Object to do this with Internet Explorer but not Firefox.
Thanks pcuser,
but i want ideas on something that if possible does not depends on the browser, because smart users will bypass this.
Besides this technique will allow the user access d site for some some seconds before it is detected
thanks again