Eli Fulkerson .com HomeProjectsOffline-console

Offline Console


Offline console is a python script that attempts to simulate being at the console of a Cisco IOS device when reading a config file. That is to say, the intention is to let you open a config file that you have saved locally and navigate it as if you are at the console. This is purely a configuration viewer - this is *not* an IOS simulator or a VM or anything of the sort. I just wanted to be able to use my muscle memory, 'show' commands to pick out specific stanzas and have an autocomplete that is similar enough to IOS's so I can find what I am looking for quickly.

As a side note, I have implemented the | (pipe) by actually shelling out to the operating system rather than trying to duplicate Cisco's crappy little grep utility internally. So you can use *real* grep, or awk, or whatever you want. The pipe is *live*, in your shell. If you do something like blah | xargs rm -f you can damage your system. I don't know why you might do something like that, but this has been your warning.

As a second note, the final feature of this script is that it makes python coredump when you quit. Not sure why its doing that, if you figure it out let me know.


Syntax:  offline-console.py file1 file2 file3 file4....
Syntax:  python offline-console.py file1 file2 file3 file4....
... depending on how you have python set up.