From 22ba628a7ed68b4a9a1f1bcd692c8f8fe031aeda Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 23 Dec 2014 00:54:10 +0100 Subject: add usage for inspector_wifi --- recon/inspector_wifi/inspector_wifi | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/recon/inspector_wifi/inspector_wifi b/recon/inspector_wifi/inspector_wifi index bf2297d9..a13ecd3d 100755 --- a/recon/inspector_wifi/inspector_wifi +++ b/recon/inspector_wifi/inspector_wifi @@ -5,7 +5,16 @@ # set -eu cd "$(dirname "$(readlink -f "$0")")" -#echo "waiting for iwlist scan data..." >&2 + +usage(){ + echo '-h show this help' + echo '-w output in wpa_supplicant.conf format' + echo '-n normal output message' + echo '' + echo 'Example: iwlist wlan0 scan | ./inspector_wifi -w' + + exit 0 +} crack_wifi(){ for i in plugins/*;do @@ -92,17 +101,22 @@ print_wpa_supplicant(){ echo "args $@" } -while getopts hw OPT; do + +if [ $# -eq 0 ]; then + usage +fi + +while getopts wn OPT; do case "$OPT" in - h) - echo $USAGE - exit 0 - ;; w) wpa_sup=1 ;; - *) + n) + ;; + \?) + usage ;; esac done -wifi_init + +iwlist_scan_parser -- cgit v1.2.3