Sponsored Content
Top Forums Shell Programming and Scripting Expect/telnet/testing tacacs on a cisco Post 302474258 by frank_rizzo on Tuesday 23rd of November 2010 07:51:06 PM
Old 11-23-2010
do you have to use expect/telnet? develop a simple socket program in Perl, Python or whatever langauge. nc is also a great utility to test something like this.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl telnet to cisco router and compare the ping ms

All Please help, i will telnet to router to obain the ping status and compare, if higher than normal latency, i will have further action.. if i do the telent and in perl script then .... e.g the result i obtain from the router will be =' Success rate is 100 percent (5/5), round-trip... (4 Replies)
Discussion started by: optimus
4 Replies

2. Shell Programming and Scripting

Webpage to Telnet via Perl and Expect: Telnet problem?

Somewhat long story: I have a simple Perl CGI script that uses Expect to Telnet to a device and grab some data, and then spits it back to Perl for display on the Webpage. This works for many devices I've tried, but one device just fails, it keeps rejecting the password on this device, only... (1 Reply)
Discussion started by: jondo
1 Replies

3. Shell Programming and Scripting

Need help with Expect script for Cisco IPS Sensors, Expect sleep and quoting

This Expect script provides expect with a list of IP addresses to Cisco IPS sensors and commands to configure Cisco IPS sensors. The user, password, IP addresses, prompt regex, etc. have been anonymized. In general this script will log into the sensors and send commands successfully but there are... (1 Reply)
Discussion started by: genewolfe
1 Replies

4. Shell Programming and Scripting

perl telnet issue with cisco

Hi Experts, I am using perl to telnet on cisco boxes. We have this stupid cisco node which does not support "terminal Length0" command. Since I am using Net::Telnet and capturing output with @output = $telnet->cmd('cmd'); Say @output = $telnet->cmd('show version'); Now problem... (2 Replies)
Discussion started by: mtomar
2 Replies

5. Shell Programming and Scripting

Perl variables inside Net::Telnet::Cisco Module doesn't work

I am writing perl script to configure Cisco device but Variables inside Net::Telnet::Cisco Module doesn't work and passed to device without resolving. Please advise. here is a sample of script: use Net::Telnet::Cisco; $device = "10.14.199.1"; ($o1, $o2, $o3, $o4) = split(/\./,$device);... (5 Replies)
Discussion started by: ahmed_zaher
5 Replies

6. Shell Programming and Scripting

Bash script failed with expect on cisco routers

Hi all, I use a bash script which use expect to connect throught ssh and run command on a cisco router. The ssh connection with expect work fine, but the first command on the cisco router failed, I try to run the command in error by hand and it work fine... :( the first part of the script... (2 Replies)
Discussion started by: bedomon
2 Replies

7. Shell Programming and Scripting

Perl Telnet cisco routers

Hi all i have little problem finding solution about simple telnet script .... i have 250 routers and on some i have different password and on some they ask just for password no username. So for example 1,2,3 have username and password (user,password) 4, and 5 have different username and password... (0 Replies)
Discussion started by: IvanMP
0 Replies

8. Shell Programming and Scripting

Expect script to show cisco configs

I know there are better ways to do this. I prefer snmp. I do not have the proper perl modules loaded on the platorm. Snmp isnt loaded on the platform. Telnet is not an option. I need to write an expect script to pull cisco equipment configs. The following code is executed once I gain... (0 Replies)
Discussion started by: popeye
0 Replies

9. Shell Programming and Scripting

Cisco, 2 ssh logins for expect /bash

HI all i need to connect to about 900 cisco routers and switch to do some configs changes. the issue i am having is that half the devices have one set of username and password and the other half have another username and password. From expect or bash script i can ssh into a device and make... (0 Replies)
Discussion started by: quintin
0 Replies
BB-SERVICES(5)							File Formats Manual						    BB-SERVICES(5)

NAME
bb-services - Configuration of TCP network services SYNOPSIS
$BBHOME/etc/bb-services DESCRIPTION
bb-services contains definitions of how bbtest-net(1) should test a TCP-based network service (i.e. all common network services except HTTP and DNS). For each service, a simple dialogue can be defined to check that the service is functioning normally, and optional flags deter- mine if the service has e.g. a banner or requires SSL- or telnet-style handshaking to be tested. FILE FORMAT
bb-services is a text file. A simple service definition for the SMTP service would be this: [smtp] send "mail quit " expect "220" options banner This defines a service called "smtp". When the connection is first established, bbtest-net will send the string "mail quit " to the service. It will then expect a response beginning with "220". Any data returned by the service (a so-called "banner") will be recorded and included in the status message. The full set of commands available for the bb-services file are: [NAME] Define the name of the TCP service, which will also be the column-name in the resulting display on the test status. If multiple tests share a common definition (e.g. ssh, ssh1 and ssh2 are tested identically), you may list these in a single "[ssh|ssh1|ssh2]" definition, separating each service-name with a pipe-sign. send STRING expect STRING Defines the strings to send to the service after a connection is established, and the response that is expected. Either of these may be omitted, in which case bbtest-net(1) will simply not send any data, or match a response against anything. The send- and expect-strings use standard escaping for non-printable characters. " " represents a carriage-return (ASCII 13), " " represents a line-feed (ASCII 10), " " represents a TAB (ASCII 8). Binary data is input as "xNN" with NN being the hexadecimal value of the byte. port NUMBER Define the default TCP port-number for this service. If no portnumber is defined, bbtest-net(1) will attempt to lookup the portnum- ber in the standard /etc/services file. options option1[,option2][,option3] Defines test options. The possible options are banner - include received data in the status message ssl - service uses SSL so perform an SSL handshake telnet - service is telnet, so exchange telnet options FILES
$BBHOME/etc/bb-services SEE ALSO
bbtest-net(1) Xymon Version 4.2.3: 4 Feb 2009 BB-SERVICES(5)
All times are GMT -4. The time now is 07:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy