From 01ebefc2095a0cf47e963af456bcbe6a6f21df10 Mon Sep 17 00:00:00 2001 From: Rogier Neeleman Date: Thu, 5 Mar 2020 00:07:42 +0100 Subject: [PATCH] Wifi and bluetooth scanner added --- README.md | 3 +++ scanners/wifi_bt.sh | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100755 scanners/wifi_bt.sh diff --git a/README.md b/README.md index a8dd15a..9957105 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,8 @@ These are some scripts I wrote in the past. Maybe they are usefull in the future ## Messages * pushover: sends a message to a pushover service. +## Scanners + * wifi_bt.sh: scan for wifi and bluetooth devices. + ## Transport * ns_vertraging.sh: check if there is any delay on the dutch trains. (not working anymore) diff --git a/scanners/wifi_bt.sh b/scanners/wifi_bt.sh new file mode 100755 index 0000000..6469f31 --- /dev/null +++ b/scanners/wifi_bt.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" +DATUM=`date +%Y%m%d` +sleep 30 + +WFLOG=/root/ssid_dump-$DATUM.txt + +# WiFi +/usr/sbin/airmon-ng start wlan1 >/tmp/airmon.log +/usr/sbin/tcpdump -ttt -i wlan1mon -e -s 256 type mgt subtype probe-req >>$WFLOG & + +BTLOG=/root/bt_dump-$DATUM.txt + +# Bluetooth +hciconfig hci0 up +while [ 1=1 ]; do date >>$BTLOG; hcitool scan --info --oui --class >>$BTLOG; done &