#PYTHON

Pubblicato il: 29 agosto 2019
sul canale di: 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()


In questa pagina del sito puoi guardare il video online #PYTHON della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Amit Bhat 29 agosto 2019, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 618 volte e gli è piaciuto 7 spettatori. Buona visione!