• 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 Unblock a Website

In our previous tutorial, we presented you a C++ program that could block a web site on your computer through employing slight changes in the hosts file. read it here, C++ Program to Block a Website
While posting that article, We thought that this tutorial is incomplete as we had not provided you the program to unblock the web site. So, here we are. We coded this program that can unblock the web sites on your computer that have been blocked through editing the hosts file.

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
Sample Output:
As in previous article we blocked fb here we are unblocking it

Code Analysis:
The logic of the program is simple. We input the web site name from the user and store it on an array. In the hosts file, we try to take a line and store its content in the array and then simply perform an string matchingalgorithm to find out that whether site name is included in the line array taken out of file. If we get affirmative result, we note out the number of line. Later, in the program, we open the file in the write mode and go to the stored line number and change all the contents of that line to white spaces. So, here is the program.




Source :-  mycfiles.com

Categories:

0 comments:

Post a Comment