#!/bin/bash #Mother of bluetooth scanners #This script uses the wireshark manufacturers file to find the manufacturer of the device. #manuf_db=/usr/share/wireshark/wireshark/manuf # change this to where the file is on your system manuf_db=/usr/share/wireshark/wireshark/manuf pingCount=5 hcitool scan | grep -v "Scanning ..." | awk -F " " '{print $2"\t"$3}' > output.txt grep -v "Scanning..." output.txt | nl | sed 's/\t/ /g' | awk -F : '{print $1":"$2":"$3}' | sed 's/ //g' > octets.txt octet=`grep "1 " octets.txt | sed 's/1 //g'` manuf=`grep $octet $manuf_db | awk -F "# " '{print $2}'` bdAddress=`cat output.txt | awk '{print $1}'` ssid=`cat output.txt | awk -F "\t" '{print $2}'` echo "Running recon on $ssid with bssid $bdAddress." echo "Device Manufacturer is $manuf" echo "Running recon on $ssid with bssid $bdAddress." > "$bdAddress.sdptool" echo "Device Manufacturer is $manuf" >> "$bdAddress.sdptool" echo "" >> "$bdAddress.sdptool" echo "Pinging...." l2ping -i hci0 -c $pingCount $bdAddress sdptool browse $bdAddress >> "$bdAddress.sdptool" echo "Output saved to $bdAddress.sdptool." #cleanup rm -f output.txt rm -f octets.txt