first commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
import logging
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
from cisco_mac_monitor import CiscoSSHConnector, CiscoMacTableParser
|
||||
|
||||
ssh = CiscoSSHConnector('10.150.226.19', 'itops', 'Tr4!D0r3s')
|
||||
print("Conectando...")
|
||||
ssh.connect()
|
||||
print("Ejecutando comando...")
|
||||
output = ssh.execute_command('show mac address-table')
|
||||
print('OUTPUT LENGTH:', len(output))
|
||||
print('FIRST 300 CHARS:', repr(output[:300]))
|
||||
if len(output) > 300:
|
||||
print('LAST 100 CHARS:', repr(output[-100:]))
|
||||
ssh.disconnect()
|
||||
print("Desconectado.")
|
||||
Reference in New Issue
Block a user