Mirror of metasploit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

parser.rb 1.1KB

1234567891011121314151617181920212223242526272829303132333435
  1. # -*- coding: binary -*-
  2. module Msf
  3. module Java
  4. module Rmi
  5. module Client
  6. module Jmx
  7. module Server
  8. module Parser
  9. # Parses a javax/management/remote/rmi/RMIServer_Stub#newClient() return value
  10. # to find out the remote reference information.
  11. #
  12. # @param return_value [Rex::Java::Serialization::Model::ReturnValue]
  13. # @return [Hash, NilClass] The remote interface information if success, nil otherwise
  14. def parse_jmx_new_client_endpoint(return_value)
  15. values_size = return_value.value.length
  16. end_point_block_data = return_value.value[values_size - 2]
  17. unless end_point_block_data.is_a?(Rex::Java::Serialization::Model::BlockData)
  18. return nil
  19. end
  20. return_io = StringIO.new(end_point_block_data.contents, 'rb')
  21. reference = extract_reference(return_io)
  22. reference
  23. end
  24. end
  25. end
  26. end
  27. end
  28. end
  29. end
  30. end