Class: Msf::WebServices::MetasploitApiApp

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

Instance Method Summary collapse

Instance Method Details

#initial_account_creation?Boolean

Whether the request is the one that creates a user account, which is the only request permitted to run unauthenticated before any account exists.

Returns:

  • (Boolean)

    true if the request creates a user account; otherwise, false.



92
93
94
# File 'lib/msf/core/web_services/metasploit_api_app.rb', line 92

def 
  request.post? && request.path_info.chomp('/') == Msf::WebServices::UserServlet.api_path
end