chand1012

ccdownload

Aug 14th, 2019
21
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print("Enter url to download from:")
  2. local url = read()
  3. print("Enter filename to save to:")
  4. local name = read()
  5. print("Downloading...")
  6. local request, err = http.get(url)
  7. local contents = request.readAll()
  8. request.close()
  9. print("Saving to file...")
  10. local file = fs.open(name, "w")
  11. file.write(contents)
  12. file.close()
  13. print("Done.")
RAW Paste Data