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

#_read_file_meterpreter, #_unix_max_line_length, #_write_file_unix_shell, #append_file, #attributes, #cd, #chmod, #dir, #directory?, #executable?, #exist?, #expand_path, #exploit_data, #file?, #file_local_write, #file_remote_digestmd5, #file_remote_digestsha1, #file_remote_digestsha2, #immutable?, #mkdir, #pwd, #read_file, #readable?, #rename_file, #rm_f, #rm_rf, #setuid?, #upload_and_chmodx, #upload_file, #writable?, #write_file

Methods included from Common

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

Instance Method Details

#get_build_propHash

Returns system information from build.prop.

Returns:

  • (Hash)

    System information.


18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/msf/core/post/android/system.rb', line 18

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