-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Adds a notification when initially entering a SQL shell within SQL session types #18931
Adds a notification when initially entering a SQL shell within SQL session types #18931
Conversation
69c787a
to
7de3d97
Compare
7de3d97
to
8c7a784
Compare
lib/rex/post/sql/ui/console.rb
Outdated
# Create prompt via client and session data | ||
# | ||
# @return [String] | ||
def prompt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this shadows the existing prompt method:
>> framework.sessions[1].console.method(:prompt)
=> #<Method: Rex::Post::PostgreSQL::Ui::Console(Rex::Ui::Text::Shell)#prompt() /Users/user/Documents/code/metasploit-framework/lib/rex/ui/text/shell.rb:290>
It looks like since you're not re-using this prompt
method in more than one place, it would be good to revert - otherwise existing code that want to call the expected prompt
method implementation will explode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops I had meant to add it above as well. I can just remove it and handle both instances with
#{session.type} @ #{client.peerinfo} (#{current_database}
If that works for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good; just remember to rename the method to something that doesn't currently exist already 👍
8c7a784
to
0fad7bb
Compare
Release NotesAdds additional help information when interacting with a SQL session |
This PR adds a notification when a user enters a SQL shell within SQL session types via the
query_interactive
command.The aim was to offer some basic information to the users upon entering the shell.
Verification
msfconsole
features set <session type> true
mysql_login
,mssql_login
,postgres_login
andsmb_login