module

Quartz::Signal::Legal

Legal gate for outbound signal replay (sub_ghz transmit, NFC emulate, IR blast, RFID clone, iButton write).

Capturing signals is passive and generally permissible. Retransmitting them can cross into unauthorized access, wire fraud, or RF regulation violations depending on jurisdiction and target. This module forces the operator to acknowledge ownership/authorization before any replay path can execute.

Two gates must both pass:

  1. ENV["QUARTZ_REPLAY_ACK"] == "I_OWN_THIS_SIGNAL"
  2. A per-signal confirmation callback returns true for the capture

Without both, replay_allowed? returns false and replay! raises.

Constants

ACK_ENV_VAR = "QUARTZ_REPLAY_ACK"
ACK_TOKEN = "I_OWN_THIS_SIGNAL"
KINDS = [:sub_ghz, :nfc, :infrared, :rfid, :ibutton] of ::Symbol

Class methods

ack_present?
Source
clear_confirm
Source
on_confirm
Source
replay!(kind : Symbol, opts : Hash(String, String) = {} of String => String) : Bool

Raises LegalError with a clear message if not permitted, otherwise returns true. Call this at the top of every transmit/emulate/write code path.

Source
replay_allowed?(kind : Symbol, opts : Hash(String, String) = {} of String => String) : Bool
Source

Nested types