Module: PWN::SDR::Decoder::Iridium
- Defined in:
- lib/pwn/sdr/decoder/iridium.rb
Overview
Iridium L-band (1.616–1.6265 GHz) burst decoder. Drives gr-iridium's
iridium-extractor against the SDR to demodulate 25 kbit/s DE-QPSK
simplex/duplex bursts, then pipes them through iridium-toolkit's
iridium-parser.py for frame classification (IRA/IBC/IDA/ISY/VOC/...).
Class Method Summary collapse
-
.authors ⇒ Object
- Author(s)
0day Inc.
-
.decode(opts = {}) ⇒ Object
- Supported Method Parameters
PWN::SDR::Decoder::Iridium.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::Iridium.parse_line(line: 'IRA: sat:23 beam:14 ...').
Class Method Details
.authors ⇒ Object
- Author(s)
0day Inc. support@0dayinc.com
58 59 60 |
# File 'lib/pwn/sdr/decoder/iridium.rb', line 58 public_class_method def self. "AUTHOR(S):\n 0day Inc. <support@0dayinc.com>\n" end |
.decode(opts = {}) ⇒ Object
- Supported Method Parameters
PWN::SDR::Decoder::Iridium.decode( freq_obj: 'required - freq_obj returned from PWN::SDR::GQRX.init_freq' )
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/pwn/sdr/decoder/iridium.rb', line 18 public_class_method def self.decode(opts = {}) freq_obj = opts[:freq_obj] raise 'ERROR: :freq_obj is required' unless freq_obj.is_a?(Hash) hz = PWN::SDR.hz_to_i(freq: freq_obj[:freq]) gain = (freq_obj[:rf_gain] || 40).to_s.to_f sdr_args = (freq_obj[:sdr_args] || 'rtl=0').to_s inner = "iridium-extractor -D 4 --multi-frame -c #{hz} -r 2000000 " \ "-g #{gain} -o - #{Shellwords.escape(sdr_args)} 2>/dev/null " \ '| iridium-parser.py --harder /dev/stdin' direct_cmd = "bash -c #{Shellwords.escape(inner)}" PWN::SDR::Decoder::Base.run_pipeline( freq_obj: freq_obj, protocol: 'IRIDIUM', required_bins: %w[iridium-extractor iridium-parser.py], direct_cmd: direct_cmd, line_match: /^(IRA|IBC|IDA|ISY|ITL|MSG|VOC|RAW):/, parser: proc { |line| parse_line(line: line) } ) end |
.help ⇒ Object
Display Usage for this Module
64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/pwn/sdr/decoder/iridium.rb', line 64 public_class_method def self.help puts "USAGE: #{self}.decode( freq_obj: 'required - freq_obj returned from PWN::SDR::GQRX.init_freq' ) NOTE: Requires `iridium-extractor` (gr-iridium) and `iridium-parser.py` (iridium-toolkit). Owns the SDR. #{self}.parse_line(line: 'IRA: sat:23 beam:14 pos=(+32.1/-097.0) ...') #{self}.authors " end |
.parse_line(opts = {}) ⇒ Object
- Supported Method Parameters
PWN::SDR::Decoder::Iridium.parse_line(line: 'IRA: sat:23 beam:14 ...')
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/pwn/sdr/decoder/iridium.rb', line 44 public_class_method def self.parse_line(opts = {}) line = opts[:line].to_s out = { protocol: 'IRIDIUM' } out[:frame_type] = ::Regexp.last_match(1) if line =~ /^([A-Z]{3}):/ out[:sat] = ::Regexp.last_match(1) if line =~ /sat:(\d+)/ out[:beam] = ::Regexp.last_match(1) if line =~ /beam:(\d+)/ out[:pos] = ::Regexp.last_match(1) if line =~ /pos=\(([^)]+)\)/ out[:ra_id] = ::Regexp.last_match(1) if line =~ /ric:(\d+)/ out[:summary] = "IRIDIUM #{out[:frame_type]} sat=#{out[:sat]} beam=#{out[:beam]}" out.compact end |