From a892810f16fb4b2671e6056960ca4a98b70963a6 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 30 Dec 2017 22:45:48 -0600 Subject: [PATCH] Fixed missing quotes bug & suppressed rfkill error. Fixed a bug caused by a blank variable not being quoted (syntax error). Redirected rfkill's error to log file when no wireless devices are available. --- fluxion.sh | 2 +- lib/InterfaceUtils.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fluxion.sh b/fluxion.sh index 6070209..618c32d 100755 --- a/fluxion.sh +++ b/fluxion.sh @@ -356,7 +356,7 @@ function fluxion_set_language() { function fluxion_unset_interface() { # Unblock interfaces to make them available. echo -e "$FLUXIONVLine $FLUXIONUnblockingWINotice" - rfkill unblock all + rfkill unblock all &> $FLUXIONOutputDevice # Find all monitor-mode interfaces & all AP interfaces. echo -e "$FLUXIONVLine $FLUXIONFindingExtraWINotice" diff --git a/lib/InterfaceUtils.sh b/lib/InterfaceUtils.sh index 22b7b2e..5e56221 100755 --- a/lib/InterfaceUtils.sh +++ b/lib/InterfaceUtils.sh @@ -187,7 +187,7 @@ function interface_prompt() { fi # If only one interface exists and it's available, choose it. - if [ ${#__interface_prompt__ifAvailable[@]} -eq 1 -a ${__interface_prompt__ifAvailableState[0]} = "[+]" ]; then + if [ "${#__interface_prompt__ifAvailable[@]}" -eq 1 -a "${__interface_prompt__ifAvailableState[0]}" = "[+]" ]; then InterfacePromptWISelected="${__interface_prompt__ifAvailable[0]}" InterfacePromptWISelectedState="[+]" # It passed the condition, it must be + InterfacePromptWISelectedInfo="${__interface_prompt__ifAvailableInfo[0]}"