Class: Msf::WebServices::JsonRpcApp

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/msf/core/web_services/json_rpc_app.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.setup_default_middleware(builder) ⇒ Object


96
97
98
99
100
101
# File 'lib/msf/core/web_services/json_rpc_app.rb', line 96

def self.setup_default_middleware(builder)
  super
  # Insertion at pos 1 needed to immediately follow Sinatra::ExtendedBase
  # proc block identical to one used in 'use' method lib/rack/builder:86
  builder.instance_variable_get(:@use).insert(1, proc { |app| JsonRpcExceptionHandling::RackMiddleware.new(app) })
end

Instance Method Details

#db_initialized(db) ⇒ Object


89
90
91
92
93
94
# File 'lib/msf/core/web_services/json_rpc_app.rb', line 89

def db_initialized(db)
  db.check
  true
rescue
  false
end