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/station_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 Base Station Scanner',11'Description' => 'This module scans for DECT base stations',12'Author' => [ 'DK <privilegedmode[at]gmail.com>' ],13'License' => MSF_LICENSE14)1516end171819def print_results20print_line("RFPI\t\tChannel")21@base_stations.each do |rfpi, data|22print_line("#{data['rfpi']}\t#{data['channel']}")23end24end2526def run27@base_stations = {}2829print_status("Opening interface: #{datastore['INTERFACE']}")30print_status("Using band: #{datastore['BAND']}")3132open_coa3334begin3536print_status("Changing to fp scan mode.")37fp_scan_mode38print_status("Scanning...")3940while(true)41data = poll_coa()4243if (data)44parsed_data = parse_station(data)45if (not @base_stations.key?(parsed_data['rfpi']))46print_good("Found New RFPI: #{parsed_data['rfpi']}")47@base_stations[parsed_data['rfpi']] = parsed_data48end49end5051next_channel5253vprint_status("Switching to channel: #{channel}")54select(nil,nil,nil,1)55end56ensure57print_status("Closing interface")58stop_coa()59close_coa()60end6162print_results63end64end656667