资源简介
C++ 编写的杀毒软件,可自定义特征,有中文注解

代码片段和文件信息
// BAV.cpp : Defines the entry point for the console application.
//
#include “stdafx.h“
#include “VirusDB.h“
#include “Scanobject.h“
#include “VirusInfo.h“
#include “Engine.h“
int _tmain(int argc _TCHAR* argv[])
{
//////////////////////////////////////////////////////////////////////////
//
// 参数检查
//
if(argc<2)
{
printf(“Not enough parameter!\nBAV [drive:]path\n“);
return -1;
}
//////////////////////////////////////////////////////////////////////////
//
// 病毒库装载,先不从文件装载,后面版本增加。
//
CVirusDB cVDB;
if( !cVDB.Load(NULL) )
return -2;
//////////////////////////////////////////////////////////////////////////
//
// 扫描
//
CEngine cBavEngine;
PSCAN_RESULTS pScanResults = NULL;
if( cBavEngine.Load(&cVDB) )
{
SCAN_PARAM stScanParam;
stScanParam.nSize = sizeof(SCAN_PARAM);
stScanParam.strPathName = argv[1]; // TODO: Add path verify here
stScanParam.eAction = BA_SCAN;
pScanResults = cBavEngine.Scan(&stScanParam);
}
//////////////////////////////////////////////////////////////////////////
//
// show results
//
if(pScanResults)
{
CVirusInfo cVInfo;
printf(“\n---------------------- Done ----------------------\n“);
printf(“Total %d file(s) %d virus(es) detected.\n\n“ pScanResults->dwObjCount pScanResults->dwRecCount);
printf(“Total %d milliseconds %d ms/file.\n“ pScanResults->dwTime pScanResults->dwTime/pScanResults->dwObjCount);
PSCAN_RECORD pScanRecord = pScanResults->pScanRecords;
while( pScanRecord )
{
printf(“\“%s\“ infected by \“%s\“ virus.\n“ pScanRecord->pScanobject->GetobjectName() cVInfo.GetNameByID(pScanRecord->dwVirusID));
pScanRecord = pScanRecord->pNext;
}
}
//////////////////////////////////////////////////////////////////////////
//
// clean up
//
cBavEngine.Release();
cVDB.Unload();
return 0;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1955 2005-07-09 23:51 BAV\BAV.cpp
文件 16384 2005-07-14 00:01 BAV\BAV.proj
文件 895 2005-07-04 14:38 BAV\BAV.sln
文件 4691 2005-07-12 00:52 BAV\BAV.vcproj
目录 0 2005-08-21 03:52 BAV\Debug
文件 3640 2005-08-21 02:20 BAV\define.h
文件 3046 2005-07-13 23:56 BAV\Engine.cpp
文件 769 2005-07-11 23:17 BAV\Engine.h
文件 2524 2005-08-21 00:00 BAV\Fileob
文件 711 2005-08-20 23:44 BAV\Fileob
文件 2371 2005-08-20 23:58 BAV\MemFileob
文件 585 2005-08-20 23:45 BAV\MemFileob
文件 3663 2005-08-21 03:51 BAV\ParsePE.cpp
文件 245 2005-08-20 16:28 BAV\ParsePE.h
文件 1585 2005-08-21 03:38 BAV\ReadMe.txt
文件 196 2005-08-20 15:35 BAV\Scanob
文件 685 2005-08-20 23:45 BAV\Scanob
文件 290 2005-07-04 14:38 BAV\stdafx.cpp
文件 457 2005-07-07 15:00 BAV\stdafx.h
文件 8679 2005-08-21 03:00 BAV\VirusDB.cpp
文件 452 2005-08-20 14:04 BAV\VirusDB.h
文件 478 2005-08-21 01:23 BAV\VirusInfo.cpp
文件 129 2005-07-09 16:03 BAV\VirusInfo.h
目录 0 2005-08-21 03:51 BAV
----------- --------- ---------- ----- ----
54648 25
- 上一篇:基于C语言的AT指令代码实现
- 下一篇:C++本科作业--模拟动物园
相关资源
- 国际象棋的qt源代码
- C++中头文件与源文件的作用详解
- C++多线程网络编程Socket
- VC++ 多线程文件读写操作
- 利用C++哈希表的方法实现电话号码查
- 移木块游戏,可以自编自玩,vc6.0编写
- C++纯文字DOS超小RPG游戏
- VC++MFC小游戏实例教程(实例)+MFC类库
- 连铸温度场计算程序(C++)
- 6自由度机器人运动学正反解C++程序
- Em算法(使用C++编写)
- libstdc++-4.4.7-4.el6.i686.rpm
- VC++实现CMD命令执行与获得返回信息
- 白话C++(全)
- C++标准库第1、2
- 大数类c++大数类
- C++语言编写串口调试助手
- c++素数筛选法
- C++ mqtt 用法
- 商品库存管理系统 C++ MFC
- c++ 多功能计算器
- C++17 In Detail
- 摩托车仪表盘软件(基于STM8)
- 嵌入式QtC++编程课件
- 颜色识别形状识别STM103嵌入式代码
- c++ 邮件多附件群发
- c++ 透明代理(hookproxy)
- mfc 调用redis
- FTP客户端源码(c++)
- c++ 画图(14Qt-XPS)
评论
共有 条评论