From cacae7aa4c4727e96e2c3888d8889380e014f870 Mon Sep 17 00:00:00 2001 From: Matias Barcenas Date: Thu, 24 May 2018 19:13:29 -0500 Subject: [PATCH] Fixed path bugs & incremented revision. Fixed bugs with the Captive Portal attack caused by incorrectly set paths. Incremented revision to reflect significant changes to path handling. --- attacks/Captive Portal/attack.sh | 12 ++++++------ fluxion.sh | 2 +- lib/IOUtils.sh | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/attacks/Captive Portal/attack.sh b/attacks/Captive Portal/attack.sh index 73862ee..a563ed7 100755 --- a/attacks/Captive Portal/attack.sh +++ b/attacks/Captive Portal/attack.sh @@ -144,7 +144,7 @@ function captive_portal_set_ap_service() { if [ "$CaptivePortalAPService" ]; then if ! type -t ap_service_start; then # AP Service: Load the service's helper routines. - source "lib/ap/$CaptivePortalAPService.sh" + source "$FLUXIONLibPath/ap/$CaptivePortalAPService.sh" fi return 0 fi @@ -189,7 +189,7 @@ function captive_portal_set_ap_service() { fi # AP Service: Load the service's helper routines. - source "lib/ap/$CaptivePortalAPService.sh" + source "$FLUXIONLibPath/ap/$CaptivePortalAPService.sh" } captive_portal_unset_authenticator() { @@ -459,17 +459,17 @@ captive_portal_set_user_interface() { local sites=() # Attempt adding generic portals only if the directory exists. - if [ -d attacks/Captive\ Portal/generic/languages ]; then + if [ -d "$FLUXIONPath/attacks/Captive Portal/generic/languages" ]; then # Normalize the names of the generic portals for presentation. - for site in attacks/Captive\ Portal/generic/languages/*.lang; do + for site in "$FLUXIONPath/attacks/Captive Portal/generic/languages/"*.lang; do sites+=("${CaptivePortalGenericInterfaceOption}_$(basename "${site%.lang}")") done fi # Attempt adding custom portals only if the directory exists. - if [ -d attacks/Captive\ Portal/sites ]; then + if [ -d "$FLUXIONPath/attacks/Captive Portal/sites" ]; then # Retrieve available portal sites and strip the .portal extension. - for site in attacks/Captive\ Portal/sites/*.portal; do + for site in "$FLUXIONPath/attacks/Captive Portal/sites/"*.portal; do sites+=("$(basename "${site%.portal}")") done fi diff --git a/fluxion.sh b/fluxion.sh index 184ef4f..493abb8 100755 --- a/fluxion.sh +++ b/fluxion.sh @@ -22,7 +22,7 @@ readonly FLUXIONNoiseFloor=-90 readonly FLUXIONNoiseCeiling=-60 readonly FLUXIONVersion=4 -readonly FLUXIONRevision=10 +readonly FLUXIONRevision=11 # Declare window ration bigger = smaller windows FLUXIONWindowRatio=4 diff --git a/lib/IOUtils.sh b/lib/IOUtils.sh index 0384372..49aad59 100755 --- a/lib/IOUtils.sh +++ b/lib/IOUtils.sh @@ -45,8 +45,8 @@ io_input_enumerated_choice() { IOInputEnumeratedChoice=${__io_input_enumerated_choice__choices[$IOInputChoice]} } -# This outputs formatted lines of fields. -# The takes an output file (like stdout), +# This function outputs formatted lines of fields. +# The function takes an output file (like stdout), # a "printf format string," and a variable number # of indirect-expansion passed arrays (reference). # NOTICE: At least the first array must be passed!