08-20-2010 09:40 AM
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!!
08-22-2010 03:49 PM
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.
08-23-2010 09:23 AM
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.
08-23-2010 09:35 PM
It looks to me that you should set $cmd to be $cgi->param("cmd"), and not read this from STDIN.
08-24-2010 01:04 PM
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
08-24-2010 02:57 PM
08-24-2010 04:21 PM
Awesome!!! thank you so very much!! working like a charm! thanks Joe!!
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: