Skip to content

Commit

Permalink
Added "checkInterfaceMode" Function
Browse files Browse the repository at this point in the history
  • Loading branch information
esc0rtd3w committed Jun 13, 2016
1 parent 9b07574 commit 247c5c4
Showing 1 changed file with 40 additions and 5 deletions.
45 changes: 40 additions & 5 deletions wifi-hacker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

# v1.7
# - Currently supports up to 10 wifi wdapters.
# - Changed hotkey for "Manual Adapter Entry" from "M" to "C", because of conflicting with main menu hotkey
# - Added adapter check after disclaimer is agreed, so the main menu will show the correct number of adapters.
# - Updated "killCounterMax" to use "interfacesFound" value for "stopMonitorMode()" function
# - Added "checkMultipleAdapters" Function
Expand Down Expand Up @@ -1562,6 +1563,7 @@ menuMain(){
sessionRemoveEmpty

checkMultipleAdapters
checkInterfaceMode

checkConnectionStatus

Expand Down Expand Up @@ -1764,6 +1766,8 @@ menuAuto(){
#sessionCopyNewCaptureFiles
sessionRemoveEmpty

checkInterfaceMode

banner
bannerStats

Expand Down Expand Up @@ -6195,6 +6199,29 @@ checkForEmptyCredentials(){
# MISC STUFF BEGIN #####################################################
############################################################################

checkInterfaceMode(){

currentTask="checkInterfaceMode"

interfaceModeCheck=$(iwconfig | grep "$interfaceMonitor" | head -c 5)

case "$interfaceModeCheck" in

"")
interfaceMode="0"
#break;
;;

*)
interfaceMode="2"
#break;
;;

esac

}


checkMultipleAdapters(){

currentTask="checkMultipleAdapters"
Expand Down Expand Up @@ -6266,8 +6293,8 @@ getWirelessInterfaces(){

banner
echo ""
$yellow
echo "To Change Adapter Settings, Press \"M\" Now"
$cyan
echo "To Change Adapter Settings, Press \"C\" Now"
$white
#echo ""
#$cyan
Expand All @@ -6277,7 +6304,7 @@ getWirelessInterfaces(){
echo ""
echo "To Select Interface From Discovered, Choose From Below"
echo ""
$cyan
$green

# If no adpaters found
if [ $interfacesFound -eq "0" ]; then
Expand Down Expand Up @@ -6471,7 +6498,7 @@ getWirelessInterfaces(){
interfaceName="$interfaceMonitor"
;;

"M" | "m")
"C" | "c")
banner
echo ""
echo "Enter Managed Mode Interface Name and press ENTER:"
Expand All @@ -6494,11 +6521,12 @@ getWirelessInterfaces(){

"")
interface=$(iwconfig | grep "wlan" | head -c 5)
manualSelectionManaged="$interface"
;;

*)
interface="$manualSelectionManaged"
interfaceName="$manualSelectionManaged"
interfaceName="$interface$manualSelectionManaged"
;;

esac
Expand Down Expand Up @@ -6535,6 +6563,13 @@ getWirelessInterfaces(){
esac
;;

"M" | "m")
killAll
stopMonitorMode
menuMain
;;


"W" | "w")
#returnTo="getWirelessInterfaces"
#spoofMacAddress
Expand Down

0 comments on commit 247c5c4

Please sign in to comment.