Sha256: c80d979234cee518263fcc62946073c4ccaf2382671b07eb6083362eba8de6fc

Contents?: true

Size: 1009 Bytes

Versions: 43

Compression:

Stored size: 1009 Bytes

Contents

#!/usr/bin/env ruby

module Rex
module Post
module Meterpreter
module Extensions
module Priv

###
#
# This class wraps a SAM hash entry.
#
###
class SamUser

	#
	# Initializes the class from a hash string like this:
	#
	# Administrator:500:aad3b435b51404eeaadfb435b51404ee:31d6cfe0d16de931b73c59d7e0c089c0:::
	#
	def initialize(hash_str)
		self.user_name, self.user_id, self.lanman, self.ntlm = hash_str.split(/:/)

		self.hash_string = hash_str
	end

	#
	# Returns the hash string that was supplied to the constructor.
	#
	def to_s
		hash_string
	end

	#
	# The raw hash string that was passed to the class constructor.
	#
	attr_reader :hash_string
	#
	# The username from the SAM database entry.
	#
	attr_reader :user_name
	#
	# The user's unique identifier from the SAM database.
	#
	attr_reader :user_id
	#
	# The LM hash.
	#
	attr_reader :lanman
	#
	# The NTLM hash.
	#
	attr_reader :ntlm

protected

	attr_writer :hash_string, :user_name, :user_id, :lanman, :ntlm # :nodoc:

end

end; end; end; end; end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
librex-0.0.65 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.63 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.54 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.53 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.52 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.51 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.50 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.49 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.48 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.47 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.46 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.44 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.43 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.42 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.41 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.40 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.39 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.38 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.37 lib/rex/post/meterpreter/extensions/priv/passwd.rb
librex-0.0.36 lib/rex/post/meterpreter/extensions/priv/passwd.rb