Path: blob/master/lib/rex/post/meterpreter/extensions/priv/passwd.rb
19500 views
# -*- coding: binary -*-12module Rex3module Post4module Meterpreter5module Extensions6module Priv78###9#10# This class wraps a SAM hash entry.11#12###13class SamUser1415#16# Initializes the class from a hash string like this:17#18# Administrator:500:aad3b435b51404eeaadfb435b51404ee:31d6cfe0d16de931b73c59d7e0c089c0:::19#20def initialize(hash_str)21self.user_name, self.user_id, self.lanman, self.ntlm = hash_str.split(':')2223self.hash_string = hash_str24end2526#27# Returns the hash string that was supplied to the constructor.28#29def to_s30hash_string31end3233#34# The raw hash string that was passed to the class constructor.35#36attr_reader :hash_string37#38# The username from the SAM database entry.39#40attr_reader :user_name41#42# The user's unique identifier from the SAM database.43#44attr_reader :user_id45#46# The LM hash.47#48attr_reader :lanman49#50# The NTLM hash.51#52attr_reader :ntlm5354protected5556attr_writer :hash_string, :user_name, :user_id, :lanman, :ntlm # :nodoc:5758end5960end; end; end; end; end616263