Module: RubySMB::Dcerpc::Ndr::StringClassPlugin
- Included in:
- NdrConfVarString, NdrConfVarStringz, NdrConfVarWideString, NdrConfVarWideStringz, NdrVarString, NdrVarStringz, NdrVarWideString, NdrVarWideStringz
- Defined in:
- lib/ruby_smb/dcerpc/ndr.rb
Overview
Strings
Defined Under Namespace
Modules: ExtendConfStringPlugin, ExtendVarStringPlugin
Class Method Summary collapse
Class Method Details
.extended(target) ⇒ Object
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 |
# File 'lib/ruby_smb/dcerpc/ndr.rb', line 492 def self.extended(target) target.default_parameters byte_align: 4 char_size = 1 char_size = 2 if target < RubySMB::Field::String16 || target < RubySMB::Field::Stringz16 if target < BinData::Stringz target.default_parameters(:max_length => lambda { @obj.actual_count * char_size }) else target.default_parameters(:length => lambda { @obj.actual_count * char_size }) end target.include ExtendVarStringPlugin class_name = target.to_s.split('::').last if class_name.include?('NdrConfVar') target.include ExtendConfStringPlugin target.extend ConfClassPlugin end end |