Fixed clean SSID bug & minor auto-mode bug.

The clean SSID wasn't being set when then -e flag was passed.
The auto-mode wasn't auto-checking automatically found hash files.
This commit is contained in:
Matias Barcenas 2018-01-20 02:54:55 -06:00
parent be08c68bfa
commit b980ea21db
1 changed files with 35 additions and 23 deletions

58
fluxion
View File

@ -107,7 +107,11 @@ while [ "$1" != "" -a "$1" != "--" ]; do
-n|--airmon-ng) declare -r FLUXIONAirmonNG=1;; -n|--airmon-ng) declare -r FLUXIONAirmonNG=1;;
-m|--multiplexer) declare -r FLUXIONTMux=1;; -m|--multiplexer) declare -r FLUXIONTMux=1;;
-b|--bssid) FluxionTargetMAC=$2; shift;; -b|--bssid) FluxionTargetMAC=$2; shift;;
-e|--essid) FluxionTargetSSID=$2; shift;; -e|--essid) FluxionTargetSSID=$2;
FluxionTargetSSIDClean=$(
echo "$FluxionTargetSSID" | sed -r 's/( |\/|\.|\~|\\)+/_/g'
)
shift;;
-c|--channel) FluxionTargetChannel=$2; shift;; -c|--channel) FluxionTargetChannel=$2; shift;;
-l|--language) FluxionLanguage=$2; shift;; -l|--language) FluxionLanguage=$2; shift;;
-a|--attack) FluxionAttack=$2; shift;; -a|--attack) FluxionAttack=$2; shift;;
@ -1276,6 +1280,9 @@ fluxion_hash_verify() {
fluxion_hash_unset_path() { fluxion_hash_unset_path() {
if [ ! "$FluxionHashPath" ]; then return 1; fi if [ ! "$FluxionHashPath" ]; then return 1; fi
FluxionHashPath="" FluxionHashPath=""
# Since we're auto-selecting when on auto, trigger undo-chain.
if [ "$FLUXIONAuto" ]; then return 2; fi
} }
# Parameters: <hash path> <bssid> <essid> [channel [encryption [maker]]] # Parameters: <hash path> <bssid> <essid> [channel [encryption [maker]]]
@ -1289,35 +1296,40 @@ fluxion_hash_set_path() {
# If we've got a default path, check if a hash exists. # If we've got a default path, check if a hash exists.
# 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
local choices=( \ if [ "$FLUXIONAuto" ]; then
"$FLUXIONUseFoundHashOption" \ FluxionHashPath=$hashPath
"$FLUXIONSpecifyHashPathOption" \ return
"$FLUXIONHashSourceRescanOption" \ else
"$FLUXIONGeneralBackOption" \ local choices=( \
) "$FLUXIONUseFoundHashOption" \
"$FLUXIONSpecifyHashPathOption" \
"$FLUXIONHashSourceRescanOption" \
"$FLUXIONGeneralBackOption" \
)
fluxion_header fluxion_header
echo -e "$FLUXIONVLine $FLUXIONFoundHashNotice" echo -e "$FLUXIONVLine $FLUXIONFoundHashNotice"
echo -e "$FLUXIONVLine $FLUXIONUseFoundHashQuery" echo -e "$FLUXIONVLine $FLUXIONUseFoundHashQuery"
echo echo
io_query_choice "" choices[@] io_query_choice "" choices[@]
echo echo
case "$IOQueryChoice" in case "$IOQueryChoice" in
"$FLUXIONUseFoundHashOption") "$FLUXIONUseFoundHashOption")
FluxionHashPath=$hashPath FluxionHashPath=$hashPath
return ;; return ;;
"$FLUXIONHashSourceRescanOption") "$FLUXIONHashSourceRescanOption")
fluxion_hash_set_path "$@" fluxion_hash_set_path "$@"
return $? ;; return $? ;;
"$FLUXIONGeneralBackOption") "$FLUXIONGeneralBackOption")
return -1 ;; return -1 ;;
esac esac
fi
fi fi
while [ ! "$FluxionHashPath" ]; do while [ ! "$FluxionHashPath" ]; do