Secure CRT Cisco Shortcuts
This is a set of libraries for automating Cisco devices (and to a lesser extent, bash prompts) via SecureCRT.
SecureCRT's built-in python functions are very basic, making it difficult to automate complex tasks. This library makes it easier to write scripts for Cisco devices by adding a little abstraction.
Main goals of this project:
- Abstract automating SecureCRT so writing scripts requires less work
- Make it easier to do OS agnostic scripting (IOS XE, XR, NXOS, ASA, etc.)
- Make it easier to parse Cisco configurations and shell output
Currently I have tested this library mostly on IOS, IOS XE, ASA, and NXOS. While I have prototyped a class for XR, I am not familiar enough with XR to finish it.
This entire project is under the GPLv3 license. I would love to see others contribute to it!
Help
As of writing this README, SecureCRT only works with Python 3.8, so make sure you DON'T install a later version unless they update SecureCRT for newer versions of python.
To setup dependencies, navigate to the project's root directory and run "pip install -r requirements.txt"
Example Script
s_template.py is an example script you can run from SecureCRT. Use it as a template to build your own scripts with this library.
Credits
This project was made possible by referencing solutions from two other projects on Github:
- jamiecaesar/securecrt-tools
- btr1975/secure-crt-python-public
Both are Python 2, rather than Python 3, and thus did not meet my needs. Nonetheless, I am indebted to both. Thank you!
GitHub
https://github.com/matthewspangler/securecrt-cisco-shortcuts