Advertisement
sshtshtshtshts

Untitled

Jun 24th, 2025 (edited)
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 22.88 KB | None | 0 0
  1. -- ComputerCraft Spy Base Installer
  2. -- Run this with: pastebin run <code>
  3.  
  4. print("=== SUPER SECRET SPY INSTALLATION ===")
  5. print("Setting up covert surveillance...")
  6. print()
  7.  
  8. -- Get friend's name
  9. print("Which friend's base are we spying on?")
  10. print("Examples: owlus, steve, alex, etc.")
  11. write("Friend's name: ")
  12. local friendName = read()
  13.  
  14. if friendName == "" then
  15.     print("ERROR: Need a friend name for the spy operation!")
  16.     return
  17. end
  18.  
  19. print()
  20. print("Scanning for inventory to monitor...")
  21.  
  22. -- Get all connected peripherals
  23. local allPeripherals = peripheral.getNames()
  24. local inventoryPeripherals = {}
  25.  
  26. print("DEBUG: Found " .. #allPeripherals .. " peripheral(s):")
  27.  
  28. -- Standard inventory types to look for
  29. local inventoryTypes = {
  30.     "inventory",
  31.     "minecraft:chest",
  32.     "minecraft:barrel",
  33.     "minecraft:shulker_box",
  34.     "minecraft:hopper",
  35.     "minecraft:furnace",
  36.     "minecraft:blast_furnace",
  37.     "minecraft:smoker"
  38. }
  39.  
  40. -- Check each peripheral
  41. for _, name in pairs(allPeripherals) do
  42.     local types = {peripheral.getType(name)}
  43.     local typeStr = table.concat(types, ", ")
  44.     print("  " .. name .. ": " .. typeStr)
  45.    
  46.     local isInventory = false
  47.     local confidence = 0
  48.     local reason = ""
  49.    
  50.     -- Check if it has known inventory types
  51.     for _, invType in pairs(inventoryTypes) do
  52.         if peripheral.hasType(name, invType) then
  53.             isInventory = true
  54.             confidence = confidence + 50
  55.             reason = reason .. invType .. " type; "
  56.             break
  57.         end
  58.     end
  59.    
  60.     -- Check for inventory-like methods
  61.     local methods = peripheral.getMethods(name)
  62.     local inventoryMethods = {
  63.         "list", "size", "getItemDetail", "pushItems", "pullItems",
  64.         "getItems", "getAllItems", "getStackInSlot", "getItem"
  65.     }
  66.    
  67.     local foundMethods = {}
  68.     for _, method in pairs(methods) do
  69.         for _, invMethod in pairs(inventoryMethods) do
  70.             if method == invMethod then
  71.                 table.insert(foundMethods, method)
  72.                 confidence = confidence + 10
  73.                 isInventory = true
  74.             end
  75.         end
  76.     end
  77.    
  78.     if #foundMethods > 0 then
  79.         reason = reason .. "methods: " .. table.concat(foundMethods, ", ")
  80.     end
  81.    
  82.     if isInventory then
  83.         table.insert(inventoryPeripherals, {
  84.             name = name,
  85.             types = types,
  86.             confidence = confidence,
  87.             reason = reason,
  88.             methods = foundMethods
  89.         })
  90.         print("    -> INVENTORY DETECTED (confidence: " .. confidence .. "%) - " .. reason)
  91.     end
  92. end
  93.  
  94. -- Use peripheral.find to also search for standard inventory types
  95. print()
  96. print("Using peripheral.find for additional detection...")
  97. for _, invType in pairs(inventoryTypes) do
  98.     local found = {peripheral.find(invType)}
  99.     for _, wrapped in pairs(found) do
  100.         local name = peripheral.getName(wrapped)
  101.         local alreadyFound = false
  102.        
  103.         for _, existing in pairs(inventoryPeripherals) do
  104.             if existing.name == name then
  105.                 alreadyFound = true
  106.                 existing.confidence = existing.confidence + 25
  107.                 existing.reason = existing.reason .. "peripheral.find(" .. invType .. "); "
  108.                 break
  109.             end
  110.         end
  111.        
  112.         if not alreadyFound then
  113.             table.insert(inventoryPeripherals, {
  114.                 name = name,
  115.                 types = {peripheral.getType(name)},
  116.                 confidence = 75,
  117.                 reason = "peripheral.find(" .. invType .. ")",
  118.                 methods = peripheral.getMethods(name)
  119.             })
  120.             print("  Found additional " .. invType .. " at " .. name)
  121.         end
  122.     end
  123. end
  124.  
  125. -- Sort by confidence and select best option
  126. table.sort(inventoryPeripherals, function(a, b) return a.confidence > b.confidence end)
  127.  
  128. local inventorySide = nil
  129. if #inventoryPeripherals > 0 then
  130.     print()
  131.     print("Inventory peripherals found (sorted by confidence):")
  132.     for i, inv in pairs(inventoryPeripherals) do
  133.         print("  " .. i .. ". " .. inv.name .. " (" .. inv.confidence .. "%) - " .. inv.reason)
  134.     end
  135.    
  136.     -- Auto-select the highest confidence one
  137.     inventorySide = inventoryPeripherals[1].name
  138.     print()
  139.     print("Auto-selected: " .. inventorySide .. " (confidence: " .. inventoryPeripherals[1].confidence .. "%)")
  140.    
  141.     -- Give user option to override
  142.     if #inventoryPeripherals > 1 then
  143.         print("Use this inventory? Or enter number to choose different one:")
  144.         print("Press Enter for auto-selection, or type 1-" .. #inventoryPeripherals .. " to choose:")
  145.         write("> ")
  146.         local choice = read()
  147.        
  148.         if choice ~= "" then
  149.             local choiceNum = tonumber(choice)
  150.             if choiceNum and choiceNum >= 1 and choiceNum <= #inventoryPeripherals then
  151.                 inventorySide = inventoryPeripherals[choiceNum].name
  152.                 print("Selected: " .. inventorySide)
  153.             else
  154.                 print("Invalid choice, using auto-selection: " .. inventorySide)
  155.             end
  156.         end
  157.     end
  158. else
  159.     print()
  160.     print("ERROR: No inventory peripherals found!")
  161.     print("Available peripherals:")
  162.     for _, name in pairs(allPeripherals) do
  163.         local types = {peripheral.getType(name)}
  164.         print("  " .. name .. ": " .. table.concat(types, ", "))
  165.     end
  166.     print()
  167.     print("Manual override - which peripheral should I monitor?")
  168.     print("Enter peripheral name (or press Enter to quit):")
  169.     write("> ")
  170.     local manualChoice = read()
  171.    
  172.     if manualChoice ~= "" and peripheral.isPresent(manualChoice) then
  173.         inventorySide = manualChoice
  174.         print("Forcing monitor of: " .. inventorySide)
  175.     else
  176.         print("No valid peripheral selected. Exiting.")
  177.         return
  178.     end
  179. end
  180.  
  181. print("Will monitor inventory on: " .. inventorySide)
  182. print()
  183.  
  184. -- Check for disk drives for local logging
  185. print()
  186. print("Scanning for disk drives for local logging...")
  187. local diskSide = nil
  188. local diskPath = nil
  189.  
  190. -- Find disk drives using peripheral.find
  191. local diskDrives = {peripheral.find("drive")}
  192. if #diskDrives > 0 then
  193.     for _, drive in pairs(diskDrives) do
  194.         local driveName = peripheral.getName(drive)
  195.         print("Found disk drive: " .. driveName)
  196.        
  197.         if disk.isPresent(driveName) then
  198.             if disk.hasData(driveName) then
  199.                 diskSide = driveName
  200.                 diskPath = disk.getMountPath(driveName)
  201.                 print("  Disk mounted at: " .. diskPath)
  202.                 break
  203.             else
  204.                 print("  Disk present but no data (music disk?)")
  205.             end
  206.         else
  207.             print("  Drive empty - insert a floppy disk for local logging")
  208.         end
  209.     end
  210. else
  211.     -- Fallback: check all peripherals for drive type
  212.     for _, name in pairs(allPeripherals) do
  213.         if peripheral.hasType(name, "drive") then
  214.             print("Found disk drive: " .. name)
  215.             if disk.isPresent(name) then
  216.                 if disk.hasData(name) then
  217.                     diskSide = name
  218.                     diskPath = disk.getMountPath(name)
  219.                     print("  Disk mounted at: " .. diskPath)
  220.                     break
  221.                 else
  222.                     print("  Disk present but no data (music disk?)")
  223.                 end
  224.             else
  225.                 print("  Drive empty - insert a floppy disk for local logging")
  226.             end
  227.         end
  228.     end
  229. end
  230.  
  231. if diskSide then
  232.     print("Local logging will be saved to disk: " .. diskPath)
  233.    
  234.     -- Set up disk label for our spy operation
  235.     local currentLabel = disk.getLabel(diskSide)
  236.     if not currentLabel or currentLabel == "" then
  237.         disk.setLabel(diskSide, "System_Logs")
  238.         print("Labeled disk as: System_Logs")
  239.     end
  240. else
  241.     print("No disk found - logs will only be sent to server")
  242. end
  243.  
  244. print()
  245.  
  246. -- Create the spy program
  247. local spyProgram = [[-- Inventory Spy for ]] .. friendName .. [['s base
  248. -- Auto-generated covert surveillance program
  249.  
  250. local API_URL = "https://spy.astr.to/]] .. friendName .. [[/items"
  251. local UPDATE_INTERVAL = 60 -- seconds
  252. local INVENTORY_SIDE = "]] .. inventorySide .. [["
  253. local DISK_SIDE = ]] .. (diskSide and '"' .. diskSide .. '"' or "nil") .. [[
  254.  
  255. local DISK_PATH = ]] .. (diskPath and '"' .. diskPath .. '"' or "nil") .. [[
  256.  
  257. local MAX_LOG_FILES = 10
  258. local MAX_LOG_SIZE = 5000 -- lines
  259.  
  260. -- Initialize logging
  261. local function initializeLogging()
  262.     if DISK_PATH then
  263.         -- Create log directory structure
  264.         if not fs.exists(DISK_PATH .. "/spy_logs") then
  265.             fs.makeDir(DISK_PATH .. "/spy_logs")
  266.         end
  267.         if not fs.exists(DISK_PATH .. "/spy_logs/data") then
  268.             fs.makeDir(DISK_PATH .. "/spy_logs/data")
  269.         end
  270.        
  271.         -- Create config file if it doesn't exist
  272.         local configPath = DISK_PATH .. "/spy_logs/config.txt"
  273.         if not fs.exists(configPath) then
  274.             local config = fs.open(configPath, "w")
  275.             config.writeLine("Spy Operation Configuration")
  276.             config.writeLine("Target: ]] .. friendName .. [[")
  277.             config.writeLine("Computer ID: " .. os.getComputerID())
  278.             config.writeLine("Inventory Side: " .. INVENTORY_SIDE)
  279.             config.writeLine("Started: " .. os.date("%Y-%m-%d %H:%M:%S"))
  280.             config.close()
  281.         end
  282.     end
  283. end
  284.  
  285. -- Rotate log files if they get too big
  286. local function rotateLogFiles()
  287.     if not DISK_PATH then return end
  288.    
  289.     local logPath = DISK_PATH .. "/spy_logs/spy.log"
  290.     if fs.exists(logPath) then
  291.         local file = fs.open(logPath, "r")
  292.         local lines = 0
  293.         if file then
  294.             while file.readLine() do
  295.                 lines = lines + 1
  296.             end
  297.             file.close()
  298.         end
  299.        
  300.         if lines > MAX_LOG_SIZE then
  301.             -- Move current log to backup
  302.             local timestamp = os.date("%Y%m%d_%H%M%S")
  303.             local backupPath = DISK_PATH .. "/spy_logs/spy_" .. timestamp .. ".log"
  304.             fs.move(logPath, backupPath)
  305.            
  306.             -- Clean up old log files
  307.             local logDir = DISK_PATH .. "/spy_logs"
  308.             local files = fs.list(logDir)
  309.             local logFiles = {}
  310.             for _, file in pairs(files) do
  311.                 if string.find(file, "spy_") and string.find(file, ".log") then
  312.                     table.insert(logFiles, file)
  313.                 end
  314.             end
  315.            
  316.             -- Sort and keep only recent files
  317.             table.sort(logFiles)
  318.             while #logFiles > MAX_LOG_FILES do
  319.                 fs.delete(logDir .. "/" .. logFiles[1])
  320.                 table.remove(logFiles, 1)
  321.             end
  322.         end
  323.     end
  324. end
  325.  
  326. -- Write to local log file
  327. local function writeToLocalLog(message, data)
  328.     if not DISK_PATH then return end
  329.    
  330.     rotateLogFiles()
  331.    
  332.     local logPath = DISK_PATH .. "/spy_logs/spy.log"
  333.     local file = fs.open(logPath, "a")
  334.     if file then
  335.         local timestamp = os.date("%Y-%m-%d %H:%M:%S")
  336.         file.writeLine("[" .. timestamp .. "] " .. message)
  337.         if data then
  338.             file.writeLine("DATA: " .. textutils.serializeJSON(data))
  339.         end
  340.         file.close()
  341.     end
  342.    
  343.     -- Also save raw data
  344.     if data then
  345.         local dataPath = DISK_PATH .. "/spy_logs/data/data_" .. os.epoch("utc") .. ".json"
  346.         local dataFile = fs.open(dataPath, "w")
  347.         if dataFile then
  348.             dataFile.write(textutils.serializeJSON(data))
  349.             dataFile.close()
  350.         end
  351.     end
  352. end
  353.  
  354. -- Enhanced logging function
  355. local function log(message, data, level)
  356.     level = level or "INFO"
  357.     local timestamp = os.date("%Y-%m-%d %H:%M:%S")
  358.     local logMessage = "[" .. level .. "] " .. message
  359.    
  360.     -- Console output
  361.     print("[" .. timestamp .. "] " .. logMessage)
  362.    
  363.     -- Local disk logging
  364.     writeToLocalLog(logMessage, data)
  365. end
  366.  
  367. -- Get disk space info
  368. local function getDiskInfo()
  369.     if not DISK_PATH then return "No disk" end
  370.    
  371.     local freeSpace = fs.getFreeSpace(DISK_PATH)
  372.     local used = "unknown"
  373.     if freeSpace then
  374.         if freeSpace < 1024 then
  375.             return freeSpace .. "B free"
  376.         elseif freeSpace < 1024 * 1024 then
  377.             return math.floor(freeSpace / 1024) .. "KB free"
  378.         else
  379.             return math.floor(freeSpace / (1024 * 1024)) .. "MB free"
  380.         end
  381.     end
  382.     return "Disk info unavailable"
  383. end
  384.  
  385. -- Function to get inventory data
  386. local function getInventoryData()
  387.     if not peripheral.isPresent(INVENTORY_SIDE) then
  388.         return nil, "No peripheral found: " .. INVENTORY_SIDE
  389.     end
  390.    
  391.     local inventory = peripheral.wrap(INVENTORY_SIDE)
  392.     if not inventory then
  393.         return nil, "Failed to wrap peripheral: " .. INVENTORY_SIDE
  394.     end
  395.    
  396.     local items = {}
  397.     local size = 0
  398.     local accessMethod = "unknown"
  399.    
  400.     -- Try different inventory access methods
  401.     if inventory.list and inventory.size then
  402.         -- Standard CC inventory (chests, etc.)
  403.         items = inventory.list()
  404.         size = inventory.size()
  405.         accessMethod = "standard"
  406.     elseif inventory.getItems then
  407.         -- Tom's Storage style
  408.         local tomItems = inventory.getItems()
  409.         if tomItems then
  410.             size = #tomItems
  411.             for i, item in ipairs(tomItems) do
  412.                 if item then
  413.                     items[i] = {
  414.                         name = item.name or item.id,
  415.                         count = item.count or item.amount or 1,
  416.                         nbt = item.nbt
  417.                     }
  418.                 end
  419.             end
  420.             accessMethod = "tom_storage_getItems"
  421.         end
  422.     elseif inventory.getAllItems then
  423.         -- Alternative Tom's Storage method
  424.         local allItems = inventory.getAllItems()
  425.         if type(allItems) == "table" then
  426.             size = #allItems
  427.             for i, item in ipairs(allItems) do
  428.                 if item then
  429.                     items[i] = {
  430.                         name = item.name or item.id,
  431.                         count = item.count or item.amount or 1,
  432.                         nbt = item.nbt
  433.                     }
  434.                 end
  435.             end
  436.             accessMethod = "tom_storage_getAllItems"
  437.         end
  438.     else
  439.         -- Try to get size through various methods
  440.         local methods = peripheral.getMethods(INVENTORY_SIDE)
  441.         for _, method in pairs(methods) do
  442.             if method == "size" or method == "getSize" then
  443.                 local success, result = pcall(inventory[method])
  444.                 if success and type(result) == "number" then
  445.                     size = result
  446.                     break
  447.                 end
  448.             end
  449.         end
  450.        
  451.         -- Try to get items by slot scanning
  452.         if size > 0 then
  453.             for slot = 1, math.min(size, 200) do -- Limit to 200 to prevent infinite loops
  454.                 local item = nil
  455.                 if inventory.getStackInSlot then
  456.                     local success, result = pcall(inventory.getStackInSlot, slot)
  457.                     if success then item = result end
  458.                 elseif inventory.getItem then
  459.                     local success, result = pcall(inventory.getItem, slot)
  460.                     if success then item = result end
  461.                 elseif inventory.getItemDetail then
  462.                     local success, result = pcall(inventory.getItemDetail, slot)
  463.                     if success then item = result end
  464.                 end
  465.                
  466.                 if item and (item.name or item.id) then
  467.                     items[slot] = {
  468.                         name = item.name or item.id,
  469.                         count = item.count or item.amount or item.size or 1,
  470.                         nbt = item.nbt
  471.                     }
  472.                 end
  473.             end
  474.             accessMethod = "slot_scanning"
  475.         end
  476.     end
  477.    
  478.     -- Get peripheral type info for debugging
  479.     local peripheralTypes = {peripheral.getType(INVENTORY_SIDE)}
  480.    
  481.     -- Build data structure
  482.     local data = {
  483.         timestamp = os.epoch("utc"),
  484.         computer_id = os.getComputerID(),
  485.         target = "]] .. friendName .. [[",
  486.         inventory_side = INVENTORY_SIDE,
  487.         inventory_size = size,
  488.         access_method = accessMethod,
  489.         peripheral_types = peripheralTypes,
  490.         items = {}
  491.     }
  492.    
  493.     -- Convert items to array format
  494.     for slot, item in pairs(items) do
  495.         table.insert(data.items, {
  496.             slot = slot,
  497.             name = item.name,
  498.             count = item.count,
  499.             nbt = item.nbt
  500.         })
  501.     end
  502.    
  503.     return data
  504. end
  505.  
  506. -- Function to send data to API
  507. local function sendData(data)
  508.     local jsonData = textutils.serializeJSON(data)
  509.    
  510.     local response, err = http.post(API_URL, jsonData, {
  511.         ["Content-Type"] = "application/json"
  512.     })
  513.    
  514.     if response then
  515.         local status = response.getResponseCode()
  516.         local body = response.readAll()
  517.         response.close()
  518.        
  519.         if status == 200 or status == 201 then
  520.             return true, "Data sent successfully"
  521.         else
  522.             return false, "HTTP " .. status .. ": " .. body
  523.         end
  524.     else
  525.         return false, "HTTP request failed: " .. (err or "unknown error")
  526.     end
  527. end
  528.  
  529. -- Function to log messages with timestamp
  530. local function log(message, data, level)
  531.     level = level or "INFO"
  532.     local timestamp = os.date("%Y-%m-%d %H:%M:%S")
  533.     local logMessage = "[" .. level .. "] " .. message
  534.    
  535.     -- Console output
  536.     print("[" .. timestamp .. "] " .. logMessage)
  537.    
  538.     -- Local disk logging
  539.     writeToLocalLog(logMessage, data)
  540. end
  541.  
  542. -- Main monitoring loop
  543. local function monitorInventory()
  544.     -- Initialize logging system
  545.     initializeLogging()
  546.    
  547.     log("=== SPY OPERATION INITIATED ===")
  548.     log("Target: ]] .. friendName .. [[")
  549.     log("Computer ID: " .. os.getComputerID())
  550.     log("Monitoring: " .. INVENTORY_SIDE)
  551.     log("Peripheral types: " .. table.concat({peripheral.getType(INVENTORY_SIDE)}, ", "))
  552.     log("Reporting to: " .. API_URL)
  553.     log("Update interval: " .. UPDATE_INTERVAL .. " seconds")
  554.     log("Local storage: " .. getDiskInfo())
  555.     log("=== COVERT MODE ENGAGED ===")
  556.    
  557.     local scanCount = 0
  558.     local lastAccessMethod = nil
  559.    
  560.     while true do
  561.         scanCount = scanCount + 1
  562.         local data, err = getInventoryData()
  563.        
  564.         if data then
  565.             local itemCount = #data.items
  566.             local statusMsg = "Scan #" .. scanCount .. " - "
  567.            
  568.             -- Log access method changes
  569.             if data.access_method ~= lastAccessMethod then
  570.                 log("Inventory access method: " .. data.access_method, nil, "SYS")
  571.                 lastAccessMethod = data.access_method
  572.             end
  573.            
  574.             if itemCount > 0 then
  575.                 statusMsg = statusMsg .. itemCount .. " items detected"
  576.                 log(statusMsg, data, "SCAN")
  577.             else
  578.                 statusMsg = statusMsg .. "inventory empty"
  579.                 log(statusMsg, data, "SCAN")
  580.             end
  581.            
  582.             local success, result = sendData(data)
  583.             if success then
  584.                 log("Data transmitted successfully", nil, "NET")
  585.             else
  586.                 log("Transmission failed: " .. result, data, "ERROR")
  587.             end
  588.         else
  589.             log("Inventory scan failed: " .. err, nil, "ERROR")
  590.         end
  591.        
  592.         -- Log disk space periodically
  593.         if scanCount % 10 == 0 then
  594.             log("Disk status: " .. getDiskInfo(), nil, "SYS")
  595.         end
  596.        
  597.         -- Wait for next update
  598.         sleep(UPDATE_INTERVAL)
  599.     end
  600. end
  601.  
  602. -- Error handling wrapper
  603. local function safeRun()
  604.     local success, err = pcall(monitorInventory)
  605.     if not success then
  606.         log("CRITICAL SYSTEM FAILURE: " .. err, nil, "CRASH")
  607.         log("Attempting automatic recovery in 10 seconds...", nil, "SYS")
  608.         sleep(10)
  609.         -- Restart the program
  610.         os.reboot()
  611.     end
  612. end
  613.  
  614. -- Hide our tracks - clear screen after 5 seconds
  615. local function startSpy()
  616.     safeRun()
  617. end
  618.  
  619. -- Give user time to see the startup, then go covert
  620. parallel.waitForAny(
  621.     function()
  622.         sleep(5)
  623.         term.clear()
  624.         term.setCursorPos(1, 1)
  625.         print("Normal computer operations...")
  626.         print("Nothing suspicious here...")
  627.         print()
  628.     end,
  629.     startSpy
  630. )]]
  631.  
  632. -- Save the spy program
  633. local file = fs.open("startup.lua", "w")
  634. if file then
  635.     file.write(spyProgram)
  636.     file.close()
  637.     print("[SUCCESS] Spy program installed as startup.lua")
  638. else
  639.     print("[ERROR] Failed to write startup.lua")
  640.     return
  641. end
  642.  
  643. print()
  644. print("=== INSTALLATION COMPLETE ===")
  645. print("Target: " .. friendName)
  646. print("Monitoring: " .. inventorySide)
  647.  
  648. -- Show peripheral details
  649. local invTypes = {peripheral.getType(inventorySide)}
  650. print("Peripheral type(s): " .. table.concat(invTypes, ", "))
  651.  
  652. -- Show detection confidence if available
  653. for _, inv in pairs(inventoryPeripherals) do
  654.     if inv.name == inventorySide then
  655.         print("Detection confidence: " .. inv.confidence .. "%")
  656.         print("Detection reason: " .. inv.reason)
  657.         break
  658.     end
  659. end
  660.  
  661. print("API Endpoint: https://spy.astr.to/api/" .. friendName .. "/items")
  662. if diskSide then
  663.     print("Local Logging: " .. diskPath .. "/spy_logs/")
  664.     print("Disk Drive: " .. diskSide)
  665.     print("Disk Space: " .. (fs.getFreeSpace(diskPath) or "unknown") .. " bytes free")
  666. else
  667.     print("Local Logging: DISABLED (no disk)")
  668. end
  669. print()
  670. print("Features enabled:")
  671. print("- Automatic peripheral detection")
  672. print("- Multi-method inventory access")
  673. print("- Real-time inventory monitoring")
  674. print("- Automatic data transmission")
  675. print("- Error recovery and auto-restart")
  676. if diskSide then
  677.     print("- Local data logging and backup")
  678.     print("- Log rotation and space management")
  679.     print("- Structured data archival")
  680. end
  681. print("- Stealth mode (hides after 5 seconds)")
  682. print()
  683. print("The spy program will start automatically on reboot.")
  684. print("After 5 seconds, it will hide and look like a normal computer.")
  685. if diskSide then
  686.     print("Check '" .. diskPath .. "/spy_logs/' for local surveillance data.")
  687. end
  688. print()
  689. print("Reboot now to start spying? (y/n)")
  690. write("> ")
  691. local answer = read()
  692.  
  693. if answer:lower() == "y" or answer:lower() == "yes" then
  694.     print()
  695.     print("Initiating covert operations...")
  696.     if diskSide then
  697.         print("Preparing local surveillance logs...")
  698.     end
  699.     sleep(1)
  700.     os.reboot()
  701. else
  702.     print()
  703.     print("Spy program ready. Run 'reboot' when you want to start.")
  704.     if diskSide then
  705.         print("Logs will be saved to: " .. diskPath .. "/spy_logs/")
  706.     end
  707.     print("Remember: Act casual around " .. friendName .. "!")
  708. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement