Skip to content

Password changing script for Cisco routers, written in Python.

License

Notifications You must be signed in to change notification settings

d-mariano/drconf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

drconf

Overview

Today, things move fast. If a company has a dozen routers, and wants to change the password of each router, check the status of each routers' interfaces, or perhaps check the version of software each router is running, then one could safely assume that company would like to do it all quickly and efficiently. It would take time which means it would cost money to connect to each router, enter each routers' credentials, and then enter each routers' new password; all while doing each step for each router separately. This would be extremely tedious, particularly if each router is to be configured with the same password or, in Cisco's case, “enable secret” anyway. A good solution is to provide an interface that will connect to each router with the credentials provided and change each router password to the desired password provided; all after having the user make only one entry for each required piece of information. Additionally, one may want the option to manually change each router in case some should have different passwords than ohters. If a simple health check is desired, why not observe each routers' health report one after the other? My project does all these convenient things. It is a script written in Python that makes use of the Pexpect library, an API for Python that implements Expect. I call it drconf, standing for Dave's Router Configuration.

Requirements

As mentioned earlier, this project has been written in Python. I have tested it thoroughly with Python 2.7 and Python 3.4, making a point of ensuring it works as expected with either one. So, Python is a requirement, either 2.6 and above or 3.2 and above. Just as important as the first, the next requirement is the Pexpect library. It can be installed using pip install pexpect. As mentioned on the Pexpect website, one should use Pexpect version 2.4 for older versions of Python; this is why I mentioned to use Python 2.6 or 3.2 specifically. The next requirement is the input of router IP addressses in a file called “routers”, the name was chosen for the sake of simplicity. The IP addresses must be entered one per line. The file is read by the script and iterated through each time a menu option is to be executed. Without entering these IP addresses, the script will never achieve your goals. And Finally, I should have mentioned this earlier, Cisco routers are required and only Cisco routers are supported. I would probably implement Linux routers next, I think it may easy to implement.

About

Password changing script for Cisco routers, written in Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages