Path: blob/master/lib/rex/proto/gss/spnego_neg_token_targ.rb
19500 views
require 'rasn1'12module Rex::Proto::Gss3# Negotiation token returned by the target to the initiator4# https://www.rfc-editor.org/rfc/rfc24785class SpnegoNegTokenTarg < RASN1::Model6ACCEPT_COMPLETED = 'accept-completed'7ACCEPT_INCOMPLETE = 'accept-incomplete'8REJECT = 'reject'9REQUEST_MIC = 'request-mic'1011NEG_RESULTS = { ACCEPT_COMPLETED => 0,12ACCEPT_INCOMPLETE => 1,13REJECT => 2,14REQUEST_MIC => 3}1516sequence :token, explicit: 1, class: :context, constructed: true,17content: [enumerated(:neg_result, enum: NEG_RESULTS, explicit: 0, class: :context, constructed: true, optional: true),18objectid(:supported_mech, explicit: 1, class: :context, constructed: true, optional: true),19octet_string(:response_token, explicit: 2, class: :context, constructed: true, optional: true),20octet_string(:mech_list_mic, explicit: 3, class: :context, constructed: true, optional: true)21]2223def neg_result24self[:neg_result].value25end2627def supported_mech28self[:supported_mech].value29end3031def response_token32self[:response_token].value33end3435def mech_list_mic36self[:mech_list_mic].value37end38end39end4041