Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/post/hardware/rftransceiver/transmitter.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Post6include Msf::Post::Hardware::RFTransceiver::RFTransceiver78def initialize(info = {})9super(10update_info(11info,12'Name' => 'RF Transceiver Transmitter',13'Description' => %q{14This module powers an HWBridge-connected radio transceiver,15effectively transmitting on the frequency set by the FREQ option.1617NOTE: Users of this module should be aware of their local laws,18regulations, and licensing requirements for transmitting on any19given radio frequency.20},21'References' => [22['URL', 'https://github.com/AndrewMohawk/RfCatHelpers']23],24'License' => MSF_LICENSE,25'Author' => ['Craig Smith'],26'Platform' => ['hardware'],27'SessionTypes' => ['hwbridge']28)29)30register_options([31OptInt.new('FREQ', [true, 'Frequency to transmit on']),32OptInt.new('SECONDS', [false, 'Seconds to transmit', 4]),33OptInt.new('BAUD', [false, 'Baud rate to use', 4800]),34OptInt.new('POWER', [false, 'Power level', 100]),35OptInt.new('INDEX', [false, 'USB Index to use', 0])36])37end3839def run40unless is_rf?41print_error('Not an RF Transceiver')42return43end44unless set_index(datastore['INDEX'])45print_error("Couldn't set usb index to #{datastore['INDEX']}")46return47end48set_modulation('ASK/OOK')49set_freq(datastore['FREQ'])50set_sync_mode(0)51set_baud(datastore['BAUD'])52set_channel_spc(24000)53set_mode('idle')54set_power(datastore['POWER'])5556print_status("Transmitting on #{datastore['FREQ']} for #{datastore['SECONDS']} seconds...")57set_mode('tx')58sleep(datastore['SECONDS'])59print_status('Finished transmitting')60set_mode('idle')61end62end636465