Module: PWN::SDR::Decoder
- Defined in:
- lib/pwn/sdr/decoder.rb,
lib/pwn/sdr/decoder/apt.rb,
lib/pwn/sdr/decoder/dsp.rb,
lib/pwn/sdr/decoder/gps.rb,
lib/pwn/sdr/decoder/gsm.rb,
lib/pwn/sdr/decoder/lte.rb,
lib/pwn/sdr/decoder/p25.rb,
lib/pwn/sdr/decoder/rds.rb,
lib/pwn/sdr/decoder/adsb.rb,
lib/pwn/sdr/decoder/base.rb,
lib/pwn/sdr/decoder/dect.rb,
lib/pwn/sdr/decoder/flex.rb,
lib/pwn/sdr/decoder/lora.rb,
lib/pwn/sdr/decoder/rfid.rb,
lib/pwn/sdr/decoder/rtty.rb,
lib/pwn/sdr/decoder/wifi.rb,
lib/pwn/sdr/decoder/morse.rb,
lib/pwn/sdr/decoder/pager.rb,
lib/pwn/sdr/decoder/pocsag.rb,
lib/pwn/sdr/decoder/rtl433.rb,
lib/pwn/sdr/decoder/zigbee.rb,
lib/pwn/sdr/decoder/iridium.rb,
lib/pwn/sdr/decoder/tempest.rb,
lib/pwn/sdr/decoder/bluetooth.rb
Overview
Decoder namespace for SDR signals. Every child module exposes a
uniform .decode(freq_obj:) entry point (see PWN::SDR::Decoder::Base)
so PWN::SDR::GQRX can dispatch on a decoder: key from
PWN::SDR::FrequencyAllocation.band_plans.
100 % ruby-native — no decoder in this namespace shells out to an external binary. Three pipelines (Base):
run_native — GQRX 48 kHz audio tap (POCSAG/FLEX/Morse/RTTY/APT/Pager)
run_iq — true-air I/Q via PWN::FFI::{RTLSdr,AdalmPluto,HackRF}
or a .cu8/.cs16 capture file; all modules use this when
hardware/file is present (ADS-B fully slices Mode-S PPM)
run_detector — energy/burst characterizer fallback when no I/Q source
Defined Under Namespace
Modules: ADSB, APT, Base, Bluetooth, DECT, DSP, Flex, GPS, GSM, Iridium, LTE, LoRa, Morse, P25, POCSAG, Pager, RDS, RFID, RTL433, RTTY, Tempest, WiFi, ZigBee
Constant Summary collapse
- REGISTRY =
symbol → module map. Keys are what a band_plan's :decoder value (or PWN::SDR::GQRX.init_freq's decoder: kwarg) may be set to.
{ adsb: :ADSB, apt: :APT, bluetooth: :Bluetooth, dect: :DECT, flex: :Flex, gprs: :GSM, gps: :GPS, gsm: :GSM, iridium: :Iridium, ism: :RTL433, keyfob: :RTL433, lora: :LoRa, lte: :LTE, morse: :Morse, p25: :P25, pager: :Pager, pocsag: :POCSAG, rds: :RDS, rfid: :RFID, rtl433: :RTL433, rtty: :RTTY, tempest: :Tempest, wifi: :WiFi, zigbee: :ZigBee }.freeze
Class Method Summary collapse
-
.authors ⇒ Object
- Author(s)
0day Inc.
-
.help ⇒ Object
Display a List of Every PWN::SDR::Decoder Module.
-
.resolve(opts = {}) ⇒ Object
- Supported Method Parameters
mod = PWN::SDR::Decoder.resolve( decoder: 'required - Symbol/String key from REGISTRY (e.g. :pocsag)' ).
Class Method Details
.authors ⇒ Object
- Author(s)
0day Inc. [email protected]
89 90 91 |
# File 'lib/pwn/sdr/decoder.rb', line 89 public_class_method def self. "AUTHOR(S):\n 0day Inc. <[email protected]>\n" end |
.help ⇒ Object
Display a List of Every PWN::SDR::Decoder Module
95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/pwn/sdr/decoder.rb', line 95 public_class_method def self.help puts "USAGE: # Run resolve and return its result #{self}.resolve( decoder: 'required - Symbol/String key from REGISTRY (e.g. :pocsag)' ) # Print the AUTHOR(S) string for this module. #{self}.authors " constants.sort end |
.resolve(opts = {}) ⇒ Object
- Supported Method Parameters
mod = PWN::SDR::Decoder.resolve( decoder: 'required - Symbol/String key from REGISTRY (e.g. :pocsag)' )
79 80 81 82 83 84 85 |
# File 'lib/pwn/sdr/decoder.rb', line 79 public_class_method def self.resolve(opts = {}) key = opts[:decoder].to_s.downcase.to_sym const = REGISTRY[key] raise "ERROR: Unknown decoder key #{key.inspect}. Supported: #{REGISTRY.keys.sort.join(', ')}" unless const const_get(const) end |