[c-nsp] Looking-glass software?

R. Scott Evans cisco-nsp at seidata.com
Thu May 18 12:14:10 EDT 2017


On 5/18/17 11:26 AM, Saku Ytti wrote:
> I don't think anyone who should write their own looking glass needs to
> be shown example how to do it.
>
> You are literally allowing anyone to inject data to your
> control-plane, it needs to be done right. I can immediately say you're
> not doing it right because you're not passing binary and arguments
> separately.
>

Wow, I'm biting my tongue Saku... but it's a direction, not final solution, you've offered neither.

1) the OP said they preferred perl or php, so my interpretation of that means they want to touch the code.
2) just because one can code doesn't mean they've thought of all options.
3) He said this was for his colleagues, which I interpret as not public access.

For internal use, why trouble oneself with the maintenance, excessive libraries, modules and crud that another "installed" option would require if you don't need all its features.  As far as injecting anything unwanted, that is the point of only showing a snippet... security is left to the OP/programmer.

Scott

> On 18 May 2017 at 18:04, R. Scott Evans <cisco-nsp at seidata.com> wrote:
>> On 05/18/17 10:03, Patrick M. Hausen wrote:
>>>
>>> Hi, all
>>>
>>> can anyone recommend a free looking-glass tool
>>> to run on my own NOC server for my own core routers?
>>>
>>> My problem is finding a software that is preferably written in
>>> Perl or PHP and
>>>
>>> * not unmaintained for years
>>> * breaking with current versions (5.24) of Perl
>>> * only supporting telnet instead of ssh
>>> * ...
>>>
>>> I've been spending almost a day already chasing dead links
>>> on historic sites like traceroute.org, downloading, configuring,
>>> testing ...
>>>
>>> So, any hints?
>>>
>>> I had set up routerproxy to hand my less IOS-savvy colleagues a
>>> tool to quickly check some things, but that one goes in the
>>> "breaks with Perl 5.24" category ...
>>>
>>> Thanks!
>>> Patrick
>>
>>
>> Hi Patrick,
>>
>> If you prefer perl, are using a unix flavor, don't mind using a little
>> bourne shell within it, and are comfortable coding, write your own... the
>> relevant bits would look like:
>>
>> $output = `(                    sleep 1;
>>         echo $login;            sleep 1;
>>         echo $password;         sleep 1;
>>         echo term leng 0;       sleep 1;
>>         echo "** YOUR COMMAND **";              sleep 3;
>>         echo "** 2nd COMMAND IF NEEDED **";     sleep 3;
>>         echo exit;              sleep 1;
>>         ) | /usr/bin/telnet $ip 2>&1`;
>>
>> or
>>
>> $output = `(                    sleep 1;
>>         echo $login;            sleep 1;
>>         echo en;                sleep 1;
>>         echo $enable;           sleep 1;
>>         echo term leng 0;       sleep 1;
>>         echo "** YOUR COMMAND **";              sleep 3;
>>         echo exit;              sleep 1;
>>         ) | /usr/bin/telnet $ip 2>&1`;
>>
>> Alternatively if you are only using IOS or IOS-XE, not IOS-XR, and have
>> netcat (nc) on your server I'd recommend using it in place of telnet as you
>> can run the commands without specifying the sleep needed for the responses
>> which greatly speeds up the program.  There may be a way to make XR work
>> with it, but I've had no luck...
>> $output = `(
>>         echo $login;
>>         echo $password;
>>         echo term leng 0;
>>         echo "** YOUR COMMAND **";
>>         echo exit;
>>         ) | /usr/bin/nc $ip 23 2>&1`;
>>
>> Regards,
>> Scott
>>
>>
>> _______________________________________________
>> cisco-nsp mailing list  cisco-nsp at puck.nether.net
>> https://puck.nether.net/mailman/listinfo/cisco-nsp
>> archive at http://puck.nether.net/pipermail/cisco-nsp/


More information about the cisco-nsp mailing list