first commit

This commit is contained in:
Xavier Rodriguez
2025-12-09 12:45:15 +01:00
commit 7fc616b5c3
44 changed files with 6981 additions and 0 deletions
+16
View File
@@ -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.")