#!/bin/bash -e # SSIDstrip v0.1 # Script to strip SSIDs from Kismet Newcore captures for a custom SSID wordlist. # TAPE 01-04-2011 # # FIXED SETTINGS # ============== RED=$(tput setaf 1 && tput bold) GREEN=$(tput setaf 2 && tput bold) BLUE=$(tput setaf 6 && tput bold) STAND=$(tput sgr0) function help () { echo " ssidstrip v0.1 Strip SSIDs from Kismet Newcore .nettxt files ============================================= basic usage: ------------ print SSIDs from a nettxt file to screen;$BLUE ./ssidstrip file.nettxt$STAND count number of ssids in a nettxt file;$BLUE ./ssidstrip file.nettxt | wc -l$STAND write SSIDs to a file;$BLUE ./ssidstrip file.nettxt > file.txt$STAND append SSIDs to an existing file;$BLUE ./ssidstrip file.nettxt >> existing_file.txt"$STAND echo exit } while getopts ":h" opt ; do case ${opt} in h) help;; ?) echo "Error" ; help esac done shift $(($OPTIND - 1)) { if [ "$1" == "" ] ; then echo $RED"Must enter nettxt file to process"$STAND sleep 0.5 help exit fi grep SSID $1 | egrep -v 'BSSID|SSID [0-9]' | cut -c 18- | sed 's/"//g' | sed 's/ *$//g' | sort -fu exit }