diff --git a/lib/rex/post/postgresql/ui/console/command_dispatcher/client.rb b/lib/rex/post/postgresql/ui/console/command_dispatcher/client.rb index 5c7d2e7ad2e89..a06ea9b20f614 100644 --- a/lib/rex/post/postgresql/ui/console/command_dispatcher/client.rb +++ b/lib/rex/post/postgresql/ui/console/command_dispatcher/client.rb @@ -174,13 +174,6 @@ def cmd_query(*args) alias cmd_sql cmd_query alias cmd_sql_help cmd_query_help - def cmd_db_help - print_line 'Usage: db' - print_line - print_line 'View the databases available on the remote target.' - print_line - end - # # Open the Pry debugger on the current session # @@ -229,6 +222,11 @@ def cmd_db_help print_line end + def cmd_tables + tables = self.client.query('SELECT * FROM information_schema.tables;') + print_line format_result(tables).to_s + end + protected def print_no_db_selected