mirror of
https://github.com/hansjone/netx.git
synced 2026-10-11 05:43:20 +08:00
feat(ne-exec): allow ping and ping6 on managed NE CLI path
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
06a5615095
commit
9a39ddfcc7
3 changed files with 9 additions and 6 deletions
|
|
@ -30,8 +30,8 @@ _BLOCKED_RE = re.compile(
|
|||
r")"
|
||||
)
|
||||
|
||||
# Only vendor read-only query verbs (Cisco show / Huawei-ZTE display).
|
||||
_ALLOWED_PREFIX_RE = re.compile(r"(?i)^(show\s|display\s)")
|
||||
# Read-only CLI: show/display plus ping reachability checks.
|
||||
_ALLOWED_PREFIX_RE = re.compile(r"(?i)^(show\s|display\s|ping\s|ping6\s)")
|
||||
|
||||
# Unicode / C1 line separators that can smuggle a second CLI after a show prefix.
|
||||
_FORBIDDEN_LINE_SEPARATORS = ("\u2028", "\u2029", "\x85", "\x0b", "\x0c")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue