Class: Dap::Filter::FilterDecodeUPNP_SSDP_Reply
- Inherits:
-
Object
- Object
- Dap::Filter::FilterDecodeUPNP_SSDP_Reply
- Includes:
- BaseDecoder
- Defined in:
- lib/dap/filter/udp.rb
Overview
Decode a SSDP probe response ( zmap: upnp_1900.pkt )
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
63 64 65 66 67 68 69 70 71 |
# File 'lib/dap/filter/udp.rb', line 63 def decode(data) head = { } data.split(/\n/).each do |line| k,v = line.strip.split(':', 2) next if not k head["upnp_#{k.downcase}"] = (v.to_s.strip) end head end |