diff --git a/lib/msf/ui/console/command_dispatcher/core.rb b/lib/msf/ui/console/command_dispatcher/core.rb index 6a74e189e9..39fa0b58aa 100644 --- a/lib/msf/ui/console/command_dispatcher/core.rb +++ b/lib/msf/ui/console/command_dispatcher/core.rb @@ -1335,10 +1335,13 @@ class Core } if framework.db and framework.db.migrated and framework.db.modules_cached - return search_modules_sql(match) + sql_results = search_modules_sql(match) + return sql_results if sql_results # Patches around #7553 + else + print_warning("Database not connected or cache not built.") end - print_error("Warning: database not connected or cache not built, falling back to slow search") + print_warning("Falling back to slow search.") tbl = generate_module_table("Matching Modules") [