From 2737bb876c81ac2d0da447429fc15859ba174445 Mon Sep 17 00:00:00 2001 From: Alexander Zangerl Date: Wed, 4 Oct 2017 13:20:14 +1000 Subject: [PATCH] fix for #25, cisco/hp/pb login failure on hp procurve because of (unused) prompt basic --- lib/Net/CLI/Interact/phrasebook/cisco/hp/pb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/Net/CLI/Interact/phrasebook/cisco/hp/pb b/lib/Net/CLI/Interact/phrasebook/cisco/hp/pb index e34767a..d52cee7 100644 --- a/lib/Net/CLI/Interact/phrasebook/cisco/hp/pb +++ b/lib/Net/CLI/Interact/phrasebook/cisco/hp/pb @@ -1,8 +1,15 @@ +# phrasebook for hp devices with cli, e.g. hp procurve + +# hp cli: outputs ansi escapes, before and after the prompt...apparently not possible to disable? +# privileged and configure prompt cannot be inherited from cisco pb for that reason prompt generic - match /[\/a-zA-Z0-9._:-]+ ?(?:\(config[^)]*\))? ?[#>] ?$/ + match /[\/a-zA-Z0-9._:-]+ ?(?:\(config[^)]*\))? ?[#>] ?(?:\x1b\[[0-9;\?]*[A-KSTfhilmnrs])*$/ + +prompt privileged + match /# ?(?:\x1b\[[0-9;\?]*[A-KSTfhilmnrs])*$/ -prompt basic - match /: ?$/ +prompt configure + match /\(config[^)]*\)# ?(?:\x1b\[[0-9;\?]*[A-KSTfhilmnrs])*$/ prompt user match /login as: ?$/ @@ -13,6 +20,3 @@ macro enable_paging macro disable_paging send no page -# legacy support -prompt prompt - match /[\/a-zA-Z0-9._:-]+ ?(?:\(config[^)]*\))? ?[#>] ?$/