Secure CRT Cisco Shortcuts
Version 0.1
|| ||
|| ||
|||| ||||
..:||||||:..:||||||:..
------------------------
C i s c o S y s t e m s
About
This is a set of libraries for automating Cisco devices (and to a lesser extent, bash prompts) over ssh/telnet in 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.)
- Include functions for parsing CLI output
Currently, I have only tested my code on XE, and it will be buggy until I am able to thoroughly test other Cisco OS's. Nonetheless, I have already written some useful code for other Cisco OS's.
This entire project is under the GPLv3 license until I change my mind or someone starts paying me to develop 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.
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.
Useful Links
Useful links with SecureCRT python scripting examples:
- https://www.vandyke.com/support/securecrt/python_examples.html
- https://forums.vandyke.com/showthread.php?t=12857
- https://forums.vandyke.com/showthread.php?t=14434
- https://forums.vandyke.com/showthread.php?t=14295
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!