Advertisement
osmarks

Insecure Sign Controller

Sep 1st, 2019
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local modem = peripheral.find "modem"
  2.  
  3. local function send_raw(text)
  4.     modem.transmit(124, 124, text)
  5. end
  6.  
  7. local function stupid_encode(text)
  8.     local first_byte = string.byte(text, 1)
  9.     local second_byte = string.byte(text, 2)
  10.     local checksum = string.char(first_byte + 2, second_byte - 1)
  11.     local to_send = checksum .. text
  12.     return to_send
  13. end
  14.  
  15. local function send(text)
  16.     send_raw(stupid_encode(text))
  17. end
  18.  
  19. local function randbytes(len)
  20.     local out = ""
  21.     for i = 1, len do
  22.         out = out .. string.char(math.random(1, 253))
  23.     end
  24.     return out
  25. end
  26.  
  27. local things = {"PotatOS", "YomatOS", "ChorOS", "ShutdownOS", "TomatOS", "BurritOS"}
  28.  
  29. while true do
  30.     for _, t in pairs(things) do
  31.         send(t)
  32.         sleep(0.2)
  33.     end
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement