Advertisement
Joroppo

install ssh for a pc

Oct 22nd, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. if fs.exists("ssh") == true then
  2.   shell.run("rm ssh")
  3. end
  4. if fs.exists("dns") == true then
  5.   shell.run("rm dns")
  6. end
  7. if fs.exists("open") == true then
  8.   shell.run("rm open")
  9. end
  10. if fs.exists("close") == true then
  11.   shell.run("rm close")
  12. end
  13. shell.run("pastebin get FnBb0vFE ssh")
  14. shell.run("pastebin get ZuDbvKXA dns")
  15. shell.run("pastebin get bqDQPkGx open")
  16. shell.run("pastebin get 77hUjE85 close")
  17. print("Sûr quel face est le wireless ?")
  18. con = read()
  19. print("Nom du pc ?")
  20. local name = read()
  21. rednet.open(con)
  22. shell.run("dns register "..name)
  23. rednet.close(con)
  24. shell.run("label set "..name)
  25. print(name.." id : "..os.getComputerID())
  26. if fs.exists("startup") == true then
  27.   shell.run("rm startup")
  28. end
  29. f = fs.open("startup", "w")
  30. f.writeLine('rednet.open("'..con..'")')
  31. f.close()
  32. print("reboot dans 10 s")
  33. sleep(10)
  34. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement