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/auxiliary/scanner/dect/call_scanner.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Exploit::DECT_COA78def initialize9super(10'Name' => 'DECT Call Scanner',11'Description' => 'This module scans for active DECT calls',12'Author' => [ 'DK <privilegedmode[at]gmail.com>' ],13'License' => MSF_LICENSE14)15end1617def print_results18print_line("Time\t\t\t\tRFPI\t\tChannel")19@calls.each do |rfpi, data|20print_line("#{data['time']}\t#{data['rfpi']}\t#{data['channel']}")21end22end232425=begin26def record_call(data)27print_status("Synchronizing..")28pp_scan_mode(data['rfpi_raw'])29while(true)30data = poll_coa()31puts data32end33end34=end3536def run37@calls = {}3839print_status("Opening interface: #{datastore['INTERFACE']}")40print_status("Using band: #{datastore['BAND']}")4142open_coa4344begin4546print_status("Changing to call scan mode.")47call_scan_mode48print_status("Scanning...")4950while (true)51data = poll_coa()52if (data)53parsed_data = parse_call(data)54parsed_data['time'] = Time.now55print_good("Found active call on: #{parsed_data['rfpi']}")56@calls[parsed_data['time']] = parsed_data57end5859next_channel6061vprint_status("Switching to channel: #{channel}")62select(nil,nil,nil,1)63end64ensure65print_status("Closing interface")66stop_coa()67close_coa()68end6970print_results71end72end737475