Class: Rex::Proto::Kerberos::CredentialCache::Credential

Inherits:
Element
  • Object
show all
Defined in:
lib/rex/proto/kerberos/credential_cache/credential.rb

Overview

This class provides a representation of a Credential stored in the Kerberos Credential Cache.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Element

attr_accessor, attributes, #attributes, #initialize

Constructor Details

This class inherits a constructor from Rex::Proto::Kerberos::CredentialCache::Element

Instance Attribute Details

#addrsArray

Returns:

  • (Array)

29
30
31
# File 'lib/rex/proto/kerberos/credential_cache/credential.rb', line 29

def addrs
  @addrs
end

#auth_dataArray

Returns:

  • (Array)

32
33
34
# File 'lib/rex/proto/kerberos/credential_cache/credential.rb', line 32

def auth_data
  @auth_data
end

#clientRex::Proto::Kerberos::CredentialCache::Principal


11
12
13
# File 'lib/rex/proto/kerberos/credential_cache/credential.rb', line 11

def client
  @client
end

#is_skeyInteger

Returns:

  • (Integer)

23
24
25
# File 'lib/rex/proto/kerberos/credential_cache/credential.rb', line 23

def is_skey
  @is_skey
end

#keyRex::Proto::Kerberos::CredentialCache::KeyBlock


17
18
19
# File 'lib/rex/proto/kerberos/credential_cache/credential.rb', line 17

def key
  @key
end

#second_ticketString

Returns:

  • (String)

38
39
40
# File 'lib/rex/proto/kerberos/credential_cache/credential.rb', line 38

def second_ticket
  @second_ticket
end

#serverRex::Proto::Kerberos::CredentialCache::Principal


14
15
16
# File 'lib/rex/proto/kerberos/credential_cache/credential.rb', line 14

def server
  @server
end

#ticketString

Returns:

  • (String)

35
36
37
# File 'lib/rex/proto/kerberos/credential_cache/credential.rb', line 35

def ticket
  @ticket
end

#timeRex::Proto::Kerberos::CredentialCache::Time


20
21
22
# File 'lib/rex/proto/kerberos/credential_cache/credential.rb', line 20

def time
  @time
end

#tkt_flagsInteger

Returns:

  • (Integer)

26
27
28
# File 'lib/rex/proto/kerberos/credential_cache/credential.rb', line 26

def tkt_flags
  @tkt_flags
end

Instance Method Details

#encodeString

Encodes the Rex::Proto::Kerberos::CredentialCache::Credential into an String

Returns:

  • (String)

    encoded credential


43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/rex/proto/kerberos/credential_cache/credential.rb', line 43

def encode
  encoded = ''
  encoded << encode_client
  encoded << encode_server
  encoded << encode_key
  encoded << encode_time
  encoded << encode_is_skey
  encoded << encode_tkt_flags
  encoded << encode_addrs
  encoded << encode_auth_data
  encoded << encode_ticket
  encoded << encode_second_ticket
end