asteroidsteam icon

Webbrowser

asteroidsteam | PRO | 02/18/17 04:05:57 AM UTC | 0 ⭐ | 654 👁️ | Never ⏰ | []
Lua |

1.07 KB

|

None

|

0 👍

/

0 👎

function pos(x,y)
term.setCursorPos(x,y)
end
pos(1,1)
term.setBackgroundColor(colors.yellow)
term.clear()
pos(1,1)
term.setBackgroundColor(colors.green)
term.clearLine()
pos(1,1)
print("Weblink:")
pos(10,1)
local link = read()
pos(1,2)
write("This program requires Admin priv. Type password or press E to exit. Press any other key to enter passcode")
local event2, key2 = os.pullEvent("key")
if key2 == keys.e then
dofile("os/Desktop")
else
local passcode = read("*")
local file = fs.open("/key", "r")
local data = file.readAll()
file.close()
if passcode == data then
pos(1,1)
term.clear()
if http.checkURL("http://pastebin.com/raw/"..link) == false then
dofile("/os/Desktop")
else
local data = http.get("http://pastebin.com/raw/"..link)
local dt = data.readAll()
local file = fs.open("/.tmp", "w")
file.write(dt)
file.close()
dofile("/.tmp")
fs.delete("/.tmp")
term.setBackgroundColor(colors.red)
print("PRESS E TO EXIT")
while true do
local event, key = os.pullEvent("key")
if key == keys.e then
dofile("os/Desktop")
break
end
end
end
end
end

Comments