parent
dda87667c9
commit
797b5d0d55
|
@ -168,7 +168,7 @@ module Msf::DBManager::Vuln
|
|||
sname = opts[:proto]
|
||||
end
|
||||
|
||||
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
|
||||
end
|
||||
|
||||
# Try to find an existing vulnerability with the same service & references
|
||||
|
|
|
@ -4,7 +4,7 @@ module Msf::DBManager::Workspace
|
|||
#
|
||||
def add_workspace(name)
|
||||
::ActiveRecord::Base.connection_pool.with_connection {
|
||||
::Mdm::Workspace.find_or_create_by_name(name)
|
||||
::Mdm::Workspace.where(name: name).first_or_create
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue