Class: Rex::Post::Meterpreter::Extensions::Priv::SamUser
- Inherits:
-
Object
- Object
- Rex::Post::Meterpreter::Extensions::Priv::SamUser
- Defined in:
- lib/rex/post/meterpreter/extensions/priv/passwd.rb
Overview
This class wraps a SAM hash entry.
Instance Attribute Summary collapse
-
#hash_string ⇒ Object
readonly
The raw hash string that was passed to the class constructor.
-
#lanman ⇒ Object
readonly
The LM hash.
-
#ntlm ⇒ Object
readonly
The NTLM hash.
-
#user_id ⇒ Object
readonly
The user’s unique identifier from the SAM database.
-
#user_name ⇒ Object
readonly
The username from the SAM database entry.
Instance Method Summary collapse
-
#initialize(hash_str) ⇒ SamUser
constructor
Initializes the class from a hash string like this:.
-
#to_s ⇒ Object
Returns the hash string that was supplied to the constructor.
Constructor Details
#initialize(hash_str) ⇒ SamUser
Initializes the class from a hash string like this:
- Administrator:500:aad3b435b51404eeaadfb435b51404ee:31d6cfe0d16de931b73c59d7e0c089c0:
22 23 24 25 26 |
# File 'lib/rex/post/meterpreter/extensions/priv/passwd.rb', line 22 def initialize(hash_str) self.user_name, self.user_id, self.lanman, self.ntlm = hash_str.split(/:/) self.hash_string = hash_str end |
Instance Attribute Details
#hash_string ⇒ Object
The raw hash string that was passed to the class constructor.
38 39 40 |
# File 'lib/rex/post/meterpreter/extensions/priv/passwd.rb', line 38 def hash_string @hash_string end |
#lanman ⇒ Object
The LM hash.
50 51 52 |
# File 'lib/rex/post/meterpreter/extensions/priv/passwd.rb', line 50 def lanman @lanman end |
#ntlm ⇒ Object
The NTLM hash.
54 55 56 |
# File 'lib/rex/post/meterpreter/extensions/priv/passwd.rb', line 54 def ntlm @ntlm end |
#user_id ⇒ Object
The user’s unique identifier from the SAM database.
46 47 48 |
# File 'lib/rex/post/meterpreter/extensions/priv/passwd.rb', line 46 def user_id @user_id end |
#user_name ⇒ Object
The username from the SAM database entry.
42 43 44 |
# File 'lib/rex/post/meterpreter/extensions/priv/passwd.rb', line 42 def user_name @user_name end |
Instance Method Details
#to_s ⇒ Object
Returns the hash string that was supplied to the constructor.
31 32 33 |
# File 'lib/rex/post/meterpreter/extensions/priv/passwd.rb', line 31 def to_s hash_string end |