CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2011
    Posts
    2

    block website using c++

    hi Folks,
    I Have to develop an app in c++ to block the websites that matches keywords. I dont need source code or anything like that , All I am requesting is a starting point.

    Platform: ALl windows flavour i.e windows 7 , xp , vista etc.
    Language : C++
    Overview of a problem: I have to develop an application which will have some keywords in its array or in list for example C++ array contains "asos", "apple" etc. When my prog is running and if user type "www.asos.com" or "asos.co.uk" via browser or through some other means then my program should compare asos within its array and if found it should be able to block it. If program is not running then user should be able to type asos.com and website if working should open .

    PS: There is a requirement for not to modify the hosts file.

    All I am requesting is an idea or starting point.

    Any small help or criticism will be helpful to me.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: block website using c++

    What if the IP address of "asos.co.uk" will be used rather than "asos.co.uk" text?
    Victor Nijegorodov

  3. #3
    Join Date
    Nov 2011
    Posts
    2

    Re: block website using c++

    Quote Originally Posted by VictorN View Post
    What if the IP address of "asos.co.uk" will be used rather than "asos.co.uk" text?
    Thanks for reply, yeah basically i want to input both ip address and website name in teh code. All I am interested in little help to get me started ..

  4. #4
    Join Date
    May 2002
    Posts
    10,943

    Re: block website using c++

    If you are wanting an external C++ program to block a web browser from opening pages based on string matching within the C++ program? Can't be done.

    Now...if you want to have that C++ program host a web browser object, then that is possible.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  5. #5
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: block website using c++

    Quote Originally Posted by PeejAvery View Post
    If you are wanting an external C++ program to block a web browser from opening pages based on string matching within the C++ program? Can't be done.
    of course that CAN be done.
    that's what stuff like internet security software, proxies and firewalls does.

    the question is really what do you want it to do, and are you prepared to go through the trouble of writing a (filter) driver or even a kernel driver.

    Simplest solution is not writing it yourself, but using the built in internet security features of IE, or using a 3rd party tool like wireshark or a 3rd party firewall.

  6. #6
    Join Date
    May 2002
    Posts
    10,943

    Re: block website using c++

    Quote Originally Posted by OReubens View Post
    of course that CAN be done.
    that's what stuff like internet security software, proxies and firewalls does.
    That's not what I'm talking about. Yes, external programs can manipulate the gateways, rewrite hosts, change dns, but the actual program itself just running with no hooks cannot.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured