Ledger Nano X - The secure hardware wallet
SHARE
TWEET

neuralReceive.lua

a guest Apr 3rd, 2020 214 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local modemSide = "top"
  2. local protocol = "neural_net"
  3. local timeout = 30
  4. local scriptPath = "tmp/"
  5.  
  6. local ni = peripheral.wrap("back")
  7. rednet.open(modemSide)
  8. rednet.host(protocol, ni.getName())
  9.  
  10. while true do
  11.     local senderId, msg, _ = rednet.receive(protocol, timeout)
  12.     local path = scriptPath .. msg.name
  13.     local file = fs.open(path, 'w')
  14.     file.write(msg.content)
  15.     file.close()
  16.     rednet.send(senderId, "Received", protocol)
  17.     shell.run(path)
  18. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top