Module: PWN::SDR::Decoder::DECT
- Defined in:
- lib/pwn/sdr/decoder/dect.rb
Overview
Pure-Ruby DECT (1.88–1.90 GHz EU / 1.92–1.93 GHz US) activity detector.
1.152 Mbit/s GFSK across 10 TDMA carriers — native mode reports
slot bursts (417 μs) and derives carrier index from freq_obj.
parse_line retained for offline text analysis.
Class Method Summary collapse
-
.authors ⇒ Object
- Author(s)
0day Inc.
-
.decode(opts = {}) ⇒ Object
- Supported Method Parameters
PWN::SDR::Decoder::DECT.decode( freq_obj: 'required - freq_obj returned from PWN::SDR::GQRX.init_freq' ).
-
.help ⇒ Object
Display Usage for this Module.
-
.parse_line(opts = {}) ⇒ Object
- Supported Method Parameters
PWN::SDR::Decoder::DECT.parse_line(line: 'RFPI: 01 23 45 67 89 slot 4 carrier 3 RSSI -55').
Class Method Details
.authors ⇒ Object
- Author(s)
0day Inc. support@0dayinc.com
50 51 52 |
# File 'lib/pwn/sdr/decoder/dect.rb', line 50 public_class_method def self. "AUTHOR(S):\n 0day Inc. <support@0dayinc.com>\n" end |
.decode(opts = {}) ⇒ Object
- Supported Method Parameters
PWN::SDR::Decoder::DECT.decode( freq_obj: 'required - freq_obj returned from PWN::SDR::GQRX.init_freq' )
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/pwn/sdr/decoder/dect.rb', line 17 public_class_method def self.decode(opts = {}) freq_obj = opts[:freq_obj] hz = PWN::SDR.hz_to_i(freq: freq_obj[:freq]) ch = ((1_897_344_000 - hz) / 1_728_000.0).round.clamp(0, 9) PWN::SDR::Decoder::Base.run_detector( freq_obj: freq_obj, protocol: 'DECT', note: '1.152 Mbit/s GFSK 24-slot TDMA — native mode reports slot bursts and carrier index.', threshold: 7.0, describe: proc { |b| slots = (b[:duration_ms] / 0.417).round { modulation: 'GFSK', carrier: ch, tdma_slots: slots, classification: slots >= 24 ? 'FP-beacon-frame' : 'PP-burst' } } ) end |
.help ⇒ Object
Display Usage for this Module
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/pwn/sdr/decoder/dect.rb', line 56 public_class_method def self.help puts "USAGE (ruby-native detector, no external binaries): #{self}.decode( freq_obj: 'required - freq_obj returned from PWN::SDR::GQRX.init_freq' ) #{self}.parse_line(line: 'RFPI: 01 23 45 67 89 slot 4 carrier 3') #{self}.authors " end |
.parse_line(opts = {}) ⇒ Object
- Supported Method Parameters
PWN::SDR::Decoder::DECT.parse_line(line: 'RFPI: 01 23 45 67 89 slot 4 carrier 3 RSSI -55')
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/pwn/sdr/decoder/dect.rb', line 36 public_class_method def self.parse_line(opts = {}) line = opts[:line].to_s out = { protocol: 'DECT' } out[:rfpi] = ::Regexp.last_match(1).delete(' ') if line =~ /RFPI[:=]?\s*((?:[0-9A-Fa-f]{2}\s*){5})/ out[:slot] = ::Regexp.last_match(1) if line =~ /slot\s*(\d+)/i out[:carrier] = ::Regexp.last_match(1) if line =~ /carrier\s*(\d+)/i out[:rssi] = ::Regexp.last_match(1) if line =~ /RSSI[:=]?\s*(-?\d+)/i out[:role] = ::Regexp.last_match(1) if line =~ /\b(FP|PP)\b/ out[:summary] = "DECT RFPI=#{out[:rfpi]} slot=#{out[:slot]} carrier=#{out[:carrier]}" out.compact end |