Seek(f,H.HL) ;

Truncate(f); {Отсека ем вирус) if NoAlarm or NoQuery then

CheclcVirusResult :» -2 {Удалей автоматически} else

CheckVirusResult := -1 {Удален с разрешения} end else begin

if not NoAlarm then begin

Write(txtl,txt2,txt3) ;

с := ReadKey;

if с = #0 then

с := ReadKey end;

CheckVirusResult := -4 {Вирус не удален} end end; {AntiAlDS} ^——..-————————^

Procedure Check;

(Осуществляет контроль заголовка файла) var

k: Byte;

s: String [1];

begin {Check}

CheckVirusResult := 0;

{Дешифруем ключ:} with H,H.HE do

for k := 1 to 14 do

Hem[k] := Hem[k] XOE Key;

{Проверяем заголовок:} k := 1;

while (CheckVirusResult=Q) and (k <» X4) do begin

if H.HE.Heatkl <> Head.HE.Hea[kl then CheckVirusResult := -1;

inc(k) end;

it CheckVirusResult "-I then begin (Обнаружен факс заражения}

if NoAlarm then

AntiAlDS else begin

WriteLn(1Файл 1,Name,' заражен вирусом!1#7) ;

if NoQuery then

AntiAlDS else begin

Write('Удалять вирус (У/М, умлч.Х)? ');

s := ' ';

ReadLn(s);

if (s=") OB (OpCasetstlDO'll")

then AntiAlDS else

CheckVirusResult :•• -3 end •nd