Advertisement
LDDestroier

STD Website List

Sep 24th, 2015
4,481
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.92 KB | None | 0 0
  1. --[[
  2. This paste stores all the store codes and website codes for Super Text Downloader (STD).
  3. Contract your STD with:
  4.  pastebin get 3PBKGR4k std
  5.  pastebin get P9dDhQ2m stdgui
  6. --]]
  7.  
  8. local latestVersion = 1.451 --Latest version of STD. Number, not string!
  9.  
  10. if not std then std = {} end
  11.  
  12. std.websiteSyntaxes = { --List of websites used with STD.
  13.     pb = {
  14.         url = "http://pastebin.com/raw.php?i=FILECODE", --Download URL (With FILECODE gsub'd with the file ID)
  15.         fullName = "Pastebin",                          --Full name of the download host
  16.         codeLength = 8,                                 --Expected amount of characters in file ID (0 if not standard length)
  17.     },
  18.     hb = {
  19.         url = "http://hastebin.com/raw/FILECODE",
  20.         fullName = "Hastebin",
  21.         codeLength = 10,
  22.     },
  23.     pe = {
  24.         url = "http://pastie.org/pastes/FILECODE/download",
  25.         fullName = "Pastie",
  26.         codeLength = 0,
  27.     },
  28.     fn = {
  29.         url = "https://fnpaste.com/FILECODE/raw",
  30.         fullName = "fnPaste",
  31.         codeLength = 4,
  32.     },
  33.     gh = {
  34.         url = "https://raw.githubusercontent.com/FILECODE",
  35.         fullName = "Github",
  36.         codeLength = 0,
  37.     },
  38.     gg = {
  39.         url = "https://gist.githubusercontent.com/FILECODE/raw/",
  40.         fullName = "Github Gist",
  41.         codeLength = 0,
  42.     },
  43.     sn = {
  44.         url = "http://s.drk.sc/FILECODE",
  45.         fullName = "Snippt",
  46.         codeLength = 6,
  47.     },
  48.     cp = {
  49.         url = "http://codepad.org/FILECODE/raw.txt",
  50.         fullName = "Codepad",
  51.         codeLength = 8,
  52.     },
  53.     id = {
  54.         url = "http://ideone.com/plain/FILECODE",
  55.         fullName = "Ideone",
  56.         codeLength = 6,
  57.     },
  58.     db = {
  59.         url = "https://www.dropbox.com/s/FILECODE?raw=true",
  60.         fullName = "Dropbox",
  61.         codeLength = 0,
  62.     },
  63.     dd = {
  64.         url = "FILECODE",
  65.         fullName = "Direct Download",
  66.         codeLength = 0,
  67.     },
  68.     ts = {
  69.         url = "http://turtlescripts.com/downloadScript.php?id=FILECODE",
  70.         fullName = "TurtleScripts",
  71.         codeLength = 6,
  72.     },
  73.     PB = {
  74.         url = "",
  75.         fullName = "Pastebin (safe)",
  76.         codeLength = 8,
  77.     },
  78. }
  79.  
  80. local bug = [[
  81.       ,_      _,
  82.         '.__.'
  83.    '-,   (__)   ,-'
  84.      '._ .::. _.'
  85.        _'(^^)'_
  86.     _,` `>\/<` `,_
  87.    `  ,-` )( `-,  `
  88.       |  /==\  |
  89.     ,-'  |=-|  '-,
  90.          )-=(
  91.          \__/
  92. ]]
  93.  
  94. if std.serious == false and math.random(1,64) == 1 then
  95.     if term.isColor() then term.setTextColor(colors.red) end
  96.     print(bug)
  97.     term.setTextColor(colors.black)
  98.     print("oh nooes!! it a bug!!! kill eet")
  99.     sleep(3)
  100. end
  101.  
  102. local function updateSTD()
  103.     local path = std_file
  104.     if not path then
  105.         path = fs.combine(shell.dir(),"std")
  106.     end
  107.     if fs.isReadOnly(path) then
  108.         print("STD v"..latestVersion.." is out.")
  109.         return false
  110.     else
  111.         print("Updating STD to "..latestVersion.."...")
  112.     end
  113.     local program = http.get("http://pastebin.com/raw/3PBKGR4k")
  114.     if not program then
  115.         error("Unable to download!")
  116.     end
  117.     local file = fs.open(path,"w")
  118.     file.writeLine(program.readAll())
  119.     file.close()
  120.     print("Updated.")
  121.     error()
  122. end
  123.  
  124. if not std.std_version then
  125.     updateSTD()
  126. else
  127.     if std.std_version < latestVersion then
  128.         updateSTD()
  129.     end
  130. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement