Creeper9207

wget

Feb 17th, 2015
2,971
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.50 KB | None | 0 0
  1. --Creeper9207 Code: wget substitute--
  2. os.unloadAPI("/.wget/wgetAPI")
  3. os.loadAPI("/.wget/wgetAPI")
  4. run = 1
  5. if fs.exists("/.wget/wgetAPI") then
  6. else
  7.   shell.run("mkdir /.wget")
  8.   print("Installing wget alternative by Creeper9207...")
  9.   sleep(1)
  10.   shell.run("pastebin get T9X1D1He /wgetAPI")
  11.   shell.run("pastebin get T9X1D1He /.wget/wgetAPI")
  12.   shell.run("pastebin get h8H1wF3W /.wget/background")
  13.   shell.run("pastebin get gjNxRVCa /.wget/gui1")
  14.   run = 0
  15.   wgetAPI.screenClear()
  16.   print("wget alternative by Creeper9207 installed!")
  17.   print("Run wget gui now? Y/n")
  18.   print("")
  19.   RunNow = io.read()
  20.   if RunNow == "Y" then
  21.     shell.run("wget gui")
  22.   elseif RunNow == "y" then
  23.     shell.run("wget gui")
  24.   else
  25.     clearIt()
  26.   end
  27. end
  28. arg = { ... }
  29. function decider()
  30.   if arg[1] == "download" then
  31.     if arg[3] then
  32.       wgetAPI.downloadFile(arg[2], arg[3])
  33.     else
  34.       print("requires more arguments!")
  35.     end
  36.   elseif arg[1] == "gui" then
  37.     wgetAPI.openGUI()
  38.   elseif arg[1] == "update" then
  39.     shell.run("pastebin run NhqivYH6")
  40.     wgetAPI.screenClear()
  41.     print("updated")
  42.   elseif arg[1] == "apihelp" then
  43.     print("api name: 'wget'")
  44.     print("functions:")
  45.     print("silentDownload(string url, string filename)")
  46.     print("download(string url, string filename")
  47.     print("openGUI()")
  48.     print("screenClear()")
  49.     print("update()")
  50.   else
  51.     print("usage: wget <download/gui/update/apihelp> [url] [file name]")
  52.   end
  53. end
  54. if run == 1 then
  55.     decider()
  56. end
Advertisement
Add Comment
Please, Sign In to add comment