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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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

wants to merge 1 commit into from

Conversation

cbachert
Copy link

@cbachert cbachert commented Aug 9, 2018

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