Module: Msf::Post::Solaris::Kernel
- Includes:
- Common
- Defined in:
- lib/msf/core/post/solaris/kernel.rb
Instance Method Summary collapse
-
#kernel_hardware ⇒ String
Returns the kernel hardware.
-
#kernel_name ⇒ String
Returns the kernel name.
-
#kernel_release ⇒ String
Returns the kernel release.
-
#kernel_version ⇒ String
Returns the kernel version.
-
#uname(opts = '-a') ⇒ String
Returns uname output.
Methods included from Common
#clear_screen, #cmd_exec, #cmd_exec_get_pid, #cmd_exec_with_result, #command_exists?, #create_process, #get_env, #get_envs, #initialize, #peer, #report_virtualization, #rhost, #rport
Instance Method Details
#kernel_hardware ⇒ String
Returns the kernel hardware
52 53 54 |
# File 'lib/msf/core/post/solaris/kernel.rb', line 52 def kernel_hardware uname('-m') end |
#kernel_name ⇒ String
Returns the kernel name
43 44 45 |
# File 'lib/msf/core/post/solaris/kernel.rb', line 43 def kernel_name uname('-s') end |
#kernel_release ⇒ String
Returns the kernel release
25 26 27 |
# File 'lib/msf/core/post/solaris/kernel.rb', line 25 def kernel_release uname('-r') end |
#kernel_version ⇒ String
Returns the kernel version
34 35 36 |
# File 'lib/msf/core/post/solaris/kernel.rb', line 34 def kernel_version uname('-v') end |
#uname(opts = '-a') ⇒ String
Returns uname output
14 15 16 17 18 |
# File 'lib/msf/core/post/solaris/kernel.rb', line 14 def uname(opts='-a') cmd_exec("uname #{opts}").to_s.strip rescue raise "Failed to run uname #{opts}" end |