-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
Search command not working as intended for single letters #14922
Comments
I guess highlighting substring is the part where the problem occurs. I tried removing the colors in
to
and it works fine.
|
I can reproduce this, well spotted. Let us know if you're able to fix it :) |
Will it be okay to add a new gem 'colorize' for colors, which makes it very easy to add colors, bg colors, effect etc. |
@pingport80 We'd prefer not to depend on an additional gem for adding color support if possible. Just to add an extra data point though - the color functionality currently exists within Rex::Text, which can be found here: https://github.com/rapid7/rex-text/blob/4bfa153b34a4c1f2086ad990b57c7bf2f861f54b/lib/rex/text/color.rb It might be a good adding a unit test there and seeing if the bug lives in Rex::Text - rather than framework itself 🕵️ |
Okay I will try to fix it without additional gems. |
Summary
When some single letter arguments are being used with search command, some part of code is showing up in search results.
Recently I added one sort feature for search results. I thought this issue rose there but when I switched back to previous commits, I found this issue was present there too.
Steps to reproduce
./msfconsole
msf6 > search a eternal
Expected behavior
It should have shown results for the
eternal blue
vulnerability and whatever matchesa
.Current behavior
It's showing results for eternal blue with some code from background or garbage values with it.
Metasploit version
Additional Information
This error is coming when the following letters are included as text:
a
,b
,c
,l
,m
,r
Also when I do
![search_error_msf](https://user-images.githubusercontent.com/43883877/111873344-e3de1380-89b5-11eb-9d31-033a34eafb4f.png)
search eternal g
, the search never finishes. It starts using 100% CPU and ram usage keep on increasing with time.OS
Kali 2020.2 (Pulled From Github)
Parrot 4.10 (Installed by Default)
The text was updated successfully, but these errors were encountered: