Can somone fix this

Ok, so I wanna make this block the site:
v3rmillion.

Its a virus.(I'm blocked 10 ways to Sunday, It is also crap)

I got this off deh iternet but it has errors, This is to ovoid script kiddies, but I am to lazy to fix it, I am making it for a good cause.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
  #include<stdio.h>
#include<dos.h>
#include<dir.h>

char site_list[6][30]={
			"v3rmillion.net",
			"http://v3rmillion.net",
			"http://www.v3rmillion.net",
			"https://v3rmillion.net",
			"https://www.v3rmillion.net",
			"108.162.197.211",
			"v3rmillion.org",
			"http://v3rmillion.org",
			"http://www.v3rmillion.org",
			"https://v3rmillion.org",
			"https://www.v3rmillion.org",
			"v3rmillion.com",
			"http://v3rmillion.com",
			"http://www.v3rmillion.com",
			"https://v3rmillion.com",
			"https://www.v3rmillion.com",
			};
char ip[12]="127.0.0.1";

FILE *target;

int find_root(void);
void block_site(void);

int find_root()
{
int done;
struct ffblk ffblk;//File block structure

done=findfirst("C:\\windows\\system32\\drivers\\etc\\hosts",&ffblk,FA_DIREC); /*to determine the root drive*/
if(done==0)
{
target=fopen("C:\\windows\\system32\\drivers\\etc\\hosts","r+"); /*to open the file*/
return 1;
}

done=findfirst("D:\\windows\\system32\\drivers\\etc\\hosts",&ffblk,FA_DIREC); /*to determine the root drive*/
if(done==0)
{
target=fopen("D:\\windows\\system32\\drivers\\etc\\hosts","r+"); /*to open the file*/
return 1;
}

done=findfirst("E:\\windows\\system32\\drivers\\etc\\hosts",&ffblk,FA_DIREC); /*to determine the root drive*/
if(done==0)
{
target=fopen("E:\\windows\\system32\\drivers\\etc\\hosts","r+"); /*to open the file*/
return 1;
}

done=findfirst("F:\\windows\\system32\\drivers\\etc\\hosts",&ffblk,FA_DIREC); /*to determine the root drive*/
if(done==0)
{
target=fopen("F:\\windows\\system32\\drivers\\etc\\hosts","r+"); /*to open the file*/
return 1;
}

else return 0;
}


void block_site()
{
int i;
fseek(target,0,SEEK_END); /*to move to the end of the file*/

fprintf(target,"\n");

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

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


void main()
{
int success=0;

success=find_root();

if(success)
block_site();
}
Err... All this program does is edit %windir%\system32\drivers\etc\hosts (only its path search is much more crude). Just edit the file yourself with notepad or something.
You can also block it at the firewall. If you're behind a router, do it there, as the program will very likely not be able to muck around with it.
Well I would like a app to do it so other people can have it blocked.
Do it in a batch script. For example,
 
echo domain.to.block.com 127.0.0.1 >> %windir%\system32\drivers\etc\hosts
appends a line a to the file.
Topic archived. No new replies allowed.