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

Fix crash when running the favorites command #18619

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/msf/ui/console/command_dispatcher/modules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,7 @@ def cmd_favorites_help
print_line 'Usage: favorites'
print_line
print_line 'Print the list of favorite modules (alias for `show favorites`)'
print_line 'You can use the %grnfavorite%clr command to add the current module to your favorites list'
print @@favorites_opts.usage
end

Expand Down Expand Up @@ -1570,7 +1571,7 @@ def show_favorites # :nodoc:
end
@module_search_results = filtered_results.flatten.sort_by(&:fullname)
end
@module_search_results_with_usage_metadata = @module_search_results
@module_search_results_with_usage_metadata = @module_search_results.map { |mod| { mod: mod, datastore: {} } }

show_module_metadata('Favorites', fav_modules)
print_module_search_results_usage
Expand Down