Class: Rex::Proto::Kerberos::Pac::Element
- Inherits:
-
Object
- Object
- Rex::Proto::Kerberos::Pac::Element
- Includes:
- Crypto, Rex::Proto::Kerberos::Pac
- Defined in:
- lib/rex/proto/kerberos/pac/element.rb
Direct Known Subclasses
ClientInfo, LogonInfo, PrivSvrChecksum, ServerChecksum, Type
Constant Summary
Constants included from Rex::Proto::Kerberos::Pac
AD_WIN2K_PAC, DEFAULT_USER_SID, DOMAIN_USERS, NETLOGON_FLAG, NEVER_EXPIRE, NT_AUTHORITY_SID, PAC_CLIENT_INFO, PAC_LOGON_INFO, PAC_PRIVSVR_CHECKSUM, PAC_SERVER_CHECKSUM, SEC_TO_UNIX_EPOCH, SE_GROUP_ALL, SE_GROUP_ENABLED, SE_GROUP_ENABLED_BY_DEFAULT, SE_GROUP_MANDATORY, USER_DONT_EXPIRE_PASSWORD, USER_NORMAL_ACCOUNT, VERSION, WINDOWS_TICK
Constants included from Crypto
Crypto::ENC_AS_RESPONSE, Crypto::ENC_KDC_REQUEST_BODY, Crypto::ENC_TGS_RESPONSE, Crypto::RC4_HMAC, Crypto::RSA_MD5
Class Method Summary collapse
- .attr_accessor(*vars) ⇒ Object
-
.attributes ⇒ Array
Retrieves the element class fields.
Instance Method Summary collapse
-
#attributes ⇒ Array
Retrieves the element instance fields.
-
#encode ⇒ Object
Encodes the Rex::Proto::Kerberos::Pac::Element into an String.
-
#initialize(options = {}) ⇒ Element
constructor
A new instance of Element.
Methods included from Crypto::RsaMd5
Methods included from Crypto::Rc4Hmac
#decrypt_rc4_hmac, #encrypt_rc4_hmac
Constructor Details
#initialize(options = {}) ⇒ Element
Returns a new instance of Element.
25 26 27 28 29 30 31 32 |
# File 'lib/rex/proto/kerberos/pac/element.rb', line 25 def initialize( = {}) self.class.attributes.each do |attr| if .has_key?(attr) m = (attr.to_s + '=').to_sym self.send(m, [attr]) end end end |
Class Method Details
.attr_accessor(*vars) ⇒ Object
12 13 14 15 16 |
# File 'lib/rex/proto/kerberos/pac/element.rb', line 12 def self.attr_accessor(*vars) @attributes ||= [] @attributes.concat vars super(*vars) end |
.attributes ⇒ Array
Retrieves the element class fields
21 22 23 |
# File 'lib/rex/proto/kerberos/pac/element.rb', line 21 def self.attributes @attributes end |
Instance Method Details
#attributes ⇒ Array
Retrieves the element instance fields
37 38 39 |
# File 'lib/rex/proto/kerberos/pac/element.rb', line 37 def attributes self.class.attributes end |
#encode ⇒ Object
Encodes the Rex::Proto::Kerberos::Pac::Element into an String. This method has been designed to be overridden by subclasses.
45 46 47 |
# File 'lib/rex/proto/kerberos/pac/element.rb', line 45 def encode raise ::NoMethodError, 'Method designed to be overridden' end |