Method: Msf::Post::Windows::Priv#is_in_admin_group?
- Defined in:
- lib/msf/core/post/windows/priv.rb
#is_in_admin_group? ⇒ Boolean
Returns true if in the administrator group
110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/msf/core/post/windows/priv.rb', line 110 def is_in_admin_group? whoami = get_whoami if whoami.nil? print_error('Unable to identify admin group membership') return nil elsif whoami.include? ADMINISTRATORS_SID return true else return false end end |