Skip to content

Commit

Permalink
Updated Variables and Added XML Read Support
Browse files Browse the repository at this point in the history
  • Loading branch information
esc0rtd3w committed Jan 25, 2017
1 parent 2fa1faf commit 08b8be3
Showing 1 changed file with 54 additions and 10 deletions.
64 changes: 54 additions & 10 deletions wifi-hacker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,10 @@ setDefaults(){
# Default Current Directory Temp Path
whTemp=$(echo "$PWD/temp")

defaultScanOutputIVS="$initPath/apScan-01.ivs"
defaultScanOutputXML="$initPath/apScan-01.kismet.netxml"
defaultScanOutputTXT="$initPath/apScan-01.txt"

}


Expand Down Expand Up @@ -2789,17 +2793,17 @@ selectFromApList(){

"essid")
sleep 15
cat "$initPath/apScan-01.kismet.netxml" | grep "<essid cloaked="
cat "$defaultScanOutputXML" | grep "<essid cloaked="
;;

"bssid")
sleep 15
cat "$initPath/apScan-01.kismet.netxml" | grep "<BSSID>"
cat "$defaultScanOutputXML" | grep "<BSSID>"
;;

"channel")
sleep 15
cat "$initPath/apScan-01.kismet.netxml" | grep "<channel>"
cat "$defaultScanOutputXML" | grep "<channel>"
;;

esac
Expand Down Expand Up @@ -2965,7 +2969,8 @@ textGetTargetInfo(){
echo ""
echo "YOU CAN COPY AND PASTE (CTRL+SHIFT+C) (CTRL+SHIFT+V) TO ENTER TARGET INFO BELOW"
echo ""
echo "YOU MAY NEED TO EXTEND THE WINDOW WIDER TO SEE THE ESSID NAMES"
#echo "YOU MAY NEED TO EXTEND THE WINDOW WIDER TO SEE THE ESSID NAMES"
echo "YOU MAY PRESS \"T\" AT ANYTIME TO OPEN A TEXT VIEW OF AVAILABLE TARGETS"
echo ""
echo ""

Expand Down Expand Up @@ -3041,6 +3046,11 @@ getESSID(){
getESSID
;;

"t" | "T")
openScanTargetsAsText
getESSID
;;

*)
essid="$getESSIDTemp"
;;
Expand Down Expand Up @@ -3081,6 +3091,11 @@ getBSSID(){
getBSSID
;;

"t" | "T")
openScanTargetsAsText
getBSSID
;;

*)
bssid="$getBSSIDTemp"
;;
Expand Down Expand Up @@ -3121,6 +3136,11 @@ getChannel(){
getChannel
;;

"t" | "T")
openScanTargetsAsText
getChannel
;;

*)
channel="$getChannelTemp"
;;
Expand Down Expand Up @@ -3591,8 +3611,8 @@ adAPScan(){

banner

rm "$initPath/apScan-01.ivs"
rm "$initPath/apScan-01.kismet.netxml"
rm "$defaultScanOutputIVS"
rm "$defaultScanOutputXML"

#$terminal airodump-ng --channel $channel -i $interfaceMonitor &
#$terminal airodump-ng --ignore-negative-one --channel $channel -i $interfaceMonitor &
Expand Down Expand Up @@ -3664,8 +3684,8 @@ adAPScanNoChannel(){

banner

rm "$initPath/apScan-01.ivs"
rm "$initPath/apScan-01.kismet.netxml"
rm "$defaultScanOutputIVS"
rm "$defaultScanOutputXML"

#$terminal airodump-ng -i $interfaceMonitor &
#$terminal airodump-ng --ignore-negative-one -i $interfaceMonitor &
Expand All @@ -3689,8 +3709,8 @@ adAPScanNoChannelWPS(){

banner

rm "$initPath/apScan-01.ivs"
rm "$initPath/apScan-01.kismet.netxml"
rm "$defaultScanOutputIVS"
rm "$defaultScanOutputXML"

$terminal airodump-ng -i $interfaceMonitor --wps -w "$initPath/apScan" --write-interval 10 -o netxml &

Expand Down Expand Up @@ -6875,6 +6895,30 @@ dumpEnvironment(){
}


readXML(){

currentTask="readXML"

local IFS=\> ; read -d \< E C ;

}




openScanTargetsAsText(){

while readXML; do

if [[ $E = wireless-network ]]; then
echo $C
exit
fi

done < "$defaultScanOutputXML" > "$defaultScanOutputTXT"
}


############################################################################
# MISC STUFF END #######################################################
############################################################################
Expand Down

0 comments on commit 08b8be3

Please sign in to comment.