!PYTHON PROGRAM FOR CONFIGURING SWITCH
import getpass
import telnetlib
HOST = "192.168.164.130"
user =raw_input("Enter your telnet username: ")
pwd = getpass.getpass()
tn = telnetlib.Telnet(HOST)
tn.read_until("Username: ")
tn.write(user + "\n")
if pwd:
tn.read_until("Password: ")
tn.write(pwd + "\n")
tn.write("enable\n")
tn.write("cisco\n")
tn.write("config t\n")
for n in range (2,11):
tn.write("vlan " + str(n) + "\n")
tn.write("name P_VLAN_" + str(n) + "\n")
tn.write("end\n")
tn.write("exit\n")
print tn.read_all()
Nesta página do site você pode assistir ao vídeo on-line #PYTHON duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Amit Bhat 29 Agosto 2019, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 618 vezes e gostou 7 espectadores. Boa visualização!