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
84 85 86 87 88 89 90 91 92 |
# File 'lib/dap/filter/udp.rb', line 84 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 |