Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reline behind a feature flag #19559

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

Conversation

sjanusz-r7
Copy link
Contributor

@sjanusz-r7 sjanusz-r7 commented Oct 15, 2024

This PR is a continuation of #19397

This PR adds in the usage of the Reline library behind a feature flag.

Reline currently has some bugs/issues/inconsistencies compared to Readline. These are tracked as issue reports on Reline's GitHub.
These include:

  • Using IO's object encoding to not have to set the encoding globally
  • Tab completion append character only being appended when no more completions exist
  • Being able to change the completion append character in the completion proc (monkeypatched)
  • being able to perform multiple tab completions in a row with different values

We are moving away from Readline in favor if a pure Ruby implementation.
We are having to remove Readline on newer Windows 11 hosts due to an issue that Reline also encountered (and fixed since), where the console output handle would sometimes be incorrect, likely after calling popen, thus calls to console APIs such as SetConsoleCursorPosition would fail. A workaround is to periodically refresh the handle variable by calling handle = GetStdHandle.call(-11) // for STDOUT.

Verification

  • WIP

@sjanusz-r7 sjanusz-r7 force-pushed the readline-to-reline-behind-feature-flag branch 8 times, most recently from 1f24c46 to 879750b Compare October 17, 2024 10:42
@sjanusz-r7 sjanusz-r7 changed the title wip: Reline behind a feature flag Reline behind a feature flag Oct 17, 2024
@sjanusz-r7 sjanusz-r7 marked this pull request as ready for review October 17, 2024 12:50
@sjanusz-r7 sjanusz-r7 marked this pull request as draft October 17, 2024 14:05
@sjanusz-r7 sjanusz-r7 marked this pull request as ready for review October 17, 2024 14:16
lib/msf/ui/console/driver.rb Outdated Show resolved Hide resolved
lib/msf_autoload.rb Outdated Show resolved Hide resolved
@sjanusz-r7 sjanusz-r7 marked this pull request as draft October 18, 2024 10:43
@sjanusz-r7 sjanusz-r7 force-pushed the readline-to-reline-behind-feature-flag branch 2 times, most recently from 7753956 to 6fb1316 Compare October 21, 2024 09:36
@sjanusz-r7 sjanusz-r7 marked this pull request as ready for review October 21, 2024 09:44
@sjanusz-r7 sjanusz-r7 force-pushed the readline-to-reline-behind-feature-flag branch from 6fb1316 to d2b887e Compare October 21, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants