Class: Dap::Filter::FilterDecodeMSSQLReply
- Inherits:
-
Object
- Object
- Dap::Filter::FilterDecodeMSSQLReply
- Includes:
- BaseDecoder
- Defined in:
- lib/dap/filter/udp.rb
Overview
Decode a MSSQL reply
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
Methods included from BaseDecoder
Methods included from Base
Instance Method Details
#decode(data) ⇒ Object
295 296 297 298 299 300 301 302 303 |
# File 'lib/dap/filter/udp.rb', line 295 def decode(data) info = {} # Some binary characters often proceed key, restrict to alphanumeric and a few other common chars data.scan(/([A-Za-z0-9 \.\-_]+?);(.+?);/).each do | var, val| info["mssql.#{var.encode!( 'UTF-8', invalid: :replace, undef: :replace, replace: '' )}"] = val.encode!( 'UTF-8', invalid: :replace, undef: :replace, replace: '' ) end info end |