Network Automation Cisco Systems Python

preview_player
Показать описание
Un nuevo video sobre redes informáticas y comunicaciones entre diferentes elementos hecho por #Network-Tic.
Рекомендации по теме
Комментарии
Автор

import telnetlib
import getpass

HOST = "192.168.122.71"
user = input("Enter your telnet username: ")
password = getpass.getpass()

tn = telnetlib.Telnet(HOST)

tn.read_until(b"Username: ")
tn.write(user.encode('ascii') + b"\n")
if password:
tn.read_until(b"Password: ")
+ b"\n")

tn.write(b"enable\n")
tn.write(b"cisco\n")
tn.write(b"conf term\n")
tn.write(b"int loop 0\n")
tn.write(b"ip address 1.1.1.1 255.255.255.255\n")
tn.write(b"end\n")
tn.write(b"exit\n")


network-tic
join shbcf.ru