Skip to content

Commit ee8318d

Browse files
committed
Adding db_disconnect qualifying statement
1 parent 187a044 commit ee8318d

File tree

1 file changed

+3
-1
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1713,7 +1713,9 @@ def cmd_db_connect(*args)
17131713
cdb = conn.current_database
17141714
end
17151715
}
1716-
return print_status("#{framework.db.driver} already connected to #{cdb}")
1716+
status = "#{framework.db.driver} already connected to #{cdb}. "
1717+
status += "Run db_disconnect first if you wish to connect to a different database."
1718+
return print_status(status)
17171719
end
17181720
if (args[0] == "-y")
17191721
if (args[1] and not ::File.exists? ::File.expand_path(args[1]))

0 commit comments

Comments
 (0)