Advertisement
Guest User

Untitled

a guest
Feb 15th, 2016
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. > import telnetlib import time
  2. >
  3. > def open_telnet_conn(): num = int(input("Tell me how many teams
  4. > need:"))
  5. >
  6. > if num< 1:
  7. > print("¡impossible!”) else:
  8. > listad = [] for i in range(num):
  9. > print("Enter the IP address:", str(i + 1) + ": ", end="")
  10. > directions= input()
  11. > listad += [directions] while True:
  12. > print("***** Menu *****")
  13. > print("1.- Run new file: ") if opcion == 1:
  14. > try:
  15. > username = '12345'
  16. > password = '12345'
  17. > TELNET_PORT = 23
  18. > TELNET_TIMEOUT = 5
  19. > READ_TIMEOUT = 5
  20. > for i in range(num):
  21. > print("Sequence for the device:", i)
  22. > cmd_file = raw_input("Type the path of the file and its extension ")
  23. > # Logging on the device
  24. > connection = telnetlib.Telnet(listad[i], TELNET_PORT, TELNET_TIMEOUT)
  25. > #
  26. >
  27. > except IOError:
  28. > print ("Error in input parameter! Review your information ") break open_telnet_conn()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement