1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
prompt generic
match /[\/a-zA-Z0-9._\[\]-]+ ?(?:\(config[^)]*\))? ?[#>] ?$/
prompt basic
match /> ?$/
prompt privileged
match /# ?$/
prompt configure
match /\(config[^)]*\)# ?$/
prompt user
match /[Uu]sername/
prompt pass
match /[Pp]assword: ?$/
# MACROS
macro begin_privileged
send enable
match user or pass or privileged
macro end_privileged
send disable
match basic
macro begin_configure
send configure terminal
match configure
macro end_configure
send exit
match privileged
macro disconnect
send exit
match generic
# macro completion
# send ?
# legacy support
prompt prompt
match /[\/a-zA-Z0-9._\[\]-]+ ?(?:\(config[^)]*\))? ?[#>] ?$/
|