Skip to content

Commit

Permalink
Don't monkey patch RbReadline multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanusz-r7 committed Oct 18, 2024
1 parent 02dd5ac commit 7dc918f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/msf/ui/console/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ def choose_readline(opts)
# Only Windows requires a monkey-patched RbReadline
return unless Rex::Compat.is_windows

if defined?(::RbReadline)
if defined?(::RbReadline) && !defined?(RbReadline.refresh_console_handle)
::RbReadline.instance_eval do
class << self
alias_method :old_rl_move_cursor_relative, :_rl_move_cursor_relative
Expand Down

0 comments on commit 7dc918f

Please sign in to comment.