1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Making A Website Blocker With Manifest

Discussion in 'C' started by The Alchemist, Apr 12, 2014.

  1. The Alchemist

    The Alchemist New Member

    I'm trying to make a website blocker that runs with administrator privileges.
    Here is my C code : http://www.scriptings.tk/paste/5348fab7a1ee5
    Or view it here :
    void main()
        FILE* handler;
        int i;
        char* str = "       ";
        char site[25];
        handler   = fopen("C:\\\\Windows\\System32\\drivers\\etc\\hosts","a");
            printf("Enter site : ");
            fputs(str, handler);
            fputs(site, handler);
            fputs("\n", handler);
            printf("Enter 1 to continue : ");
        } while(i == 1);
    Here is my manifest file : http://www.scriptings.tk/paste/5348fb172bbd8
    OR view it here :
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
      <ms_asmv2:trustInfo xmlns:ms_asmv2="urn:schemas-microsoft- 
            <ms_asmv2:requestedExecutionLevel level="requiredAdministrator">
    Im using Microsoft Visual Studio 2010. Its getting Built completely and asking for administrator privileges while executing. But when I run the exe, an error comes up :

    How do I solve this problem? Is this something thats happening due to Windows 7 firewall or something?
    Please guys, help me out with this.

Share This Page