Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function displayServer()
- term.setBackgroundColor(colors.black)
- Server1Login = paintutils.loadImage("/server1login")
- paintutils.drawImage(Server1Login, 1, 1)
- term.setCursorPos(18, 12)
- print("Username")
- term.setCursorPos(18, 15)
- print("Password")
- term.setBackgroundColor(colors.black)
- end
- function freeroam(diff)
- tonumber(diff)
- while true do
- w, h = term.getSize()
- if diff == 1 then
- local possibleSecurity = {}
- elseif diff == 2 then
- local possibleSecurity = {"firewall"}
- local security = "firewall"
- elseif diff == 0 or diff == nil then
- error("Error code 002")
- end
- local serverNames = {"Blocksburg", "Intek. Inc"}
- local serverPasswords = {"spass", "dogdog66", "intek", "verygoodpassword", "password"}
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- clear()
- background = paintutils.loadImage("/server1login")
- paintutils.drawImage(background, 1, 1)
- term.setCursorPos(19, 7)
- sNameSec = math.random(1, #serverNames)
- sPassSec = math.random(1, #serverPasswords)
- sUISec = math.random(1, 2)
- cServerName = serverNames[sNameSec]
- cServerPass = serverPasswords[sPassSec]
- term.setBackgroundColor(colors.black)
- print(cServerName)
- term.setCursorPos(1,1)
- term.setTextColor(colors.green)
- term.clearLine()
- if sNameSec == 1 then
- textutils.slowPrint("Connected to server 'Blocksburg Incorporated'...")
- else
- textutils.slowPrint("Connected to server 'Intek. Incorporated'...")
- end
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.gray)
- term.setCursorPos(18, 12)
- print("Username")
- term.setCursorPos(18, 15)
- print("Password")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(1, math.floor(h - 1))
- term.clearLine()
- write("> ")
- comm = read()
- if comm == "crack" then
- term.setTextColor(colors.green)
- term.setCursorPos(1,1)
- term.clearLine()
- textutils.slowPrint("Cracking password...")
- sleep(0.5)
- term.setCursorPos(1,1)
- term.clearLine()
- textutils.slowPrint("Password found: '"..cServerPass.."'")
- term.setTextColor(colors.white)
- term.setCursorPos(1, math.floor(h - 1))
- term.clearLine()
- write("> ")
- comm = read()
- if true then
- clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.green)
- if string.find(comm, "login ") and string.find(comm, cServerPass) then
- term.setCursorPos(1,1)
- term.clearLine()
- textutils.slowPrint("Password Entered: '"..cServerPass.."'...")
- sleep(0.5)
- clear()
- term.setCursorPos(1,1)
- term.clearLine()
- textutils.slowPrint("Login Attempt Success")
- if sUISec == 1 then
- term.setTextColor(colors.white)
- term.setCursorPos(1, 3)
- print("File List:")
- term.setCursorPos(3, 4)
- print("os.properties")
- term.setCursorPos(3, 5)
- print("Documents")
- term.setCursorPos(1, math.floor(h - 1))
- term.clearLine()
- write("> ")
- comm = read()
- if comm == "del os.properties" then
- term.setCursorPos(1,1)
- term.setTextColor(colors.green)
- term.clearLine()
- textutils.slowPrint("Deleting file 'os.properties'...")
- sleep(0.5)
- term.setCursorPos(1,1)
- term.clearLine()
- textutils.slowPrint("Done.")
- term.setTextColor(colors.white)
- term.setCursorPos(3, 4)
- term.clearLine()
- print("<Deleted>")
- term.setCursorPos(1, math.floor(h - 1))
- term.clearLine()
- write("> ")
- comm = read()
- if comm == "reboot -i" then
- clear()
- sleep(0.5)
- term.setCursorPos(1,3)
- term.setTextColor(colors.red)
- print("Internal Server Error: No such file")
- sleep(1)
- end
- end
- elseif sUISec == 2 then
- clear()
- term.setCursorPos(1, 3)
- term.setTextColor(colors.white)
- for i=1,w do
- write("-")
- end
- term.setCursorPos(1, 4)
- term.setTextColor(colors.white)
- print("Company: "..serverNames[sNameSec])
- print(" ")
- balance = math.random(2000, 20000)
- print("Current Balance: ÂĽA3"..balance)
- employees = math.random(100, 300)
- print("Number of Employees: "..employees)
- term.setCursorPos(1, math.floor(h - 1))
- term.clearLine()
- write("> ")
- if foundUI2 == false then
- foundUI2 = true
- term.setCursorPos(1, math.floor(h - 2))
- print("This is an information board.")
- sleep(1)
- term.setCursorPos(1, math.floor(h - 2))
- term.clearLine()
- print("You can type 'bal <Balance>' as one hack.")
- sleep(1)
- term.setCursorPos(1, math.floor(h - 2))
- term.clearLine()
- print("Try it now: 'bal <Balance>'")
- term.setCursorPos(1, math.floor(h - 1))
- term.clearLine()
- write("> ")
- end
- term.setCursorPos(1, math.floor(h - 1))
- term.clearLine()
- write("> ")
- comm = read()
- if comm == "bal "..balance then
- clear()
- term.setTextColor(colors.green)
- textutils.slowPrint("Accessing Financial Screen...")
- sleep(1)
- clear()
- textutils.slowPrint("Done.")
- term.setTextColor(colors.white)
- term.setCursorPos(1, math.floor(h - 1))
- term.clearLine()
- write("> ")
- term.setCursorPos(1,3)
- for i=1,w do
- write("-")
- end
- term.setCursorPos(1,4)
- print("Balance: "..balance)
- financeID = math.random(100000, 999999)
- print("Finance ID: "..financeID)
- term.setCursorPos(1, math.floor(h - 1))
- term.clearLine()
- write("> ")
- comm = read()
- if comm == "fid "..financeID then
- term.setCursorPos(1, math.floor(h - 1))
- term.clearLine()
- write("> ")
- term.setCursorPos(1,1)
- term.clearLine()
- term.setTextColor(colors.green)
- textutils.slowPrint("Overflowing financial buffer...")
- sleep(1)
- clear()
- textutils.slowPrint("Done.")
- term.setCursorPos(1, 3)
- term.setTextColor(colors.white)
- for i=1,w do
- write("-")
- end
- term.setCursorPos(1, 4)
- term.setTextColor(colors.red)
- print("Internal Server Error: Financial Buffer Error")
- sleep(2)
- end
- end
- end
- end
- end
- end
- end
- end
- local tArgs = {...}
- local server1 = false
- local foundFirewall = false
- local foundProxy = false
- local foundUI2 = false
- clear()
- if tArgs[1] == nil then
- print("What would you like your username to be?")
- write("Username: ")
- uname = read()
- print(" ")
- print("What would you like your password to be?")
- write("Password: ")
- pword = read("*")
- elseif tArgs[1] == "-nologin" then
- uname = "username"
- pword = "password"
- elseif tArgs[1] == "-server1" then
- server1 = true
- uname = "username"
- pword = "password"
- elseif tArgs[1] == "-crash" and tArgs[2] ~= nil then
- error("Error code "..tArgs[2])
- elseif tArgs[1] == "-freeroam" then
- server1 = true
- freeroamEnabled = true
- freeroam()
- end
- w, h = term.getSize()
- if server1 == false then
- clear()
- term.setCursorPos(math.floor(w / 2 - string.len("-= GenieChat =-")), 1)
- print("-= GenieChat =-")
- print(" ")
- print("Please Login to GenieChat")
- print(" ")
- write("Username: ")
- unameIn = read()
- if unameIn == uname then
- print(" ")
- write("Password: ")
- pwordIn = read("*")
- if pwordIn == pword then
- clear()
- term.setCursorPos(math.floor(w / 2 - string.len("-= GenieChat =-")), 1)
- print("-= GenieChat =-")
- print("Moved to channel #4724")
- print(" ")
- print("<agentli>: Hi!")
- sleep(1.5)
- print("<You>: Hey.")
- sleep(1.5)
- print("<agentli>: So, what do you want to do?")
- sleep(1.5)
- print("<You>: I dunno.")
- sleep(1)
- term.setBackgroundColor(colors.red)
- clear()
- sleep(0.25)
- term.setBackgroundColor(colors.black)
- clear()
- term.setCursorPos(math.floor(w / 2 - string.len("-= GenieChat =-")), 1)
- print("-= GenieChat =-")
- print(" ")
- print("Moved to channel #666")
- print(" ")
- print("<agentls>: What just happened?")
- sleep(1.5)
- print("<You>: I dunno. Your username changed.")
- sleep(1.5)
- print("<agentli>: Better now?")
- sleep(1.5)
- print("<You>: Umm... Yeah, I guess...")
- sleep(1.5)
- print("<agentli>: Ok. Back to the job.")
- sleep(1.5)
- print("<You>: 'job'...?")
- sleep(1.5)
- print("<agentli>: You don't know? I want you to gain access to a server and... let's just say do some damage...")
- sleep(1.5)
- print("<You>: You mean hacking? I don't want to do that!")
- sleep(1.5)
- print("<agentli>: Well... too bad, I guess. Just press a key please.")
- sleep(1)
- print(" ")
- print("-= Please press a key to continue... =-")
- os.pullEvent("key")
- print(" ")
- print("-= Error: Unstability Detected! =-")
- sleep(0.75)
- term.setBackgroundColor(colors.lightBlue)
- sleep(0.75)
- clear()
- term.setBackgroundColor(colors.black)
- clear()
- else
- print(" ")
- print("Incorrect Password.")
- sleep(2)
- os.reboot()
- end
- else
- print(" ")
- print("Invalid Username.")
- sleep(2)
- os.reboot()
- end
- end
- displayServer()
- term.setBackgroundColor(colors.black)
- term.setCursorPos(1, math.floor(h - 2))
- print("This is the server.")
- sleep(2)
- clear()
- displayServer()
- term.setCursorPos(1, math.floor(h - 2))
- print("Type 'crack' to crack the password.")
- term.setCursorPos(1, math.floor(h - 1))
- write("> ")
- comm = read()
- if comm == "crack" then
- term.setCursorPos(1, 1)
- term.setTextColor(colors.green)
- textutils.slowPrint("Cracking password...")
- term.setCursorPos(1,1)
- sleep(0.5)
- term.clearLine()
- textutils.slowPrint("Password Found: 'spass'")
- term.setTextColor(colors.white)
- term.setCursorPos(1, math.floor(h - 2))
- term.clearLine()
- print("Well done. Now, type 'login spass' to login.")
- term.setCursorPos(1, math.floor(h - 1))
- term.clearLine()
- write("> ")
- comm = read()
- if comm == "login spass" then
- term.setCursorPos(1, 1)
- term.setTextColor(colors.green)
- term.clearLine()
- textutils.slowPrint("Password Entered: 'spass'...")
- sleep(0.5)
- clear()
- term.setCursorPos(1,1)
- term.clearLine()
- textutils.slowPrint("Login Attempt Success")
- term.setTextColor(colors.white)
- term.setCursorPos(1, 3)
- print("File List:")
- term.setCursorPos(3, 4)
- print("os.properties")
- term.setCursorPos(3, 5)
- print("Documents")
- term.setCursorPos(1, math.floor(h - 2))
- print("So, type 'del os.properties' to delete the file.")
- term.setCursorPos(1, math.floor(h - 1))
- write("> ")
- comm = read()
- if comm == "del os.properties" then
- term.setCursorPos(1,1)
- term.setTextColor(colors.green)
- term.clearLine()
- textutils.slowPrint("Deleting file 'os.properties'...")
- sleep(0.5)
- term.setCursorPos(1,1)
- term.clearLine()
- textutils.slowPrint("Done.")
- term.setTextColor(colors.white)
- term.setCursorPos(3, 4)
- term.clearLine()
- print("<Deleted>")
- term.setCursorPos(1, math.floor(h - 2))
- print("Now, type 'reboot -i' to reboot the server.")
- term.setCursorPos(1, math.floor(h - 1))
- term.clearLine()
- write("> ")
- comm = read()
- if comm == "reboot -i" then
- clear()
- sleep(0.5)
- term.setCursorPos(1,3)
- term.setTextColor(colors.red)
- print("Internal Server Error: No such file")
- sleep(0.5)
- term.setCursorPos(1, math.floor(h - 2))
- term.setTextColor(colors.white)
- print("Okay. Well done. Just a second, don't type 'exit'!")
- term.setCursorPos(1, math.floor(h - 1))
- write("> ")
- comm = read()
- if comm == "exit" then
- freeroamEnabled = true
- end
- end
- end
- end
- end
- if freeroamEnabled == true then
- freeroam(1)
- --clear()
- --term.setTextColor(colors.white)
- --print("You have completed the demo.")
- else -- Error Code 001 = freeroam not enabled, but reached
- error("Error code 001")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement