Acitoolkit – Get all Nodes

Example script to print all your fabric nodes.

from acitoolkit.acitoolkit import Session
from acitoolkit.aciphysobject import Node

url = 'https://apic'
user = 'user'
pw = 'pw'

session = Session(url, user, pw)
session.login()

nodes = Node.get(session)
for node in nodes:
    print('=' * 50)
    print('Pod: {}'.format(node.pod))
    print('Node: {}'.format(node.node))
    print('Mode: {}'.format(node.mode))
    print('Model: {}'.format(node.model))
    print('Vendor: {}'.format(node.vendor))
    print('Serial: {}'.format(node.serial))

Python – Building a Cisco Type 7 Decrypt Tool

I wrote a small python script that can decrypt cisco type 7 passwords.
Cisco7Decrypt on Github

You can decrypt password directly through the CLI:

→ python cisco7decrypt.py 12090404011C03162E
password

If you want the command accessible from anywhere, just link it to a folder that’s included in your Path. In this example ‘~/bin’

ln -sn `pwd`/cisco7decrypt.py ~/bin/cisco7decrypt

FTP Server under Mac OS X

Today a colleague of mine (Thanks Alex Passfall) showed me a simple ftp server under mac:

pip2 install twisted # if not already
sudo twistd -n ftp -p 21 -r Downloads

After that you can access all the files in the specified directory through ftp. Awesome stuff!


aci-lab-as01#copy ftp://10.32.32.184/file.lic .
Destination filename [file.lic]?
Accessing ftp://10.32.32.184/file.lic...
Loading file.lic !
[OK - 814/4096 bytes]

814 bytes copied in 0.084 secs (9690 bytes/sec)

Thanks @Samuel Heinrich for spell checking 😉