#PYTHON

Publicado el: 29 agosto 2019
en el canal de: Amit Bhat
618
7

!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()


En esta página del sitio puede ver el video en línea #PYTHON de Duración hora minuto segunda en buena calidad , que subió el usuario Amit Bhat 29 agosto 2019, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 618 veces y le gustó 7 a los espectadores. Disfruta viendo!