Complete services GET
parent
bbd25fc97b
commit
3c9092f9a6
|
@ -16,7 +16,7 @@ module ServiceServlet
|
|||
def self.get_services
|
||||
lambda {
|
||||
begin
|
||||
opts = parse_json_request(request, false)
|
||||
opts = params.symbolize_keys
|
||||
data = get_db().services(opts[:workspace],
|
||||
opts[:only_up],
|
||||
opts[:proto],
|
||||
|
|
|
@ -117,6 +117,10 @@ module Msf::DBManager::Service
|
|||
|
||||
# Returns a list of all services in the database
|
||||
def services(wspace = workspace, only_up = false, proto = nil, addresses = nil, ports = nil, names = nil)
|
||||
if wspace.kind_of? String
|
||||
wspace = find_workspace(wspace)
|
||||
end
|
||||
|
||||
::ActiveRecord::Base.connection_pool.with_connection {
|
||||
conditions = {}
|
||||
conditions[:state] = [Msf::ServiceState::Open] if only_up
|
||||
|
|
Loading…
Reference in New Issue