We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dda8766 commit 797b5d0Copy full SHA for 797b5d0
lib/msf/core/db_manager/vuln.rb
@@ -168,7 +168,7 @@ def report_vuln(opts)
168
sname = opts[:proto]
169
end
170
171
- service = host.services.find_or_create_by_port_and_proto(opts[:port].to_i, proto)
+ service = host.services.where(port: opts[:port].to_i, proto: proto).first_or_create
172
173
174
# Try to find an existing vulnerability with the same service & references
lib/msf/core/db_manager/workspace.rb
@@ -4,7 +4,7 @@ module Msf::DBManager::Workspace
4
#
5
def add_workspace(name)
6
::ActiveRecord::Base.connection_pool.with_connection {
7
- ::Mdm::Workspace.find_or_create_by_name(name)
+ ::Mdm::Workspace.where(name: name).first_or_create
8
}
9
10
0 commit comments