Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LOGIN_URL = "https://i.exeter.ac.uk/selectProfile?return_url=%2Faek%2Fc%2Faekcb84e21d94e97ed9e"
- URL = "https://i.exeter.ac.uk/aek/c/aekcb84e21d94e97ed9e"
- function dump(o)
- if type(o) == 'table' then
- local s = '{ '
- for k,v in pairs(o) do
- if type(k) ~= 'number' then k = '"'..k..'"' end
- s = s .. '['..k..'] = ' .. dump(v) .. ','
- end
- return s .. '} '
- else
- return tostring(o)
- end
- end
- function main()
- write("Please enter username:")
- local user = read("*")
- write("Please enter password")
- local pass = read("*")
- local post_data = "ombl_service_username_180="..textutils.urlEncode(tostring(user)).."&".."ombl_service_password_180="..textutils.urlEncode(tostring(pass))
- http.post(LOGIN_URL, post_data)
- while true do
- data = http.get(URL)
- os.sleep(60*2)
- write(dump(data))
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement