• Server Hacking

    Finally i am releasing Server Hacking video with the script for all my readers who have been waiting from some time for this... Your wait is over here it is

  • How To Hack - /cgi-sys/suspendedpage.cgi ~ Video Tutorial

    Many times you found that hacker posts the deface index with "/cgi-sys/suspendedpage.cgi" link e.g. www.site.com/cgi-sys/suspendedpage.cgi So, today we will learn how to do this..

  • |IDM 6.10 + PATCH

    Internet Download Manager (IDM) is a tool to increase download speeds by up to 5 times, resume and schedule downloads. Comprehensive....

  • Root and Unroot Android Phone

    Getting the ROOT of the rights and removing them to the Galaxy Ace Samsung GT-S5830 IRoot Instructions for obtaining the right. ...

  • FUD Your Trojan

    File splitter to split our servers to find out where the virus signature is to modify it. ...

C++ Program to Block a Website

If you know a little file handling in C++, you can block a web site in your computer. Logic is simple, there is a file in the location “C:/Windows/System32/drivers/etc/hosts”, you edit it throughthe program , fallow the files syntax and you are done. Actually, this file is used to maintain the DNS record of web sites. When you type www[dot]facebook[dot]com in your Browser, your computer first searches for DNS info of facebook in this file, then goes on internet. We modify this hosts file to point the DNS of the facebook to our own computer which is 127.0.0.1 and in this way, computer is never going to get the original DNS of the web site and your web site will be blocked.
Windows 7 requires extra treatment. Administrative privileges are required. Either run Codeblock as Administrator then run the program or compile it, execute it first time (it won’t work this time), go to the location of the generated EXE file, run the EXE as the administrator. Better go with first option. This program was coded to work with CodeBlock. Download CodeBlock mingw-setup from here.
Here is the program.

Code:

Click here 




If you did everything as told, your output will be.



see the site is blocked



To unblock site:
To unblock sites follow the manual way and open the hosts file in notepad and delete last lines
That 127.0.0.1  www.site.com and save.

You might cannot modify the hosts file because of windows file permission issue, then
Right click on hosts files > properties > security > and to change permissions click edit then select user and check full control box and save now again open the hosts file and modify.


                                                                                                                                                           Source :-  mycfiles.com

Categories:

0 comments:

Post a Comment