locked
I want to make a site blocker RRS feed

  • Question

  • Hi. First of all, I'm using translation, I'm sorry. The program I want to do is a site blocker. A program that blocks sites inside a Text file. I will add the example www.badsite.com address into the text file. After adding it, it will run the application and block badsite.com and Site Blocked! I want the article to appear. In short, it is like antiviruses blocking the malicious site. Don't call me a host file. The host file is an easily editable file. But I welcome you if you suggest a Host file. Please help me. This idea haunts my mind :)
    Wednesday, August 12, 2020 12:06 PM

All replies

  • Hello,

    have not seen a VB.NET code sample but this is the API

    https://docs.microsoft.com/en-us/windows/win32/fwp/windows-filtering-platform-start-page?redirectedfrom=MSDN

    Most blockers are done in JavaScript or Python https://github.com/topics/website-blocker


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Wednesday, August 12, 2020 12:36 PM
  • How do antiviruses do this when blocking the site?
    Wednesday, August 12, 2020 12:50 PM
  • How do antiviruses do this when blocking the site?
    They work within a service, can't say what the code is as the best one's have perfected themselves over many years with a great deal of expertise knowing how bad people think and how to circumvent their actions. 

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Wednesday, August 12, 2020 1:17 PM
  • The program I want to do is a site blocker. A program that blocks sites inside a Text file

    The O/S already can do this by using the Host file. From Windows 3.1 to Windows 10, you can edit the host file and block sites the computer can access by making entries into the host file.

    https://famisafe.wondershare.com/block/how-to-block-websites-on-computer.html

    Other than that, learn how to use the firewall solution that runs on the computer or install one and set a firewall rule to block a site. 

    Wednesday, August 12, 2020 4:00 PM
  • After some research I managed to do it. But I have a problem. I want a post to appear when it blocks the site. For example; Site Blocked! Thanks again.
    Thursday, August 13, 2020 6:30 PM
  • Hi Syndax,

    Here's a reference about blocking webpages. You can have a look.

    Block webpages and display error page

    Hope it could be helpful.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, August 14, 2020 9:11 AM