Module: Msf::Exploit::Remote::HTTP::Splunk::URIs
- Included in:
- Msf::Exploit::Remote::HTTP::Splunk
- Defined in:
- lib/msf/core/exploit/remote/http/splunk/uris.rb
Overview
Module with methods for commonly used splunk URLs
Instance Method Summary collapse
-
#splunk_apps_url ⇒ String
Returns the URL for the Splunk local apps management page.
-
#splunk_dashboard_create_api_url(namespace) ⇒ String
Returns the Splunk API URL for creating or managing dashboards in the specified namespace.
-
#splunk_dashboard_delete_api_url(namespace, name) ⇒ String
Returns the Splunk API URL for deleting a dashboard in the specified namespace.
-
#splunk_dashboard_pdf_export_api_url(namespace, name) ⇒ String
Returns the Splunk API URL used for exporting a dashboard to PDF.
-
#splunk_home ⇒ String
Returns the URL for splunk home page.
-
#splunk_search_api_url(namespace = 'search') ⇒ String
Returns the URL for splunk search api.
-
#splunk_upload_url ⇒ String
Returns the URL for splunk upload page.
-
#splunk_url_login ⇒ String
Returns the Splunk Login URL.
-
#splunk_user_page(username = nil) ⇒ String
Returns the Splunk URL for the user’s page.
Instance Method Details
#splunk_apps_url ⇒ String
Returns the URL for the Splunk local apps management page
38 39 40 |
# File 'lib/msf/core/exploit/remote/http/splunk/uris.rb', line 38 def splunk_apps_url normalize_uri(target_uri.path, 'en-US', 'manager', 'search', 'apps', 'local') end |
#splunk_dashboard_create_api_url(namespace) ⇒ String
Returns the Splunk API URL for creating or managing dashboards in the specified namespace
54 55 56 |
# File 'lib/msf/core/exploit/remote/http/splunk/uris.rb', line 54 def splunk_dashboard_create_api_url(namespace) normalize_uri(target_uri.path, 'en-US', 'splunkd', '__raw', 'servicesNS', 'admin', namespace, 'data', 'ui', 'views') end |
#splunk_dashboard_delete_api_url(namespace, name) ⇒ String
Returns the Splunk API URL for deleting a dashboard in the specified namespace
72 73 74 |
# File 'lib/msf/core/exploit/remote/http/splunk/uris.rb', line 72 def splunk_dashboard_delete_api_url(namespace, name) normalize_uri(target_uri.path, 'en-US', 'splunkd', '__raw', 'servicesNS', 'admin', namespace, 'data', 'ui', 'views', name) end |
#splunk_dashboard_pdf_export_api_url(namespace, name) ⇒ String
Returns the Splunk API URL used for exporting a dashboard to PDF
63 64 65 |
# File 'lib/msf/core/exploit/remote/http/splunk/uris.rb', line 63 def splunk_dashboard_pdf_export_api_url(namespace, name) normalize_uri(target_uri.path, 'en-US', 'splunkd', '__raw', 'services', 'pdfgen', 'render') end |
#splunk_home ⇒ String
Returns the URL for splunk home page
24 25 26 |
# File 'lib/msf/core/exploit/remote/http/splunk/uris.rb', line 24 def splunk_home normalize_uri(target_uri.path, 'en-US', 'app', 'launcher', 'home') end |
#splunk_search_api_url(namespace = 'search') ⇒ String
Returns the URL for splunk search api
46 47 48 |
# File 'lib/msf/core/exploit/remote/http/splunk/uris.rb', line 46 def splunk_search_api_url(namespace = 'search') normalize_uri(target_uri.path, 'en-US', 'splunkd', '__raw', 'servicesNS', 'admin', namespace, 'search', 'jobs') end |
#splunk_upload_url ⇒ String
Returns the URL for splunk upload page
31 32 33 |
# File 'lib/msf/core/exploit/remote/http/splunk/uris.rb', line 31 def splunk_upload_url normalize_uri(target_uri.path, 'en-US', 'manager', 'appinstall', '_upload') end |
#splunk_url_login ⇒ String
Returns the Splunk Login URL
8 9 10 |
# File 'lib/msf/core/exploit/remote/http/splunk/uris.rb', line 8 def splunk_url_login normalize_uri(target_uri.path, 'en-US', 'account', 'login') end |
#splunk_user_page(username = nil) ⇒ String
Returns the Splunk URL for the user’s page
16 17 18 19 |
# File 'lib/msf/core/exploit/remote/http/splunk/uris.rb', line 16 def splunk_user_page(username = nil) username = datastore['USERNAME'] if username.nil? normalize_uri(target_uri.path, 'en-US', 'splunkd', '__raw', 'services', 'authentication', 'users', username) end |