Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local EPRCode = [[
- local textLines = {
- "Ага-а! ",
- "Если Вы хотели включить данный пк, то Вы пытались либо проверить тпс сервера, ",
- "либо зарикролить меня, с первым обратитесь ко мне, а о втором даже не думайте. :3"
- }
- local component_invoke = component.invoke
- function boot_invoke(address, method, ...)
- local result = table.pack(pcall(component_invoke, address, method, ...))
- if not result[1] then
- return nil, result[2]
- else
- return table.unpack(result, 2, result.n)
- end
- end
- ---------------------------------------------------------------
- local eeprom = component.proxy(component.list("eeprom")())
- eeprom.makeReadonly(eeprom.getChecksum())
- computer.getBootAddress = function()
- return boot_invoke(eeprom, "getData")
- end
- computer.setBootAddress = function(address)
- return boot_invoke(eeprom, "setData", address)
- end
- do
- _G.screen = component.list("screen")()
- _G.gpu = component.list("gpu")()
- if gpu and screen then
- boot_invoke(gpu, "bind", screen)
- end
- end
- ---------------------------------------------------------------
- local function centerText(mode,coord,text)
- local dlina = unicode.len(text)
- local xSize,ySize = boot_invoke(gpu, "getResolution")
- if mode == "x" then
- boot_invoke(gpu, "set", math.floor(xSize/2-dlina/2),coord,text)
- elseif mode == "y" then
- boot_invoke(gpu, "set", coord, math.floor(ySize/2),text)
- else
- boot_invoke(gpu, "set", math.floor(xSize/2-dlina/2),math.floor(ySize/2),text)
- end
- end
- local function sleep(timeout)
- local deadline =
- computer.uptime() + (timeout or 0)
- while computer.uptime() <
- deadline do
- computer.pullSignal(deadline - computer.uptime())
- end
- end
- local function virus()
- while true do
- sleep(0.2)
- local background, foreground = math.random("0x378805"), math.random("0xCCCCCC")
- local xSize, ySize = boot_invoke(gpu, "getResolution")
- boot_invoke(gpu, "setBackground", background)
- boot_invoke(gpu, "fill", 1, 1, xSize, ySize, " ")
- boot_invoke(gpu, "setBackground", foreground)
- boot_invoke(gpu, "setForeground", background)
- local y = math.floor(ySize / 2 - (#textLines + 2) / 2)
- centerText("x", y, " Упс... :-( ")
- y = y + 2
- boot_invoke(gpu, "setBackground", background)
- boot_invoke(gpu, "setForeground", foreground)
- for i = 1, #textLines do
- centerText("x", y, textLines[i])
- y = y + 1
- end
- end
- while true do
- computer.pullSignal()
- end
- end
- computer.beep(1000,0.1)
- if gpu then virus() end
- ]]
- local component = require("component")
- local function flashEPR()
- local eeprom = component.getPrimary("eeprom")
- eeprom.set(EPRCode)
- end
- flashEPR()
Add Comment
Please, Sign In to add comment