| Author |
Cisco IOS practice script
|
|
| smrkdown 2004-12-20, 6:21 pm |
| I was bored today so...
I'm at college, and I don't have my Cisco equipment with me, but I needed a command-line to type commands into to help my retention while studying. My bash shell wasn't quite doing the trick, so I wrote this little bash script to allow me to practice commands. It's basically just a dummy interpreter that gives you access to the necessary configuration prompts so you can practice typing commands in. It has very little intelligence and functionality, but you can do a few things besides just typing in commands and getting no resonse. Feel free to make changes and improvements if you want.
You'll want to (but don't have to) change the extention of the file from .txt to .sh. You'll also want to make the file executable with chmod u+x or chmod 755 or any variation that will allow you to execute the file.
It's not nearly finished, (need to add vlan database mode, and a bunch other stuff), but it's still fun to poke around in. Have fun. | |
| smrkdown 2004-12-20, 9:19 pm |
| Added vlan database and line configuration modes... think I'll add enable password and enable secret functionality soon. | |
| smrkdown 2004-12-20, 9:21 pm |
| Forgot to attach file...
Somebody should add a trap for "ctrl-z" key sequence that works like IOS ctrl-z does. | |
| peterd 2004-12-21, 9:40 am |
| Hi,
this sounds like a good idea...how would I run it on a dos/windows PC please?
I've been using MS Word to type in commands and that's not brilliant as I've got to remember which prompt it's at.
Just one point...I took the switching exam today and a couple of SIMs came up. They both stated that the 'database' command is being phased out by Cisco so it specifically barred using it.
Regards
Peter | |
| smrkdown 2004-12-21, 12:26 pm |
| Hmmm for Windows, you could run cygwin or some other pseudo-linux environment. All you need is to get a bash shell running to interpret the script. Yeah, I've heard that vlan database is outdated and will be phased out. It'd be nice if they'd have more consistancy between platforms.
Added semi-functional enable password and no enable password commands to the script. Accepts only the password as the argument (no exec level). Was going to add enable secret, but I figured using md5sum or some external program wouldn't make for a very modular shell script, and I wasn't going to create my own algorithm. If someone else has one, let me know. | |
| smrkdown 2004-12-21, 12:28 pm |
| Stupid little mistake in last script posted, fixed here: | |
|
|
| smrkdown 2005-01-02, 12:57 pm |
| Thanks, I think... I've been on break for a few weeks and I'm just getting back. I graduated from South Hills School of Business and Technology (a small 2-year college in central PA), and now I'm going to Central Pennsylvania college near Harrisburg, PA, for my bachelor's and possibly my masters if they become a university within the next two years. I thought about making the script into a full sim... but I don't think I have the time or knowledge of IOS required. And I'd probably start the script over and take a more modular approach by using more functions. I'd also document it thoroughly and it'd need a much better command parsing method. Anyway, we'll see. | |
| darthfeces 2005-01-02, 1:48 pm |
| i live in nj and work in ny
have relatives in east stroudsburg | |
| smrkdown 2005-01-02, 1:54 pm |
| Cool. My girlfriend goes to East Stroudsburg University. |
|
|
|