Module: Msf::Auxiliary::ManageEngineXnode::Action
- Included in:
- Msf::Auxiliary::ManageEngineXnode, BasicChecks
- Defined in:
- lib/msf/core/auxiliary/manage_engine_xnode/action.rb
Instance Method Summary collapse
-
#action_admin_health ⇒ Hash
Returns an Xnode health status request hash.
-
#action_authenticate(user, pass) ⇒ Hash
Returns an Xnode authentication request hash.
-
#action_dr_search(repo_name, fields = nil, custom_query = nil) ⇒ Hash
Returns an Xnode DataRepository Search request hash.
-
#action_xnode_info ⇒ Hash
Returns an Xnode info request hash.
Instance Method Details
#action_admin_health ⇒ Hash
Returns an Xnode health status request hash
20 21 22 23 24 25 26 |
# File 'lib/msf/core/auxiliary/manage_engine_xnode/action.rb', line 20 def action_admin_health { "action" => "admin:/health", "de_health" => true, "request_id" => 1, } end |
#action_authenticate(user, pass) ⇒ Hash
Returns an Xnode authentication request hash
9 10 11 12 13 14 15 |
# File 'lib/msf/core/auxiliary/manage_engine_xnode/action.rb', line 9 def action_authenticate(user,pass) { "username" => user, "password" => pass, "action" => "session:/authenticate" } end |
#action_dr_search(repo_name, fields = nil, custom_query = nil) ⇒ Hash
Returns an Xnode DataRepository Search request hash
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/msf/core/auxiliary/manage_engine_xnode/action.rb', line 44 def action_dr_search(repo_name, fields=nil, custom_query=nil) time_gen_from = rand(0..10000000) # generate random Unix timestamp somewhere in 1970 (aka Epoch), used below as the "from" date, to ensure we get all data we want time_gen_to = Time.now.to_i + 100000 # take the current time and add 100,000 seconds (a little over a day) to rule out any issues arising from time zone differences query = { "action" => 'dr:/dr_search', "dr_name_list" => [repo_name], "query" => "TIME_GENERATED:[#{time_gen_from} TO #{time_gen_to}]", # this uses Unix Timestamp format "request_id" => 1, } # pass the fields (columns) to dump if possible if fields query['select_fields'] = fields end if custom_query query = query.merge(custom_query) end query end |
#action_xnode_info ⇒ Hash
Returns an Xnode info request hash
31 32 33 34 35 36 |
# File 'lib/msf/core/auxiliary/manage_engine_xnode/action.rb', line 31 def action_xnode_info { "action" => "admin:/xnode_info", "request_id" => 1, } end |