2014-12-15 23:13:22 +00:00
|
|
|
# -*- coding: binary -*-
|
|
|
|
|
|
|
|
module Rex
|
|
|
|
module Proto
|
|
|
|
module Kerberos
|
|
|
|
module Pac
|
2014-12-19 07:12:14 +00:00
|
|
|
# This class provides a representation of a PAC_PRIVSVR_CHECKSUM structure, which contains the
|
|
|
|
# checksum using the key of the KDC.
|
2014-12-15 23:13:22 +00:00
|
|
|
class PrivSvrChecksum < Element
|
|
|
|
|
|
|
|
# @!attribute version
|
|
|
|
# @return [Fixnum] The checksum type
|
|
|
|
attr_accessor :checksum
|
|
|
|
|
|
|
|
# Encodes the Rex::Proto::Kerberos::Pac::PacPrivSvrChecksum
|
|
|
|
#
|
|
|
|
# @return [String]
|
|
|
|
def encode
|
|
|
|
encoded = ''
|
|
|
|
encoded << [checksum].pack('V')
|
|
|
|
encoded << "\x00" * 16
|
|
|
|
|
|
|
|
encoded
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|