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-REQ (response) data definition
Constant Summary
Constants included from Rex::Proto::Kerberos::Model
AD_IF_RELEVANT, AP_REQ, AS_REP, AS_REQ, AUTHENTICATOR, ERROR_CODES, KDC_OPTION_ALLOW_POST_DATE, KDC_OPTION_ENC_TKT_IN_SKEY, KDC_OPTION_FORWARDABLE, KDC_OPTION_FORWARDED, KDC_OPTION_POST_DATED, KDC_OPTION_PROXIABLE, KDC_OPTION_PROXY, KDC_OPTION_RENEW, KDC_OPTION_RENEWABLE, KDC_OPTION_RENEWABLE_OK, KDC_OPTION_RESERVED, KDC_OPTION_UNUSED_10, KDC_OPTION_UNUSED_11, KDC_OPTION_UNUSED_7, KDC_OPTION_UNUSED_9, KDC_OPTION_VALIDATE, KRB_ERROR, NT_PRINCIPAL, NT_SRV_HST, NT_SRV_INST, NT_SRV_XHST, NT_UID, NT_UNKNOWN, PA_ENC_TIMESTAMP, PA_PAC_REQUEST, PA_PW_SALT, PA_TGS_REQ, TGS_REP, TGS_REQ, TICKET, VERSION
Constants included from Crypto
Crypto::ENC_AS_RESPONSE, Crypto::ENC_KDC_REQUEST_BODY, Crypto::ENC_TGS_RESPONSE, Crypto::RC4_HMAC, Crypto::RSA_MD5
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 ⇒ Fixnum
The type of a protocol message.
-
#pvno ⇒ Fixnum
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
Methods included from Crypto::RsaMd5
Methods included from Crypto::Rc4Hmac
#decrypt_rc4_hmac, #encrypt_rc4_hmac
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.
21 22 23 |
# File 'lib/rex/proto/kerberos/model/kdc_response.rb', line 21 def cname @cname end |
#crealm ⇒ String
Returns The realm part of the client’s principal identifier.
18 19 20 |
# File 'lib/rex/proto/kerberos/model/kdc_response.rb', line 18 def crealm @crealm end |
#enc_part ⇒ Rex::Proto::Kerberos::Model::EncryptedData
Returns The encrypted part of the response.
27 28 29 |
# File 'lib/rex/proto/kerberos/model/kdc_response.rb', line 27 def enc_part @enc_part end |
#msg_type ⇒ Fixnum
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 |
#pvno ⇒ Fixnum
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.
24 25 26 |
# File 'lib/rex/proto/kerberos/model/kdc_response.rb', line 24 def ticket @ticket end |
Instance Method Details
#decode(input) ⇒ self
Decodes the Rex::Proto::Kerberos::Model::KdcResponse from an input
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/rex/proto/kerberos/model/kdc_response.rb', line 34 def decode(input) case input when String decode_string(input) when OpenSSL::ASN1::ASN1Data decode_asn1(input) else raise ::RuntimeError, 'Failed to decode KdcResponse, invalid input' end self end |
#encode ⇒ Object
Rex::Proto::Kerberos::Model::KdcResponse encoding isn’t supported
50 51 52 |
# File 'lib/rex/proto/kerberos/model/kdc_response.rb', line 50 def encode raise ::NotImplementedError, 'KdcResponse encoding not supported' end |