Skip to content

Commit

Permalink
Changed Handling of $ipStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
esc0rtd3w committed May 20, 2016
1 parent 73542d4 commit 1bc4cae
Showing 1 changed file with 142 additions and 138 deletions.
280 changes: 142 additions & 138 deletions wifi-hacker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
############################################################################

# v1.6
# - Added a "forceDisconnectWiFi" function to help fix active internet connection issues.
# - Changed the handling of "WiFi Force Disconnect". Now, after accepting the agreement, the main menu will only load if the connection status is "0". If the status is "1", meaning the WiFi is connected to an access point, the "forceDisconnectWiFi" and "checkNetworkStatus" functions are called until the connection is released. This allows for better control of correcting errors resulting in having an active network connection.
# - Added "ifconfig" and "iwconfig" output to Extras Interface Menu
# - Merged "checkForEmptyBSSID", "checkForEmptyESSID", and "checkForEmptyChannel" into "checkForEmptyCredentials" function.
# - Removed "arAttackDeAuthOnRetry" function. This was a duplicate and now uses "arAttackDeAuth" function instead.
Expand Down Expand Up @@ -1541,186 +1543,188 @@ menuMain(){
sessionCreatePaths
sessionRemoveEmpty

# This double call to the below function fixes an issue with the ipStatusText not refreshing when returning to main menu from any option
checkConnectionStatus

banner
echo ""
echo "Loading Menu...."
echo ""

case "$ipStatus" in

"1")
banner
echo ""
echo "Loading Menu...."
echo ""
echo ""

forceDisconnectWifi
checkConnectionStatus
menuMain
#forceDisconnectWifi
#checkConnectionStatus
;;

esac
"0")
banner
echo ""
#echo "Welcome to the WiFi Hacker script!"
echo "Compatible with all WEP/WPA/WPA2/WPS protected WiFi routers."
echo ""
$red
echo "**********************************************************************"
echo "YOU MUST DISCONNECT FROM ANY WIRELESS CONNECTIONS BEFORE CONTINUING!!!"
echo "**********************************************************************"
echo ""

case "$ipStatus" in
"0")
$green
;;

banner
echo ""
#echo "Welcome to the WiFi Hacker script!"
echo "Compatible with all WEP/WPA/WPA2/WPS protected WiFi routers."
echo ""
$red
echo "**********************************************************************"
echo "YOU MUST DISCONNECT FROM ANY WIRELESS CONNECTIONS BEFORE CONTINUING!!!"
echo "**********************************************************************"
echo ""
"1")
$red
;;
esac
echo "You are currently connected to: $ipStatusText"
$white
echo ""
echo ""
#$cyan
echo "0) Full Automatic Mode (Applies To All Encryption Types)"
#$white
echo ""
echo "1) WEP Mode (Commands can be executed from a menu to easily circumvent any WEP connection)"
echo ""
echo "2) WPS Mode (May also have WPA, WPA2, or WEP displayed. Ignore this, as it has no effect on success rate)"
echo ""
echo "3) WPA Mode (Capture 4-way handshake, dictionary attack, bruteforce and others, LOW SUCCESS RATE)"
echo ""
echo "4) WPA2 Mode (Almost identical to WPA attacks. This mode also carries a LOW SUCCESS RATE)"
echo ""
echo ""
echo ""
echo "Select a mode from above and press Enter:"
echo ""

case "$ipStatus" in
"0")
$green
;;
read getMode

"1")
$red
;;
esac
echo "You are currently connected to: $ipStatusText"
$white
echo ""
echo ""
#$cyan
echo "0) Full Automatic Mode (Applies To All Encryption Types)"
#$white
echo ""
echo "1) WEP Mode (Commands can be executed from a menu to easily circumvent any WEP connection)"
echo ""
echo "2) WPS Mode (May also have WPA, WPA2, or WEP displayed. Ignore this, as it has no effect on success rate)"
echo ""
echo "3) WPA Mode (Capture 4-way handshake, dictionary attack, bruteforce and others, LOW SUCCESS RATE)"
echo ""
echo "4) WPA2 Mode (Almost identical to WPA attacks. This mode also carries a LOW SUCCESS RATE)"
echo ""
echo ""
echo ""
echo "Select a mode from above and press Enter:"
echo ""

