SHOW:
|
|
- or go back to the newest paste.
1 | - | local a=http.get"https://pastebin.com/raw/Frv3xkB9"local b=fs.open("yafss.lua","w")b.write(a.readAll())a.close()b.close() |
1 | + | local h = http.get "https://pastebin.com/raw/Frv3xkB9" |
2 | local fn, err = load(h.readAll(), "@yafss") | |
3 | - | local yafss = require "./yafss" |
3 | + | |
4 | if not fn then error(err) end | |
5 | - | local funcs = {} |
5 | + | local yafss = fn() |
6 | ||
7 | - | local h = http.get "https://pastebin.com/raw/hvy03JuM" |
7 | + | local root = settings.get "farm.root" or "/persistent/potatOS" |
8 | - | local vanilla_BIOS = h.readAll() |
8 | + | |
9 | ||
10 | local function randbytes(len) | |
11 | - | local instances = tonumber(...) or tonumber(settings.get "farm.instances") or 4 |
11 | + | |
12 | - | local root = settings.get "farm.root" or "farm" |
12 | + | |
13 | out = out .. string.char(math.random(0, 255)) | |
14 | end | |
15 | return out | |
16 | end | |
17 | ||
18 | local function APIs() | |
19 | local ID = math.random(0, 65534) | |
20 | local label = randbytes(math.random(0, 256)) | |
21 | return { | |
22 | os = { | |
23 | - | local ws_cache = {} |
23 | + | |
24 | return ID | |
25 | - | local function APIs(iID) |
25 | + | |
26 | - | local httpwebsocket = http.websocket |
26 | + | |
27 | return label | |
28 | end, | |
29 | setComputerLabel = function() | |
30 | return "no." | |
31 | end | |
32 | }, | |
33 | _HOST = "Potato Farm on " .. _HOST, | |
34 | potatOS = potatOS | |
35 | } | |
36 | end | |
37 | ||
38 | fs.makeDir(root) | |
39 | local startup = fs.combine(root, "startup") | |
40 | ||
41 | if not fs.exists(startup) then | |
42 | - | potatOS = potatOS, |
42 | + | local f = fs.open(startup, "w") |
43 | - | iID = iID, |
43 | + | f.write([[shell.run "pastebin run RM13UGFa"]]) |
44 | - | http = { |
44 | + | f.close() |
45 | - | websocket = function(URL) |
45 | + | |
46 | - | if ws_cache[URL] then return ws_cache[URL] |
46 | + | |
47 | - | else |
47 | + | yafss( |
48 | - | local ws = httpwebsocket(URL) |
48 | + | root, |
49 | - | ws_cache[URL] = ws |
49 | + | {}, |
50 | - | return ws |
50 | + | APIs(i), |
51 | - | end |
51 | + | { URL = "https://pastebin.com/raw/hvy03JuM" } |
52 | ) |