SHARE
TWEET

scan.lua

a guest Jun 12th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.execute("clear")
  2. print("AdvComScanner v1.0.0 by 3Rr0rExE404\n")
  3. c = require("component")
  4. t = require("term")
  5. file = io.open("out.scan", "w")
  6.  
  7. list = {}
  8. i = 1
  9. for addr,com in c.list() do
  10.   list[i] = addr
  11.   print(i..")".."  "..addr.."   "..com)
  12.   file:write(i..")".."  "..addr.."   "..com.."\n")
  13.   i = i + 1
  14. end
  15.  
  16. print("\nSelect device.")
  17. read = t.read()
  18.  
  19. os.execute("clear")
  20.  
  21. dev = c.proxy(list[tonumber(read)])
  22. print("Selected: "..list[tonumber(read)])
  23.  
  24. funcs = {}
  25. i = 1
  26. for func in pairs(dev) do
  27.   funcs[i] = func
  28.   print(func)
  29.   file:write(func.."\n")
  30.   i = i + 1
  31. end
  32.  
  33. file:close()
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