Class: X11Proto

Inherits:
BinData::Record
  • Object
show all
Defined in:
lib/binproxy/parsers/x11_proto.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.initial_stateObject



114
# File 'lib/binproxy/parsers/x11_proto.rb', line 114

def self.initial_state; { connected: false, endian: nil }; end

Instance Method Details

#summaryObject



125
126
127
# File 'lib/binproxy/parsers/x11_proto.rb', line 125

def summary
  msg.msg2.summary
end

#update_stateObject

XXX wrap this in something that dups the current state so we’re unable to mutate it by accident



117
118
119
120
121
122
123
# File 'lib/binproxy/parsers/x11_proto.rb', line 117

def update_state
  c = current_state.dup
  if eval_parameter(:src) == 'server' #hack, assume we're connected after 1st c-s-c exchange
    c[:connected] = true
  end
  c
end