Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > import telnetlib import time
- >
- > def open_telnet_conn(): num = int(input("Tell me how many teams
- > need:"))
- >
- > if num< 1:
- > print("¡impossible!”) else:
- > listad = [] for i in range(num):
- > print("Enter the IP address:", str(i + 1) + ": ", end="")
- > directions= input()
- > listad += [directions] while True:
- > print("***** Menu *****")
- > print("1.- Run new file: ") if opcion == 1:
- > try:
- > username = '12345'
- > password = '12345'
- > TELNET_PORT = 23
- > TELNET_TIMEOUT = 5
- > READ_TIMEOUT = 5
- > for i in range(num):
- > print("Sequence for the device:", i)
- > cmd_file = raw_input("Type the path of the file and its extension ")
- > # Logging on the device
- > connection = telnetlib.Telnet(listad[i], TELNET_PORT, TELNET_TIMEOUT)
- > #
- >
- > except IOError:
- > print ("Error in input parameter! Review your information ") break open_telnet_conn()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement