Class: Rex::Proto::Kerberos::Model::KdcResponse
- Defined in:
- lib/rex/proto/kerberos/model/kdc_response.rb
Overview
This class provides a representation of a Kerberos KDC-REP (response) data definition
Constant Summary
Constants included from Rex::Proto::Kerberos::Model
AP_REP, AP_REQ, AS_REP, AS_REQ, AUTHENTICATOR, ENC_AP_REP_PART, ENC_KRB_CRED_PART, KRB_CRED, KRB_ERROR, TGS_REP, TGS_REQ, TICKET, VERSION
Instance Attribute Summary collapse
-
#cname ⇒ Rex::Proto::Kerberos::Model::PrincipalName
The name part of the client’s principal identifier.
-
#crealm ⇒ String
The realm part of the client’s principal identifier.
-
#enc_part ⇒ Rex::Proto::Kerberos::Model::EncryptedData
The encrypted part of the response.
-
#msg_type ⇒ Integer
The type of a protocol message.
-
#pa_data ⇒ Array<Rex::Proto::Kerberos::Model::PreAuthDataEntry>?
An array of PreAuthDataEntry.
-
#pvno ⇒ Integer
The protocol version number.
-
#ticket ⇒ Rex::Proto::Kerberos::Model::Ticket
The issued ticket.
Instance Method Summary collapse
-
#decode(input) ⇒ self
Decodes the Rex::Proto::Kerberos::Model::KdcResponse from an input.
-
#encode ⇒ Object
Rex::Proto::Kerberos::Model::KdcResponse encoding isn’t supported.
Methods inherited from Element
attr_accessor, attributes, #attributes, decode, #initialize
Constructor Details
This class inherits a constructor from Rex::Proto::Kerberos::Model::Element
Instance Attribute Details
#cname ⇒ Rex::Proto::Kerberos::Model::PrincipalName
Returns The name part of the client’s principal identifier.
24 25 26 |
# File 'lib/rex/proto/kerberos/model/kdc_response.rb', line 24 def cname @cname end |
#crealm ⇒ String
Returns The realm part of the client’s principal identifier.
21 22 23 |
# File 'lib/rex/proto/kerberos/model/kdc_response.rb', line 21 def crealm @crealm end |
#enc_part ⇒ Rex::Proto::Kerberos::Model::EncryptedData
Returns The encrypted part of the response.
30 31 32 |
# File 'lib/rex/proto/kerberos/model/kdc_response.rb', line 30 def enc_part @enc_part end |
#msg_type ⇒ Integer
Returns The type of a protocol message.
15 16 17 |
# File 'lib/rex/proto/kerberos/model/kdc_response.rb', line 15 def msg_type @msg_type end |
#pa_data ⇒ Array<Rex::Proto::Kerberos::Model::PreAuthDataEntry>?
Returns An array of PreAuthDataEntry. nil if not present.
18 19 20 |
# File 'lib/rex/proto/kerberos/model/kdc_response.rb', line 18 def pa_data @pa_data end |
#pvno ⇒ Integer
Returns The protocol version number.
12 13 14 |
# File 'lib/rex/proto/kerberos/model/kdc_response.rb', line 12 def pvno @pvno end |
#ticket ⇒ Rex::Proto::Kerberos::Model::Ticket
Returns The issued ticket.
27 28 29 |
# File 'lib/rex/proto/kerberos/model/kdc_response.rb', line 27 def ticket @ticket end |
Instance Method Details
#decode(input) ⇒ self
Decodes the Rex::Proto::Kerberos::Model::KdcResponse from an input
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/rex/proto/kerberos/model/kdc_response.rb', line 37 def decode(input) case input when String decode_string(input) when OpenSSL::ASN1::ASN1Data decode_asn1(input) else raise ::Rex::Proto::Kerberos::Model::Error::KerberosDecodingError, 'Failed to decode KdcResponse, invalid input' end self end |
#encode ⇒ Object
Rex::Proto::Kerberos::Model::KdcResponse encoding isn’t supported
53 54 55 |
# File 'lib/rex/proto/kerberos/model/kdc_response.rb', line 53 def encode raise ::NotImplementedError, 'KdcResponse encoding not supported' end |