Class: Rex::Proto::ApacheJP::ApacheJPHeaderName
- Inherits:
-
BinData::Primitive
- Object
- BinData::Primitive
- Rex::Proto::ApacheJP::ApacheJPHeaderName
show all
- Defined in:
- lib/rex/proto/apache_j_p.rb
Constant Summary
collapse
[]
Instance Method Summary
collapse
Instance Method Details
#get ⇒ Object
44
45
46
47
48
49
50
|
# File 'lib/rex/proto/apache_j_p.rb', line 44
def get
if len_or_code >= 0xa000
self.class::COMMON_HEADERS[(len_or_code.to_i & 0xff) - 1]
else
self.data
end
end
|
#set(v) ⇒ Object
52
53
54
55
56
57
58
59
60
61
|
# File 'lib/rex/proto/apache_j_p.rb', line 52
def set(v)
if (idx = self.class::COMMON_HEADERS.index(v))
self.len_or_code = 0xa000 | (idx + 1)
else
raise RuntimeError if v.length >= 0xa000
self.len_or_code = v.length
self.data = v
end
end
|