Module: PWN::SDR
- Defined in:
- lib/pwn/sdr.rb,
lib/pwn/sdr/gqrx.rb,
lib/pwn/sdr/decoder.rb,
lib/pwn/sdr/rfidler.rb,
lib/pwn/sdr/decoder/gsm.rb,
lib/pwn/sdr/decoder/rds.rb,
lib/pwn/sdr/decoder/flex.rb,
lib/pwn/sdr/flipper_zero.rb,
lib/pwn/sdr/decoder/pocsag.rb,
lib/pwn/sdr/son_micro_rfid.rb,
lib/pwn/sdr/frequency_allocation.rb
Overview
This file, using the autoload directive loads SDR modules into memory only when they’re needed. For more information, see: www.rubyinside.com/ruby-techniques-revealed-autoload-1652.html
Defined Under Namespace
Modules: Decoder, FlipperZero, FrequencyAllocation, GQRX, RFIDler, SonMicroRFID
Class Method Summary collapse
-
.authors ⇒ Object
- Author(s)
-
0day Inc.
- .help ⇒ Object
-
.hz_to_i(opts = {}) ⇒ Object
- Supported Method Parameters
-
PWN::SDR.hz_to_i( freq: ‘required - frequency string (e.g. “2.450.000.000”)’ ).
-
.hz_to_s(opts = {}) ⇒ Object
- Supported Method Parameters
-
PWN::SDR.hz_to_s( freq: ‘required - frequency in Hz (Integer or String)’ ).
Class Method Details
.authors ⇒ Object
- Author(s)
-
0day Inc. <support@0dayinc.com>
42 43 44 |
# File 'lib/pwn/sdr.rb', line 42 public_class_method def self. "AUTHOR(S):\n 0day Inc. <support@0dayinc.com>\n" end |
.help ⇒ Object
46 47 48 |
# File 'lib/pwn/sdr.rb', line 46 public_class_method def self.help constants.sort end |
.hz_to_i(opts = {}) ⇒ Object
- Supported Method Parameters
-
PWN::SDR.hz_to_i(
freq: 'required - frequency string (e.g. "2.450.000.000")')
33 34 35 36 |
# File 'lib/pwn/sdr.rb', line 33 public_class_method def self.hz_to_i(opts = {}) freq = opts[:freq] freq.to_s.gsub('.', '').to_i end |
.hz_to_s(opts = {}) ⇒ Object
- Supported Method Parameters
-
PWN::SDR.hz_to_s(
freq: 'required - frequency in Hz (Integer or String)')
19 20 21 22 23 24 25 26 27 |
# File 'lib/pwn/sdr.rb', line 19 public_class_method def self.hz_to_s(opts = {}) freq = opts[:freq] str_hz = freq.to_s # Nuke leading zeros # E.g., 002450000000 -> 2450000000 str_hz = str_hz.sub(/^0+/, '') unless str_hz == '0' # Insert dots every 3 digits from the right str_hz.reverse.scan(/.{1,3}/).join('.').reverse end |