Fixed sequence bug & removed extraneous test code.
Fixed a bug caused by the addition of more password verifiers where the back option would fail. Removed extranous code that was accidentally left behind while testing. Fixed a bug with shifting arguments when no shift was needed (no paremeter argument).
This commit is contained in:
parent
ebb7cc936f
commit
6e4e5ba3a9
|
@ -206,12 +206,7 @@ captive_portal_unset_authenticator() {
|
||||||
|
|
||||||
CaptivePortalAuthenticatorMode=""
|
CaptivePortalAuthenticatorMode=""
|
||||||
|
|
||||||
# If we've only got one option, then the user skipped this section
|
return 1
|
||||||
# by auto-selecting that single option, so we unset the previous
|
|
||||||
# phase along with this one to properly take the user back.
|
|
||||||
#if [ ${#CaptivePortalAuthenticationMethods[@]} -le 1 ]; then
|
|
||||||
# return 1 # Trigger undo chain because it was auto-selected.
|
|
||||||
#fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
captive_portal_set_authenticator() {
|
captive_portal_set_authenticator() {
|
||||||
|
@ -229,15 +224,6 @@ captive_portal_set_authenticator() {
|
||||||
|
|
||||||
captive_portal_unset_authenticator
|
captive_portal_unset_authenticator
|
||||||
|
|
||||||
# # If we've got only one choice, auto-select it for the user.
|
|
||||||
#if [ \
|
|
||||||
# ${#CaptivePortalAuthenticationMethods[@]} -eq 1 -o \
|
|
||||||
# ${#CaptivePortalAuthenticationMethods[@]} -ge 1 -a \
|
|
||||||
# "$FLUXIONAuto" ]; then
|
|
||||||
# CaptivePortalAuthenticatorMode="${CaptivePortalAuthenticationMethods[0]}"
|
|
||||||
# echo "Auto-selected auth-method: $CaptivePortalAuthenticatorMode" \
|
|
||||||
# > $FLUXIONOutputDevice
|
|
||||||
#else
|
|
||||||
fluxion_header
|
fluxion_header
|
||||||
|
|
||||||
echo -e "$FLUXIONVLine $CaptivePortalVerificationMethodQuery"
|
echo -e "$FLUXIONVLine $CaptivePortalVerificationMethodQuery"
|
||||||
|
@ -250,7 +236,7 @@ captive_portal_set_authenticator() {
|
||||||
"$CaptivePortalVerificationMethodAircrackNG"
|
"$CaptivePortalVerificationMethodAircrackNG"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add pyrit to the options is available.
|
# Add pyrit to the options if available.
|
||||||
if [ -x "$(command -v pyrit)" ]; then
|
if [ -x "$(command -v pyrit)" ]; then
|
||||||
choices+=("$CaptivePortalVerificationMethodPyritOption")
|
choices+=("$CaptivePortalVerificationMethodPyritOption")
|
||||||
fi
|
fi
|
||||||
|
@ -286,15 +272,17 @@ captive_portal_set_authenticator() {
|
||||||
"$CaptivePortalHashPath" "$FluxionTargetMAC" "$FluxionTargetSSID"
|
"$CaptivePortalHashPath" "$FluxionTargetMAC" "$FluxionTargetSSID"
|
||||||
result=$?
|
result=$?
|
||||||
|
|
||||||
if [ $result -eq 0 ]; then
|
CaptivePortalHashPath="${FluxionHashPath:-'INVALID_PATH'}"
|
||||||
CaptivePortalHashPath="$FluxionHashPath"
|
|
||||||
|
if [ $result -ne 0 ]; then
|
||||||
|
echo "Failed to set a hash path!" > $FLUXIONOutputDevice
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Assure authentication method processing succeeded, abort otherwise.
|
# Assure authentication method processing succeeded, abort otherwise.
|
||||||
if [ $result -ne 0 ] && [ "$FLUXIONDebug" == "" ]; then
|
if [ $result -ne 0 ]; then
|
||||||
echo "Auth-mode error code $result!" > $FLUXIONOutputPath
|
echo "Auth-mode error code $result!" > $FLUXIONOutputDevice
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -1228,7 +1216,7 @@ while [ "$1" != "" -a "$1" != "--" ]; do
|
||||||
# WARNING: If more auth-modes are added, assume hash auth-mode here!
|
# WARNING: If more auth-modes are added, assume hash auth-mode here!
|
||||||
CaptivePortalHashPath=$2; shift;;
|
CaptivePortalHashPath=$2; shift;;
|
||||||
-n|--network-manager)
|
-n|--network-manager)
|
||||||
CaptivePortalNetworkManagerShutoff="disabled"; shift;;
|
CaptivePortalNetworkManagerShutoff="disabled";;
|
||||||
esac
|
esac
|
||||||
shift # Shift new parameters
|
shift # Shift new parameters
|
||||||
done
|
done
|
||||||
|
@ -1391,8 +1379,6 @@ stop_attack() {
|
||||||
|
|
||||||
# Start the network-manager if it's disabled.
|
# Start the network-manager if it's disabled.
|
||||||
if [ "$CaptivePortalNetworkManagerShutoff" != "disabled" ]; then
|
if [ "$CaptivePortalNetworkManagerShutoff" != "disabled" ]; then
|
||||||
echo "Alright, got hit!"
|
|
||||||
read bullshit
|
|
||||||
if [ -x "$(command -v systemctl)" ]; then
|
if [ -x "$(command -v systemctl)" ]; then
|
||||||
if [ "$CaptivePortalDisabledNetworkManager" ]; then
|
if [ "$CaptivePortalDisabledNetworkManager" ]; then
|
||||||
systemctl restart network-manager.service &> $FLUXIONOutputDevice
|
systemctl restart network-manager.service &> $FLUXIONOutputDevice
|
||||||
|
|
|
@ -1648,6 +1648,7 @@ fluxion_hash_set_path() {
|
||||||
# If one exists, ask users if they'd like to use it.
|
# If one exists, ask users if they'd like to use it.
|
||||||
if [ "$hashPath" -a -f "$hashPath" -a -s "$hashPath" ]; then
|
if [ "$hashPath" -a -f "$hashPath" -a -s "$hashPath" ]; then
|
||||||
if [ "$FLUXIONAuto" ]; then
|
if [ "$FLUXIONAuto" ]; then
|
||||||
|
echo "Using default hash path: $hashPath" > $FLUXIONOutputDevice
|
||||||
FluxionHashPath=$hashPath
|
FluxionHashPath=$hashPath
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
|
@ -1697,6 +1698,8 @@ fluxion_hash_set_path() {
|
||||||
# Notice: Path is cleared if we return, no need to unset.
|
# Notice: Path is cleared if we return, no need to unset.
|
||||||
if [ ! "$FluxionHashPath" ]; then return 1; fi
|
if [ ! "$FluxionHashPath" ]; then return 1; fi
|
||||||
|
|
||||||
|
echo "Path given: \"$FluxionHashPath\"" > $FLUXIONOutputDevice
|
||||||
|
|
||||||
# Make sure the path points to a valid generic file.
|
# Make sure the path points to a valid generic file.
|
||||||
if [ ! -f "$FluxionHashPath" -o ! -s "$FluxionHashPath" ]; then
|
if [ ! -f "$FluxionHashPath" -o ! -s "$FluxionHashPath" ]; then
|
||||||
echo -e "$FLUXIONVLine $FLUXIONEmptyOrNonExistentHashError"
|
echo -e "$FLUXIONVLine $FLUXIONEmptyOrNonExistentHashError"
|
||||||
|
@ -1714,7 +1717,10 @@ fluxion_hash_get_path() {
|
||||||
while true; do
|
while true; do
|
||||||
fluxion_hash_unset_path
|
fluxion_hash_unset_path
|
||||||
if ! fluxion_hash_set_path "$@"; then
|
if ! fluxion_hash_set_path "$@"; then
|
||||||
|
echo "Failed to set hash path." > $FLUXIONOutputDevice
|
||||||
return -1 # WARNING: The recent error code is NOT contained in $? here!
|
return -1 # WARNING: The recent error code is NOT contained in $? here!
|
||||||
|
else
|
||||||
|
echo "Hash path: \"$FluxionHashPath\"" > $FLUXIONOutputDevice
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if fluxion_hash_verify "$FluxionHashPath" "$2" "$3"; then
|
if fluxion_hash_verify "$FluxionHashPath" "$2" "$3"; then
|
||||||
|
|
Loading…
Reference in New Issue