You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where I believe the remaining buffer after a matched expect is tripping up my processing for next.
I'm using ExpectIt with SSHJ to handle password expiry. In this use case, against OpenSSH, when the initial connect is made "passwd" is activated server-side.
The issue (for me) is that passwd issues error and instructions lines like:
BAD PASSWORD: The password fails the dictionary check - it is based on a dictionary word
New password:
Currently I am matching on "BAD PASSWORD" so that I can feed back info to the user - however if I feed in next entered password in then password responds with
Retype new password:
...which is reasonable, but at this point the buffer is:
The password fails the dictionary check - it is based on a dictionary word
New password:
Retype new password:
...(i.e. with the "BAD PASSWORD" removed and the left over "New password" indicates first password - whereas "Retype new password" indicates second.
So is it possible to add a "flush()" method to allow controlling the buffer before sending the password? I have done this in a cloned version using the following - which works well, but I may not have considered all threading implications and attributes.
I have a use case where I believe the remaining buffer after a matched expect is tripping up my processing for next.
I'm using ExpectIt with SSHJ to handle password expiry. In this use case, against OpenSSH, when the initial connect is made "passwd" is activated server-side.
The issue (for me) is that passwd issues error and instructions lines like:
Currently I am matching on "BAD PASSWORD" so that I can feed back info to the user - however if I feed in next entered password in then password responds with
...which is reasonable, but at this point the buffer is:
...(i.e. with the "BAD PASSWORD" removed and the left over "New password" indicates first password - whereas "Retype new password" indicates second.
So is it possible to add a "flush()" method to allow controlling the buffer before sending the password? I have done this in a cloned version using the following - which works well, but I may not have considered all threading implications and attributes.
In SingleInputExpect
and in ExpectImpl
The text was updated successfully, but these errors were encountered: