Module: Msf::Post::Android::System

Includes:
Common, File
Defined in:
lib/msf/core/post/android/system.rb

Instance Method Summary collapse

Methods included from File

#_append_file_powershell, #_append_file_unix_shell, #_can_echo?, #_read_file_meterpreter, #_read_file_powershell, #_read_file_powershell_fragment, #_shell_command_with_success_code, #_unix_max_line_length, #_win_ansi_append_file, #_win_ansi_write_file, #_win_bin_append_file, #_win_bin_write_file, #_write_file_meterpreter, #_write_file_powershell, #_write_file_powershell_fragment, #_write_file_unix_shell, #append_file, #attributes, #cd, #chmod, #copy_file, #dir, #directory?, #executable?, #exist?, #expand_path, #exploit_data, #exploit_source, #file?, #file_local_write, #file_remote_digestmd5, #file_remote_digestsha1, #file_remote_digestsha2, #immutable?, #initialize, #mkdir, #pwd, #read_file, #readable?, #rename_file, #rm_f, #rm_rf, #setuid?, #stat, #upload_and_chmodx, #upload_file, #writable?, #write_file

Methods included from Common

#clear_screen, #cmd_exec, #cmd_exec_get_pid, #cmd_exec_with_result, #command_exists?, #get_env, #get_envs, #initialize, #peer, #report_virtualization, #rhost, #rport

Instance Method Details

#get_build_propHash

Returns system information from build.prop.

Returns:

  • (Hash)

    System information.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/msf/core/post/android/system.rb', line 14

def get_build_prop
  sys_data   = {}
  build_prop = cmd_exec('cat /system/build.prop')

  return sys_data if build_prop.blank?

  build_prop.scan(/(.+)=(.+)/i).collect {|e| Hash[*e]}.each do |setting|
    sys_data.merge!(setting)
  end

  return sys_data
end