Skip to content

Commit 1ce1cdf

Browse files
committed
Merge pull request rapid7#1118 from rapid7/bugs/rm7553-uncached-modules-search
Bugs/rm7553 uncached modules search
2 parents 4bc1159 + 7f822fa commit 1ce1cdf

File tree

1 file changed

+5
-2
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+5
-2
lines changed

lib/msf/ui/console/command_dispatcher/core.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,10 +1335,13 @@ def cmd_search(*args)
13351335
}
13361336

13371337
if framework.db and framework.db.migrated and framework.db.modules_cached
1338-
return search_modules_sql(match)
1338+
sql_results = search_modules_sql(match)
1339+
return sql_results if sql_results # Patches around #7553
1340+
else
1341+
print_warning("Database not connected or cache not built.")
13391342
end
13401343

1341-
print_error("Warning: database not connected or cache not built, falling back to slow search")
1344+
print_warning("Falling back to slow search.")
13421345

13431346
tbl = generate_module_table("Matching Modules")
13441347
[

0 commit comments

Comments
 (0)