home *** CD-ROM | disk | FTP | other *** search
- {Ez egy LEGO nevû vírus-t keres meg, úgyhogy ezt a progit a kényszer szülte!}
-
- Uses Crt,Dos,Kurzor;
-
- const Vazon : Array[1..6] Of Byte = ($BA,$00,$50,$81,$C2,$45);
-
- Type Ftype = record
- Nev : String[12];
- Meret : Longint;
- Tipus : Byte;
- Hely : String;
- End;
-
- Var
- X,I,X2 : longint;
- Rec : Word;
- c : longint;
- Fdb : Longint;
- Fok : Array[1..200] Of Ftype absolute $9000:$0000;
- vq,dq : Integer;
-
- CONT : Integer;
- wl : Byte;
- F2 : File of Byte;
- F3 : Text;
-
- Procedure Pure(Nev:String);
- Var
- S : Byte;
- Begin
- Assign(F2,Nev);
- {$I-}
- Reset(F2);
- {$I+}
- If IoResult=0 Then
- Begin
- If Filesize(F2)>1000 Then Begin Seek(F2,FileSize(F2)-1000); End;
- wl:=0;
- cont:=0;
- Repeat
- Inc(cont);
- Read(F2,S);
- If Vazon[wl+1]=S Then Wl:=Wl+1
- Else Wl:=0;
- If Wl=6 Then Begin
- GotoXY(68,12);
- Writeln('VIRUS!!!');
- Writeln(F3,'VIRUS: ',Nev);
- GotoXY(48,11);
- Writeln(' ');
- inc(vq);
- End;
- Until (Eof(F2)) or (cont>20);
- Close(F2); End Else Begin
- GotoXY(68,11);
- Writeln('DOSERROR');
- Writeln(F3,'DOSERROR: ',Nev);
- inc(dq);
- End;
- End;
-
- Procedure Read_Items(Path:String);
- Var
- Kit : String;
- D : SearchRec;
- Begin
- inc(rec);
- FindFirst(Path+'*.*',AnyFile,D);
- While DosError=0 Do
- Begin
- inc(x);
-
- GotoXY(20,12);
- Writeln('Workdir: ',path,' ');
- GotoXY(20,13);
- Writeln('Files : ',x);
- GotoXY(20,14);
- Writeln('Virus : ',vq);
- GotoXY(20,15);
- Writeln('Doserror: ',dq);
- inc(c);
- inc(c);
- GotoXY(38,11);
-
- I:=2;
- Repeat
- Inc(I);
- Until D.Name[I]='.';
- Kit:=Copy(D.Name,I+1,3);
- If D.Name<>'VK.EXE' Then
- If (Kit='EXE') or (Kit='COM') Then Begin
- Write(D.Name,' ');
- Pure(Path+D.Name);
- inc(X2);
- End;
- If D.Name[1]<>'.' Then
- If D.Name[1]<>'..' Then
- Begin
- If Fdb<=200 Then Begin
- Fok[Fdb].Nev:=D.name;
- Fok[Fdb].Meret:=D.size;
- Fok[Fdb].Tipus:=D.attr;
- End;
- If FDb>=200 Then Begin
- Fdb:=0;
- End;
- inc(fdb);
- End;
- If (D.Attr And Directory = Directory) AND (D.Name[1]<>'.') Then Read_Items(Path+D.Name+'\');
- FindNext(D);
- End;
- dec(rec);
- End;
-
-
- Begin
- Kurki;
- Assign(F3,'Virusos.txt');
- Rewrite(F3);
- vq:=0;
- dq:=0;
- Fdb:=1;
- x:=0;
- x2:=0;
- ClrScr;
- GotoXY(55,25);
- Writeln('By TyRaNT of MurmidoneS');
- GotoXY(20,11);
- Writeln('Files on Drive C: ');
- Read_Items('\');
- close(f3);
- GotoXY(38,5);
- writeln('-=-=-');
- GotoXY(38,6);
- writeln('»OK!«');
- GotoXY(38,7);
- writeln('-=-=-');
- GotoXY(28,8);
- Writeln('VIRUSOS.TXT was create...');
- readkey;
- Kurbe;
- End.
-