CONFIG = "./config.txt" URL = "" FILENAME = "" if fs.exists(CONFIG) then local file = fs.open(CONFIG, "r") URL = file.readLine() FILENAME = file.readLine() else local file = fs.open(CONFIG, "w") file.write("URL\nFILENAME") file.close() print("[!] Please edit config.txt") return end if URL == "" or FILENAME == "" then print("[!] Empty url/filename") return end local res, error = http.checkURL(URL) if res then local gist = http.get(URL) local data = gist.readAll() gist.close() local size = 0 if fs.exists(FILENAME) then size = fs.getSize(FILENAME) end local file = fs.open(FILENAME, "w") file.write(data) file.close() local new_size = fs.getSize(FILENAME) local diff = new_size - size if diff < 0 then print("[-] " .. math.abs(diff) .. " bytes removed") elseif diff > 0 then print("[+] " .. diff .. " bytes added") else print("[?] no change in size") end else print("[!] Url error: " .. error) end