writing NetShow comparable script

Unanswered Question
Aug 20th, 2010

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!!

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Joe Clarke Sun, 08/22/2010 - 15:49

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.

raindrop18 Mon, 08/23/2010 - 09:23

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.

Joe Clarke Mon, 08/23/2010 - 21:35

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

raindrop18 Tue, 08/24/2010 - 13:04

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

raindrop18 Tue, 08/24/2010 - 16:21

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


This Discussion