Sha256: 625cba718b943af2d9481412ab65f17e60950c9dd5fbdd8196e1e75b2ace0835

Contents?: true

Size: 510 Bytes

Versions: 14

Compression:

Stored size: 510 Bytes

Contents

require 'net/ntlm'

module RubySMB
  module NTLM
    module Custom
      module StringEncoder

        def self.prepended(base)
          base.singleton_class.send(:prepend, ClassMethods)
        end

        module ClassMethods
          def encode_utf16le(str)
            str.dup.force_encoding('UTF-8').encode(Encoding::UTF_16LE, Encoding::UTF_8).force_encoding('ASCII-8BIT')
          end
        end
      end
    end
  end
end

Net::NTLM::EncodeUtil.send(:prepend, RubySMB::NTLM::Custom::StringEncoder)

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ruby_smb-3.3.10 lib/ruby_smb/ntlm/custom/string_encoder.rb
ruby_smb-3.3.9 lib/ruby_smb/ntlm/custom/string_encoder.rb
ruby_smb-3.3.7 lib/ruby_smb/ntlm/custom/string_encoder.rb
ruby_smb-3.3.6 lib/ruby_smb/ntlm/custom/string_encoder.rb
ruby_smb-3.3.5 lib/ruby_smb/ntlm/custom/string_encoder.rb
ruby_smb-3.3.4 lib/ruby_smb/ntlm/custom/string_encoder.rb
ruby_smb-3.3.3 lib/ruby_smb/ntlm/custom/string_encoder.rb
ruby_smb-3.3.2 lib/ruby_smb/ntlm/custom/string_encoder.rb
ruby_smb-3.3.1 lib/ruby_smb/ntlm/custom/string_encoder.rb
ruby_smb-3.3.0 lib/ruby_smb/ntlm/custom/string_encoder.rb
ruby_smb-3.2.8 lib/ruby_smb/ntlm/custom/string_encoder.rb
ruby_smb-3.2.7 lib/ruby_smb/ntlm/custom/string_encoder.rb
ruby_smb-3.2.6 lib/ruby_smb/ntlm/custom/string_encoder.rb
ruby_smb-3.2.5 lib/ruby_smb/ntlm/custom/string_encoder.rb