Bhrkamal
Bhrkamal

Reputation:

Block all urls on windows desktop using win32 API

I am trying to develop one application which can block all urls using win32 api on windows desktop application.
So is there any api or any procedure doing programmatically so that i can block all urls?

Upvotes: 1

Views: 1475

Answers (3)

Vinayaka Karjigi
Vinayaka Karjigi

Reputation: 1090

You can do this using Windows Firewall Protocol. This is an API provided by Microsoft.

For Vista it's straight-forward, but for XP you need to do some work around, as examples are not available for that.

Upvotes: 0

Deanna Gelbart
Deanna Gelbart

Reputation: 387

I suppose you can do it using the Windows Firewall API

http://msdn.microsoft.com/en-us/library/Aa366453.aspx

Upvotes: 0

Spencer Ruport
Spencer Ruport

Reputation: 35117

It's impossible to block just URLs. If you want to make sure no one can access the internet the only way to do this would be to unplug the ethernet cable. (Or whatever is giving you connectivity) Here's why:

  1. Blocking all DNS resolution won't stop someone from accessing http://206.132.84.265/
  2. Blocking port 80 and 443 won't stop someone from accessing a web site hosted on a non-standard port.
  3. Denying access to IE and installation of any other software won't stop someone from downloading a browser that doesn't require to be installed (Like a text browser) and putting it on a thumb drive.
  4. Buying an expensive firewall that blocks HTTP traffic won't be able to stop SSL operating on a non-standard port.

Believe me, back in highschool I worked in a warehouse with a scanner gun and figured out how I could check my email with it (with a little help from my computer at home) since an internet gateway was on the same network.

If you want to block people from surfing the web, disconnect the internet.

Upvotes: 1

Related Questions