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
The raw hash string that was passed to the class constructor.
-
#lanman ⇒ Object
The LM hash.
-
#ntlm ⇒ Object
The NTLM hash.
-
#user_id ⇒ Object
The user’s unique identifier from the SAM database.
-
#user_name ⇒ Object
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:
21 22 23 24 25 |
# File 'lib/rex/post/meterpreter/extensions/priv/passwd.rb', line 21 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.
37 38 39 |
# File 'lib/rex/post/meterpreter/extensions/priv/passwd.rb', line 37 def hash_string @hash_string end |
#lanman ⇒ Object
The LM hash.
49 50 51 |
# File 'lib/rex/post/meterpreter/extensions/priv/passwd.rb', line 49 def lanman @lanman end |
#ntlm ⇒ Object
The NTLM hash.
53 54 55 |
# File 'lib/rex/post/meterpreter/extensions/priv/passwd.rb', line 53 def ntlm @ntlm end |
#user_id ⇒ Object
The user’s unique identifier from the SAM database.
45 46 47 |
# File 'lib/rex/post/meterpreter/extensions/priv/passwd.rb', line 45 def user_id @user_id end |
#user_name ⇒ Object
The username from the SAM database entry.
41 42 43 |
# File 'lib/rex/post/meterpreter/extensions/priv/passwd.rb', line 41 def user_name @user_name end |
Instance Method Details
#to_s ⇒ Object
Returns the hash string that was supplied to the constructor.
30 31 32 |
# File 'lib/rex/post/meterpreter/extensions/priv/passwd.rb', line 30 def to_s hash_string end |