Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Assigning Local Variables
- local server = "computer_58"
- local channel = 3573
- local side = "right"
- local verification = "AE0047Proc"
- local deny = "AE0047Den"
- local running = true
- local waiting = true
- local user = ""
- local pass = ""
- --Assigning Functions
- local function setup()
- modem = peripheral.wrap(side)
- modem.open(channel)
- end
- local function matchDomain(user1,pass1)
- if user1 == "ldshadowlord" and pass1 == "LibERTY" then
- modem.transmit(channel,channel,verification)
- print(user1.." was logged in succesfully")
- elseif user1 == "tydorius" and pass1 == "CensorEd" then
- modem.transmit(channel,channel,verification)
- else
- modem.transmit(channel,channel,deny)
- end
- end
- local function receive()
- local waiting = true
- while waiting do
- local event,nill,newchannel,nill,user,nill = os.pullEvent("modem_message")
- print (user.." attempted to log in...")
- local event,nill,newchannel,nill,pass,nill = os.pullEvent("modem_message")
- print ("Password was received..."..pass)
- waiting = false
- end
- end
- --Main Program()
- setup()
- while running do
- receive()
- matchDomain(user,pass)
- end
Advertisement
Add Comment
Please, Sign In to add comment