[rancid] Re: Cisco 1900 issues
Ashton, James P.
jashton at progresstelecom.com
Sat Mar 25 00:42:08 UTC 2006
Sorry for the delay. Had to get home from work.
bash-3.00# expect -d /export/home/rancid/bin/clogin -c 'show running'
172.16.29.40
expect version 5.42.1
argv[0] = expect argv[1] = -d argv[2] = /export/home/rancid/bin/clogin
argv[3] = -c argv[4] = show running argv[5] = 172.16.29.40
set argc 3
set argv0 "/export/home/rancid/bin/clogin"
set argv "-c {show running} 172.16.29.40"
executing commands from command file /export/home/rancid/bin/clogin
172.16.29.40
spawn telnet 172.16.29.40
parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {16228}
expect: does "" (spawn_id exp6) match regular expression "(Connection
refused|Secure connection [^\n\r]+ refused)"? no
"(Connection closed by|Connection to [^\n\r]+ closed)"? no
expect: does "" (spawn_id exp6) match glob pattern "unknown host\r"? no
expect: does "" (spawn_id exp6) match glob pattern "Host is
unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be
established).*(yes/no)?"? no
"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? no
"Offending key for .* (yes/no)?"? no
"(denied|Sorry)"? no
"Login failed"? no
"% (Bad passwords|Authentication failed)"? no
"Press any key to continue."? no
"Enter Selection: "? no
"@[^\r\n]+ ([Pp]assword|passwd):"? no
"(Username|Login|login|user name):"? no
"([Pp]assword|passwd):"? no
">"? no
"Login invalid"? no
Trying 172.16.29.40...
Connected to 172.16.29.40.
Escape character is '^]'.
************************************************************************
This is a private computer facility. Users may be monitored
UNAUTHORIZED ACCESS OR USE IS ILLEGAL !!!
Please disconnect if you are not authorized to use these facilities
************************************************************************
Press any key to continue.
expect: does "Trying 172.16.29.40...\r\nConnected to
172.16.29.40.\r\nEscape character is
'^]'.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\
n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\
n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n***
*********************************************************************\r\
n\r\nThis is a private computer facility. Users may be monitored\r\n\r\n
UNAUTHORIZED ACCESS OR USE IS ILLEGAL !!!\r\n\r\nPlease disconnect if
you are not authorized to use these
facilities\r\n\r\n******************************************************
******************\r\n\r\nPress any key to continue.\r\n" (spawn_id
exp6) match regular expression "(Connection refused|Secure connection
[^\n\r]+ refused)"? no
"(Connection closed by|Connection to [^\n\r]+ closed)"? no
expect: does "Trying 172.16.29.40...\r\nConnected to
172.16.29.40.\r\nEscape character is
'^]'.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\
n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\
n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n***
*********************************************************************\r\
n\r\nThis is a private computer facility. Users may be monitored\r\n\r\n
UNAUTHORIZED ACCESS OR USE IS ILLEGAL !!!\r\n\r\nPlease disconnect if
you are not authorized to use these
facilities\r\n\r\n******************************************************
******************\r\n\r\nPress any key to continue.\r\n" (spawn_id
exp6) match glob pattern "unknown host\r"? no
expect: does "Trying 172.16.29.40...\r\nConnected to
172.16.29.40.\r\nEscape character is
'^]'.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\
n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\
n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n***
*********************************************************************\r\
n\r\nThis is a private computer facility. Users may be monitored\r\n\r\n
UNAUTHORIZED ACCESS OR USE IS ILLEGAL !!!\r\n\r\nPlease disconnect if
you are not authorized to use these
facilities\r\n\r\n******************************************************
******************\r\n\r\nPress any key to continue.\r\n" (spawn_id
exp6) match glob pattern "Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be
established).*(yes/no)?"? no
"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? no
"Offending key for .* (yes/no)?"? no
"(denied|Sorry)"? no
"Login failed"? no
"% (Bad passwords|Authentication failed)"? no
"Press any key to continue."? yes
expect: set expect_out(0,string) "Press any key to continue."
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "Trying 172.16.29.40...\r\nConnected to
172.16.29.40.\r\nEscape character is
'^]'.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\
n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\
n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n***
*********************************************************************\r\
n\r\nThis is a private computer facility. Users may be monitored\r\n\r\n
UNAUTHORIZED ACCESS OR USE IS ILLEGAL !!!\r\n\r\nPlease disconnect if
you are not authorized to use these
facilities\r\n\r\n******************************************************
******************\r\n\r\nPress any key to continue."
send: sending "\r" to { exp6 }
expect: continuing expect
expect: does "\r\n" (spawn_id exp6) match regular expression
"(Connection refused|Secure connection [^\n\r]+ refused)"? no
"(Connection closed by|Connection to [^\n\r]+ closed)"? no
expect: does "\r\n" (spawn_id exp6) match glob pattern "unknown host\r"?
no
expect: does "\r\n" (spawn_id exp6) match glob pattern "Host is
unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be
established).*(yes/no)?"? no
"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? no
"Offending key for .* (yes/no)?"? no
"(denied|Sorry)"? no
"Login failed"? no
"% (Bad passwords|Authentication failed)"? no
"Press any key to continue."? no
"Enter Selection: "? no
"@[^\r\n]+ ([Pp]assword|passwd):"? no
"(Username|Login|login|user name):"? no
"([Pp]assword|passwd):"? no
">"? no
"Login invalid"? no
Catalyst 1900 Management Console
Copyright (c) Cisco Systems, Inc. 1993-1999
All rights reserved.
Enterprise Edition Software
Ethernet Address: 00-05-32-12-18-40
PCA Number: 73-3121-04
PCA Serial Number: FAB0506C2LO
Model Number: WS-C1924-EN-DC
System Serial Number: FAB0506W1JJ
Power Supply S/N: PHI044100CW
PCB Serial Number: FAB0506C2LO,73-3121-04
-------------------------------------------------
1 user(s) now active on Management Console.
User Interface Menu
[M] Menus
[K] Command Line
Enter Selection:
expect: does "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nCatalyst 1900
Management Console\r\nCopyright (c) Cisco Systems, Inc.
1993-1999\r\nAll rights reserved.\r\nEnterprise Edition
Software\r\nEthernet Address: 00-05-32-12-18-40\r\n\r\nPCA Number:
73-3121-04\r\nPCA Serial Number: FAB0506C2LO\r\nModel Number:
WS-C1924-EN-DC\r\nSystem Serial Number: FAB0506W1JJ\r\nPower Supply
S/N: PHI044100CW\r\nPCB Serial Number:
FAB0506C2LO,73-3121-04\r\n----------------------------------------------
---\r\n\r\n1 user(s) now active on Management Console.\r\n\r\n
User Interface Menu\r\n\r\n [M] Menus\r\n [K] Command
Line\r\n\r\nEnter Selection: " (spawn_id exp6) match regular expression
"(Connection refused|Secure connection [^\n\r]+ refused)"? no
"(Connection closed by|Connection to [^\n\r]+ closed)"? no
expect: does "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nCatalyst 1900
Management Console\r\nCopyright (c) Cisco Systems, Inc.
1993-1999\r\nAll rights reserved.\r\nEnterprise Edition
Software\r\nEthernet Address: 00-05-32-12-18-40\r\n\r\nPCA Number:
73-3121-04\r\nPCA Serial Number: FAB0506C2LO\r\nModel Number:
WS-C1924-EN-DC\r\nSystem Serial Number: FAB0506W1JJ\r\nPower Supply
S/N: PHI044100CW\r\nPCB Serial Number:
FAB0506C2LO,73-3121-04\r\n----------------------------------------------
---\r\n\r\n1 user(s) now active on Management Console.\r\n\r\n
User Interface Menu\r\n\r\n [M] Menus\r\n [K] Command
Line\r\n\r\nEnter Selection: " (spawn_id exp6) match glob pattern
"unknown host\r"? no
expect: does "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nCatalyst 1900
Management Console\r\nCopyright (c) Cisco Systems, Inc.
1993-1999\r\nAll rights reserved.\r\nEnterprise Edition
Software\r\nEthernet Address: 00-05-32-12-18-40\r\n\r\nPCA Number:
73-3121-04\r\nPCA Serial Number: FAB0506C2LO\r\nModel Number:
WS-C1924-EN-DC\r\nSystem Serial Number: FAB0506W1JJ\r\nPower Supply
S/N: PHI044100CW\r\nPCB Serial Number:
FAB0506C2LO,73-3121-04\r\n----------------------------------------------
---\r\n\r\n1 user(s) now active on Management Console.\r\n\r\n
User Interface Menu\r\n\r\n [M] Menus\r\n [K] Command
Line\r\n\r\nEnter Selection: " (spawn_id exp6) match glob pattern "Host
is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be
established).*(yes/no)?"? no
"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? no
"Offending key for .* (yes/no)?"? no
"(denied|Sorry)"? no
"Login failed"? no
"% (Bad passwords|Authentication failed)"? no
"Press any key to continue."? no
"Enter Selection: "? yes
expect: set expect_out(0,string) "Enter Selection: "
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer)
"\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nCatalyst 1900 Management
Console\r\nCopyright (c) Cisco Systems, Inc. 1993-1999\r\nAll rights
reserved.\r\nEnterprise Edition Software\r\nEthernet Address:
00-05-32-12-18-40\r\n\r\nPCA Number: 73-3121-04\r\nPCA Serial
Number: FAB0506C2LO\r\nModel Number:
WS-C1924-EN-DC\r\nSystem Serial Number: FAB0506W1JJ\r\nPower Supply
S/N: PHI044100CW\r\nPCB Serial Number:
FAB0506C2LO,73-3121-04\r\n----------------------------------------------
---\r\n\r\n1 user(s) now active on Management Console.\r\n\r\n
User Interface Menu\r\n\r\n [M] Menus\r\n [K] Command
Line\r\n\r\nEnter Selection: "
send: sending "K\r" to { exp6 }
expect: continuing expect
expect: does " " (spawn_id exp6) match regular expression "(Connection
refused|Secure connection [^\n\r]+ refused)"? no
"(Connection closed by|Connection to [^\n\r]+ closed)"? no
expect: does " " (spawn_id exp6) match glob pattern "unknown host\r"? no
expect: does " " (spawn_id exp6) match glob pattern "Host is
unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be
established).*(yes/no)?"? no
"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? no
"Offending key for .* (yes/no)?"? no
"(denied|Sorry)"? no
"Login failed"? no
"% (Bad passwords|Authentication failed)"? no
"Press any key to continue."? no
"Enter Selection: "? no
"@[^\r\n]+ ([Pp]assword|passwd):"? no
"(Username|Login|login|user name):"? no
"([Pp]assword|passwd):"? no
">"? no
"Login invalid"? no
K
CLI session with the switch is open.
To end the CLI session, enter [Exit].
S_CentStaLab_1924>
expect: does " K\r\n\r\n\r\n CLI session with the switch is
open.\r\n To end the CLI session, enter
[Exit].\r\n\r\nS_CentStaLab_1924>\n" (spawn_id exp6) match regular
expression "(Connection refused|Secure connection [^\n\r]+ refused)"? no
"(Connection closed by|Connection to [^\n\r]+ closed)"? no
expect: does " K\r\n\r\n\r\n CLI session with the switch is
open.\r\n To end the CLI session, enter
[Exit].\r\n\r\nS_CentStaLab_1924>\n" (spawn_id exp6) match glob pattern
"unknown host\r"? no
expect: does " K\r\n\r\n\r\n CLI session with the switch is
open.\r\n To end the CLI session, enter
[Exit].\r\n\r\nS_CentStaLab_1924>\n" (spawn_id exp6) match glob pattern
"Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be
established).*(yes/no)?"? no
"HOST IDENTIFICATION HAS CHANGED.* (yes/no)?"? no
"Offending key for .* (yes/no)?"? no
"(denied|Sorry)"? no
"Login failed"? no
"% (Bad passwords|Authentication failed)"? no
"Press any key to continue."? no
"Enter Selection: "? no
"@[^\r\n]+ ([Pp]assword|passwd):"? no
"(Username|Login|login|user name):"? no
"([Pp]assword|passwd):"? no
">"? yes
expect: set expect_out(0,string) ">"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) " K\r\n\r\n\r\n CLI session with the
switch is open.\r\n To end the CLI session, enter
[Exit].\r\n\r\nS_CentStaLab_1924>"
send: sending "enable\r" to { exp6 }
expect: does "\n" (spawn_id exp6) match regular expression
"(Username|Login|login|user name):"? no
"[Pp]assword:"? no
"#"? no
"(enable)"? no
"(denied|Sorry|Incorrect)"? no
"% Error in authentication"? no
"% Bad passwords"? no
S_CentStaLab_1924>enable
Enter password:
expect: does "\n\rS_CentStaLab_1924>enable\n\rEnter password: "
(spawn_id exp6) match regular expression "(Username|Login|login|user
name):"? no
"[Pp]assword:"? yes
expect: set expect_out(0,string) "password:"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "\n\rS_CentStaLab_1924>enable\n\rEnter
password:"
send: sending "b0rab0ra\r" to { exp6 }
expect: continuing expect
expect: does " " (spawn_id exp6) match regular expression
"(Username|Login|login|user name):"? no
"[Pp]assword:"? no
"#"? no
"(enable)"? no
"(denied|Sorry|Incorrect)"? no
"% Error in authentication"? no
"% Bad passwords"? no
********
expect: does " ********\r\n" (spawn_id exp6) match regular expression
"(Username|Login|login|user name):"? no
"[Pp]assword:"? no
"#"? no
"(enable)"? no
"(denied|Sorry|Incorrect)"? no
"% Error in authentication"? no
"% Bad passwords"? no
S_CentStaLab_1924#
expect: does " ********\r\nS_CentStaLab_1924#" (spawn_id exp6) match
regular expression "(Username|Login|login|user name):"? no
"[Pp]assword:"? no
"#"? yes
expect: set expect_out(0,string) "#"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) " ********\r\nS_CentStaLab_1924#"
send: sending "\r" to { exp6 }
expect: does "" (spawn_id exp6) match regular expression "[\r\n]+"? no
"^(.+:)1 #"? no
"^.+#"? no
"^.+> \(enable\)"? no
expect: does "\n" (spawn_id exp6) match regular expression "[\r\n]+"?
yes
expect: set expect_out(0,string) "\n"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "\n"
expect: continuing expect
expect: does "" (spawn_id exp6) match regular expression "[\r\n]+"? no
"^(.+:)1 #"? no
"^.+#"? no
"^.+> \(enable\)"? no
S_CentStaLab_1924#
expect: does "\rS_CentStaLab_1924#" (spawn_id exp6) match regular
expression "[\r\n]+"? yes
expect: set expect_out(0,string) "\r"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "\r"
expect: continuing expect
expect: does "S_CentStaLab_1924#" (spawn_id exp6) match regular
expression "[\r\n]+"? no
"^(.+:)1 #"? no
"^.+#"? yes
expect: set expect_out(0,string) "S_CentStaLab_1924#"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "S_CentStaLab_1924#"
send: sending "term length 0\r" to { exp6 }
expect: does "" (spawn_id exp6) match regular expression
"S_CentStaLab_1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?"? no
"[\n\r]+"? no
term length 0
^
% Invalid input detected at '^' marker.
expect: does "term length 0\n\r ^\r\n% Invalid
input detected at '^' marker.\r\n" (spawn_id exp6) match regular
expression "S_CentStaLab_1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?"? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\n\r"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "term length 0\n\r"
expect: continuing expect
expect: does " ^\r\n% Invalid input detected at
'^' marker.\r\n" (spawn_id exp6) match regular expression
"S_CentStaLab_1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?"? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) " ^\r\n"
expect: continuing expect
expect: does "% Invalid input detected at '^' marker.\r\n" (spawn_id
exp6) match regular expression
"S_CentStaLab_1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?"? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "% Invalid input detected at '^'
marker.\r\n"
expect: continuing expect
expect: does "" (spawn_id exp6) match regular expression
"S_CentStaLab_1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?"? no
"[\n\r]+"? no
S_CentStaLab_1924#
expect: does "S_CentStaLab_1924#" (spawn_id exp6) match regular
expression "S_CentStaLab_1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?"? yes
expect: set expect_out(0,string) "S_CentStaLab_1924#"
expect: set expect_out(1,string) "924"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "S_CentStaLab_1924#"
send: sending "show running\r" to { exp6 }
expect: does "" (spawn_id exp6) match regular expression "\u0008+"? no
"^[^\n\r *]*S_CentStaLab_1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?"? no
"^[^\n\r]*S_CentStaLab_1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?."? no
"[\n\r]+"? no
"[^\r\n]*Press <SPACE> to cont[^\r\n]*"? no
"^ *--More--[^\n\r]*"? no
"^<-+ More -+>[^\n\r]*"? no
expect: does "show running\n\rBuilding configuration...\r\nCurrent
configuration:\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\nhostname
"S_CentStaLab_1924"\r\n!\r\n!\r\n!\r\n!\r\nip address 172.16.29.40
255.255.255.0\r\nip default-gateway 172.16.29.1\r\n!\r\nno ip http
server\r\n!\r\nip http port 0\r\n!\r\nno snmp-server community
public\r\nsnmp-server community "m1ck3y" ro\r\n\r\n--More--\r\n"
(spawn_id exp6) match regular expression "\u0008+"? no
"^[^\n\r *]*S_CentStaLab_1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?"? no
"^[^\n\r]*S_CentStaLab_1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?."? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\n\r"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "show running\n\r"
show running
expect: continuing expect
expect: does "Building configuration...\r\nCurrent
configuration:\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\nhostname
"S_CentStaLab_1924"\r\n!\r\n!\r\n!\r\n!\r\nip address 172.16.29.40
255.255.255.0\r\nip default-gateway 172.16.29.1\r\n!\r\nno ip http
server\r\n!\r\nip http port 0\r\n!\r\nno snmp-server community
public\r\nsnmp-server community "m1ck3y" ro\r\n\r\n--More--\r\n"
(spawn_id exp6) match regular expression no
"^[^\n\r *]*S_CentStaLab_1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?"? no
"^[^\n\r]*S_CentStaLab_1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?."? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "!\r\n"
expect: continuing expect
expect: does "!\r\n!\r\n!\r\n!\r\n!\r\nhostname
"S_CentStaLab_1924"\r\n!\r\n!\r\n!\r\n!\r\nip address 172.16.29.40
255.255.255.0\r\nip default-gateway 172.16.29.1\r\n!\r\nno ip http
server\r\n!\r\nip http port 0\r\n!\r\nno snmp-server community
public\r\nsnmp-server community "m1ck3y" ro\r\n\r\n--More--\r\n"
(spawn_id exp6) match regular expression Building configuration...
Current configuration:
!
!
!
!
!
!
!
hostname "S_CentStaLab_1924"
!
!
!
!
ip address 172.16.29.40 255.255.255.0
ip default-gateway 172.16.29.1
!
no ip http server
!
ip http port 0
!
no snmp-server community public
snmp-server community "m1ck3y" ro
--More--
More information about the Rancid-discuss
mailing list