read getMode
case "$getMode" in

"0")
checkConnectionStatus
checkWifiandDisplayMessage
menuAttacksAllWifiteAuto
menuMain
;;

case "$getMode" in
"1")
checkConnectionStatus
checkWifiandDisplayMessage
mkdir $capturePathWEP
encryptionType="wep"
encryptionTypeText="WEP"
checkSpoofStatus
menuAuto
;;

"0")
checkConnectionStatus
checkWifiandDisplayMessage
menuAttacksAllWifiteAuto
menuMain
;;
"2")
checkConnectionStatus
checkWifiandDisplayMessage
mkdir $capturePathWPS
encryptionType="wps"
encryptionTypeText="WPS"
checkSpoofStatus
menuAuto
;;

"1")
checkConnectionStatus
checkWifiandDisplayMessage
mkdir $capturePathWEP
encryptionType="wep"
encryptionTypeText="WEP"
checkSpoofStatus
menuAuto
;;
"3")
checkConnectionStatus
checkWifiandDisplayMessage
mkdir $capturePathWPA
encryptionType="wpa"
encryptionTypeText="WPA"
checkSpoofStatus
menuAuto
;;

"2")
checkConnectionStatus
checkWifiandDisplayMessage
mkdir $capturePathWPS
encryptionType="wps"
encryptionTypeText="WPS"
checkSpoofStatus
menuAuto
;;
"4")
checkConnectionStatus
checkWifiandDisplayMessage
mkdir $capturePathWPA2
encryptionType="wpa2"
encryptionTypeText="WPA2"
checkSpoofStatus
menuAuto
;;

"3")
checkConnectionStatus
checkWifiandDisplayMessage
mkdir $capturePathWPA
encryptionType="wpa"
encryptionTypeText="WPA"
checkSpoofStatus
menuAuto
;;
"")
menuMain
;;

"4")
checkConnectionStatus
checkWifiandDisplayMessage
mkdir $capturePathWPA2
encryptionType="wpa2"
encryptionTypeText="WPA2"
checkSpoofStatus
menuAuto
;;
"M" | "m")
menuMain
;;

"")
menuMain
;;
"A" | "a")
menuAdvanced
;;

"M" | "m")
menuMain
;;
"S" | "s")
checkForEmptyEncryptionType

"A" | "a")
menuAdvanced
;;
case "$bssid" in

"S" | "s")
checkForEmptyEncryptionType
"")
menuMain
;;

case "$bssid" in
esac

"")
menuMain
if [ "$bssid" != "" ]; then
menuSessionSave
fi
;;

esac

if [ "$bssid" != "" ]; then
menuSessionSave
fi
;;
"L" | "l")
checkForEmptyEncryptionType

"L" | "l")
checkForEmptyEncryptionType
#case "$bssid" in

#case "$bssid" in
#"")
#menuMain
#;;

#"")
#menuMain
#;;
#esac

#esac
#if [ "$bssid" != "" ]; then
menuSessionLoad
#fi
;;

#if [ "$bssid" != "" ]; then
menuSessionLoad
#fi
;;
"U" | "u")
menuUpdate
;;

"U" | "u")
menuUpdate
;;
"H" | "h")
menuHelp
;;

"H" | "h")
menuHelp
;;
"E" | "e")
menuExtras
;;

"E" | "e")
menuExtras
;;
"X" | "x")
killAll
stopMonitorMode
bannerExit
;;

"X" | "x")
killAll
stopMonitorMode
bannerExit
;;
*)
menuMain
;;

*)
menuMain
esac
;;

esac

#menuMain
}


Expand Down

0 comments on commit 1bc4cae

Please sign in to comment.