Skip to content
This repository was archived by the owner on Mar 28, 2022. It is now read-only.

Config may contain "#", identify prompt by " # " instead of "#"#32

Open
cbachert wants to merge 1 commit into
spotify:masterfrom
cbachert:31-handle-hash
Open

Config may contain "#", identify prompt by " # " instead of "#"#32
cbachert wants to merge 1 commit into
spotify:masterfrom
cbachert:31-handle-hash

Conversation

@cbachert

@cbachert cbachert commented Aug 9, 2018

Copy link
Copy Markdown

See #31, prompt recognition in pyFG/fortios.py is done with line.split('#'), but the "#" character may also be part of the configuration which can lead to false prompt recognitions.

The CLI prompt in FortiOS 5.2, 5.6 and 6.0 looks as follows (whitespace marked with "_"):
<hostname>_#_

So instead of matching with line.split('#') this could be matched with line.split(' # ').

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant