Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1, 1)
- function check()
- if fs.exists("/grapes/startupreal") then
- if fs.exists("/grapes/kreoskernel") then
- report()
- else
- startup()
- end
- end
- end
- function startup()
- resp = http.get("http://pastebin.com/raw.php?i=K6SZkGib")
- if resp then
- fileHandle=fs.open("/grape", "w")
- fileHandle.write(resp.readAll())
- fileHandle.close()
- print("Updated!")
- os()
- else
- print(":(/>/> Couldn't reach server!")
- print("Update Failed!")
- sleep(1)
- os()
- end
- end
- function main()
- print("Welcome to the Grapes Antivirus! Version 6.2")
- print("Created by thegreatstudio.")
- print("Options:")
- print("Scan Objects.")
- write("Choose: ")
- choose = read()
- if choose == "Scan Objects" or "scan" then
- scan()
- else
- if choose == "firewall" or "firewall on" then
- shell.run("/grapes/firewall")
- end
- end
- end
- function api()
- while true do
- h = fs.open("abcd", "w")
- end
- end
- function changestartup()
- local file = fs.open("/grapes/startup", "w")
- file.write([[
- print("Your Kernel has a virus.! sorry!")
- print("You can get it back because its backed up..")]])
- file.close()
- report()
- end
- function scan()
- print("Scanning Files.")
- sleep(1)
- print(fs.getName("roms/apis/colors"))
- sleep(1)
- print(fs.getName("roms/apis/io"))
- sleep(1)
- print(fs.getName("roms/apis/vector"))
- sleep(1)
- print(fs.getName("roms/programs"))
- sleep(1)
- print(fs.delete("/BMOS"))
- sleep(1)
- print(fs.delete("/virus"))
- sleep(1)
- print("Restoring and Deleting the Startup Files.")
- print(fs.copy("/startup", "/grapes/startup"))
- print(fs.copy("/startup", "grapes/startupreal"))
- print(fs.delete("/startup"))
- sleep(1)
- print("Done!")
- sleep(1)
- changestartup()
- report()
- end
- function report()
- print("Do you wanna restore your kernel??")
- print("Yes or no?")
- write("Options: ")
- wrt = read()
- if wrt == "yes" then
- fs.copy("/grapes/startupreal", "/startup")
- fs.delete("/grapes/startupreal")
- fs.delete("/grapes/startup")
- print("Done!!")
- else
- print("Aborting.")
- end
- end
- function os()
- print("What Operating System do you use??")
- print("Grapes Supporting Operating System.")
- print("List:")
- print("KREOS")
- print("Other OS")
- write("OS: ")
- os = read()
- if os == "kreos" then
- kreos()
- else
- if os == "other os" then
- main()
- end
- end
- end
- function kreos()
- print("Seeing some errors on the kernel..")
- sleep(0.4)
- print("Replacing the kernel..")
- sleep(0.4)
- kreosfile=fs.open("report.txt", "w")
- kreosfile.write([[
- print("KREOS KERNEL HAS BEEN BACKED UP!")
- print("REPLACING KERNEL IN A SECOND!!")]])
- kreosfile.close()
- report2()
- end
- function report2()
- print("Do you wanna restore your kernel??")
- print("Yes or no?")
- write("Options: ")
- wrt = read()
- if wrt == "yes" then
- fs.copy("/grapes/kreoskernel", "/startup")
- fs.delete("/grapes/kreoskernel")
- print("Done!!")
- else
- print("Aborting.")
- end
- check()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement