Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local server = "https://ikrypto.club/ccscript"
- term.clear()
- term.setCursorPos(1, 1)
- while true do
- os.loadAPI("json")
- print("[ PhilOS v0.1 ]")
- print("(c) 2016 Phaneron")
- print("")
- term.write("username: ")
- local username = read()
- term.write("password: ")
- local password = read("*")
- local req = {}
- req["username"] = username
- req["password"] = password
- local data = json.encode(req)
- resp = json.decode(http.post(server.."/auth", data).readAll())
- if resp["status"] == 200 then
- token = resp["token"]
- break
- else
- print("Access denied. (".. resp["status"] .. ")")
- end
- end
- shell.run("js "..token.." lib/shell.js")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement