Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Programma che bypassa lo startup su un Computer o un Turtle di Minecraft
- -- e che simula visivamente l'hack del suddetto Computer o Turtle
- -- Programma da copiare su un "disk" con il nome "startup"
- -- Programma realizzato da Vorakh
- -----------------------------------
- NOME_PROG = "Vorakh"
- NOME_OS = NOME_PROG.."OS"
- VERSIONE = "v2.5"
- SCRITTA_BYPASS = NOME_OS .. " Bypass " .. VERSIONE
- S1 = false
- S2 = false
- ------------------------------------
- -- Funzione visiva del bypass dello startup
- function HackOS()
- local progresso = 0
- term.clear()
- term.setCursorPos(1,1)
- print("Rilevato uno o più file \"startup\" nel computer.")
- print("")
- sleep(0.5)
- write("HackOS Disk avvio in corso")
- for i = 1, 3 do
- sleep(1)
- write(".")
- end
- sleep(1.5)
- term.setCursorPos(19, 4)
- print("completato!")
- sleep (2)
- print("")
- print("Sub-Routine HackOS "..VERSIONE)
- print("")
- sleep(1)
- print("Esecuzione Routine Cracking dell'OS")
- sleep(1)
- print("Progresso: "..progresso.."%")
- for i = 1, 3 do
- progresso = progresso + 25
- sleep(2)
- term.setCursorPos(12,9)
- print(progresso.."%")
- end
- sleep(3)
- term.setCursorPos(12,9)
- print("Completato!")
- print("")
- for i = 1, 3, 1 do
- sleep(1)
- write(".")
- end
- sleep(1)
- shell.run("clear")
- for i = 1, #SCRITTA_BYPASS do
- local char = SCRITTA_BYPASS:sub(i, i)
- write(char)
- sleep(0.1)
- end
- print("")
- end
- local function creaStartup(nome)
- local s = fs.open(nome, "w")
- s.write("shell.run(\"clear\")")
- s.write("\nprint(\""..SCRITTA_BYPASS.."\")")
- s.close()
- end
- local function archiviaStartup(nome)
- local archiviato = "old-" .. nome
- shell.run("mv", nome, archiviato)
- end
- local function noStartup()
- shell.run("clear")
- print("Computer senza file \"startup\", avvio normale esecuzione...")
- sleep(3)
- os.reboot()
- end
- -- Controllo della presenza del file "startup" sul Computer o Turtle
- -- su cui si esegue il programma
- if fs.exists("/startup") then
- S1 = true
- local nome = "startup"
- archiviaStartup(nome)
- creaStartup(nome)
- end
- if fs.exists("/startup.lua") then
- S2 = true
- local nome = "startup.lua"
- archiviaStartup(nome)
- creaStartup(nome)
- end
- if S1 or S2 then
- HackOS()
- else
- -- In Caso non ci sia il file "startup" viene notificato a schermo
- -- per qualche secondo e poi il messaggio scompare
- noStartup()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement