antivirus usb BY LAtETom
2011-03-13 11:24
253 查看
#include "stdio.h"
main()
{
FILE *fp;
char driver;
char path[20];
char name[20];
char c;
char YN1,YN2;
char dos1[20],dos2[20];
int i=0;
int flag=0;
for(;i<20;i++)
{
dos1[i]=dos2[i]=path[i]=name[i]='/0';
}
printf("Please input the driver./n");
scanf("%c",&driver);
sprintf(path,"%c://autorun.inf",driver);
fp=fopen(path,"r+");
if (!fp)
{
printf("No virus in %c./n",driver);
}
else
{
flag=1;
}
while((c=fgetc(fp))!=EOF)
{
if(c=='o'||'O'==c)
{
c=fgetc(fp);
if(c=='p'||'P'==c)
{
c=fgetc(fp);
if('e'==c||'E'==c)
{
c=fgetc(fp);
if('n'==c||'N'==c)
{
c=fgetc(fp);
if('='==c)
{ i=0;
while((c=fgetc(fp))!='/n'&&c!=EOF)
{
name[i]=c;
i++;
}
}
}
}
}
}
}
if('e'==name[strlen(name)-1])
{
printf("Find virus in %c://%s./n",driver,name);
}
else
{
flag=0;
}
if(flag)
{
printf("The virus is in %c://%s./n",driver,name);
sprintf(dos1,"del %c://autorun.inf",driver);
if(0==system(dos1))
{
printf("/nDelete %c://autorun.inf successfully./n",driver);
}
sprintf(dos2,"del %c://%s",driver,name);
if(0==system(dos2))
{
printf("/nDelete %c://%s successfuuly.",driver,name);
}
}
getch();
}
main()
{
FILE *fp;
char driver;
char path[20];
char name[20];
char c;
char YN1,YN2;
char dos1[20],dos2[20];
int i=0;
int flag=0;
for(;i<20;i++)
{
dos1[i]=dos2[i]=path[i]=name[i]='/0';
}
printf("Please input the driver./n");
scanf("%c",&driver);
sprintf(path,"%c://autorun.inf",driver);
fp=fopen(path,"r+");
if (!fp)
{
printf("No virus in %c./n",driver);
}
else
{
flag=1;
}
while((c=fgetc(fp))!=EOF)
{
if(c=='o'||'O'==c)
{
c=fgetc(fp);
if(c=='p'||'P'==c)
{
c=fgetc(fp);
if('e'==c||'E'==c)
{
c=fgetc(fp);
if('n'==c||'N'==c)
{
c=fgetc(fp);
if('='==c)
{ i=0;
while((c=fgetc(fp))!='/n'&&c!=EOF)
{
name[i]=c;
i++;
}
}
}
}
}
}
}
if('e'==name[strlen(name)-1])
{
printf("Find virus in %c://%s./n",driver,name);
}
else
{
flag=0;
}
if(flag)
{
printf("The virus is in %c://%s./n",driver,name);
sprintf(dos1,"del %c://autorun.inf",driver);
if(0==system(dos1))
{
printf("/nDelete %c://autorun.inf successfully./n",driver);
}
sprintf(dos2,"del %c://%s",driver,name);
if(0==system(dos2))
{
printf("/nDelete %c://%s successfuuly.",driver,name);
}
}
getch();
}
相关文章推荐
- In version 2.0, DB Query Analyzer will never be mistaken as virus by anti-virus software
- In version 2.0, DB Query Analyzer will never be mistaken as virus by anti-virus software
- 递归 全排列 BY LAtETom
- In version 2.0, DB Query Analyzer will never be mistaken as virus by anti-virus software
- Pack Antivirus 2007 Vol.1 by DR³ Team
- 『转』Panda Antivirus Pro 2014 – 免费6个月
- linux下的病毒查杀 Clam AntiVirus
- Kindle connect PI by USBNetWork(To be completed)
- 解决:efi usb device has been blocked by the current security policy
- Uninstall Symantec Antivirus 10
- Hack Like a Pro: How to Kill and Disable Antivirus Software on a Remote PC
- Remove WolfRam AntiVirus Fraud
- 部署Symantec Antivirus 10.0网络防毒服务器之七
- ESET NOD32 Antivirus & ESET Smart Security下载地址汇总
- Kick the Heuristic Anti-virus out of the Rootkit
- 邮件接收中Postfix、Dovecot、Squirrelmail、MySQL、AMaVis、Clam AntiVirus和SpamAssasin的功能解析
- 【常见踩坑】USB调试安装失败(Installation failed with message INSTALL_CANCELED_BY_USER)
- 部署Symantec Antivirus 10.0网络防毒服务器之五
- Kingsoft AntiVirus(金山毒霸) and av-comparatives organization
- 开源防毒软件Clam AntiVirus