Posted 08 April 2015 - 02:17 AM
function getFileData(file, file2)
if file == nil then
return false
else
local a = fs.open(file, "r")
local data = a.readAll()
a.close()
local newdata = data:match(":"..":"..file2..":"..":(/>.+);".."/;"..file2..";"..";"):gsub("=n".."32", "".."n")
return newdata
end
end
--[[
::nu::;/;nu;;
::pack::args = { ... }=n32b = fs.open(args[1], "w")=n32b.write('function getFileData(file, file2)\nif file == nil then\nreturn false\nelse\nlocal a = fs.open(file, "r")\nlocal data = a.readAll()\na.close()\nlocal newdata = data:match(":"..":"..file2..":"..":(/>.+);".."/;"..file2..";"..";"):gsub("=n".."32", "\".."n")\nreturn newdata\nend\nend')=n32b.write('\n--[[\n')=n32function listAll(_path, _files)=n32 local path = _path or ""=n32 files = _files or {}=n32 if #path > 1 then table.insert(files, path) end=n32 for _, file in ipairs(fs.list(path)) do=n32 if not fs.isReadOnly(file) then=n32 local path = fs.combine(path, file)=n32 if fs.isDir(path) then=n32 listAll(path, files)=n32 else=n32 table.insert(files, path)=n32 end=n32 end=n32 end=n32end=n32listAll(args[2])=n32for k, v in pairs(files) do=n32 if not fs.isDir(v) then=n32 print(v)=n32 a = fs.open(v, "r")=n32 c = a.readAll()=n32 a.close()=n32 b.write(":".. ":" .. v .. ":" .. ":" .. c:gsub("\n", "=n" .. "32") .. ";/".. ";" .. v .. ";" .. ";")=n32 b.write("\n")=n32 sleep(0.01)=n32 =n32 =n32 =n32 end=n32end=n32b.write("!end\n")=n32b.write("--]]")=n32b.flush()=n32b.close();/;pack;;
::ppo::os.unloadAPI("nu")=n32os.loadAPI("nu")=n32print(nu.getFileData("dll", "FileTo"))=n32 =n32 ;/;ppo;;
::unpack::i = true=n32args = {...}=n32function readSelf()=n32 rsi = fs.open(args[1], "r")=n32 while i == true do=n32 a = rsi.readLine()=n32 if a == "!end" then=n32 i = false=n32 else=n32 a = a:gsub("=n" .. "32", "\n")=n32 b = string.match(a, ":"..":(/>.+):"..":"):gsub(":" .. ":", ""):gsub(":" .. ":", "")=n32 print(B)/>=n32 if args[2] then=n32 der = fs.open(args[2] .."/" .. b, "w")=n32 else=n32 der = fs.open(b, "w")=n32 end=n32 der.write(a:gsub(":"..":" .. a:match(":"..":(/>.+):"..":") .. ":"..":", ""):gsub(";/"..";" .. a:match(";/"..";(.+);"..";") .. ";"..";", ""))=n32 der.flush()=n32 der.close()=n32 sleep(0.01)=n32 end=n32 end=n32end=n32pcall(readSelf);/;unpack;;
!end
--]]
line 14: nesting of [[…]] is depriciated