cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
740
Views
5
Helpful
6
Replies

writing NetShow comparable script

raindrop18
Level 1
Level 1

I am trying to write perl cgi base script has the same concept like net show and the main reason for that is the out put of the show command to writen to screen instead of file like net show. I don't want to give LMS file access to everyone.so I want everyone else to use this script when they want to to run Cisco IOS commands on multiple devices.

here is my initial script but I am stack on the middle, hopefully there is some one perl expert on this forum! and  I am really apperciate if some one able indicating my error on attached script! thanks much!!

6 Replies 6

Joe Clarke
Cisco Employee
Cisco Employee

Exactly what error are you getting?  This script looks very incomplete.  I don't see how the telnet code path will work.  And the SSH code path calls some external application for which you have not posted code.

sorry,I have  attached a wrong file, was a draft, I don't need a telnet access. the error is, the page running correctly but there is no out put display my suspecious is my screen input command may not recognize by the script. I have never wrote script with STDIN on cgi script and not sure If I am correct thier. I have attached the new file and the second script called by the first one for ssh login.

It looks to me that you should set $cmd to be $cgi->param("cmd"), and not read this from STDIN.

thanks much Joe, i have used your suggestion  and I am able to pull information from the device from bowser input. (attached the updated script) the only issue  I have now, some reason the script not pulling information from multiple devices only access one devices at the time. even though i have selected (router -1, 2, 3 and 4) from the list only showing the result of one devices. do you see any thing?? thanks again for your help

This version should work.

Awesome!!! thank you so very much!! working like a charm! thanks Joe!!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: