diff --git a/fluxion.sh b/fluxion.sh index ab6602a..80a6853 100755 --- a/fluxion.sh +++ b/fluxion.sh @@ -22,13 +22,14 @@ readonly FLUXIONNoiseFloor=-90 readonly FLUXIONNoiseCeiling=-60 readonly FLUXIONVersion=5 -readonly FLUXIONRevision=2 +readonly FLUXIONRevision=4 # Declare window ration bigger = smaller windows FLUXIONWindowRatio=4 # Allow to skip dependencies if required, not recommended FLUXIONSkipDependencies=1 +FLUXIONMissingDependencies=0 # ============================================================ # # ================= < Script Sanity Checks > ================= # @@ -279,16 +280,21 @@ fluxion_startup() { "fuser:psmisc" "killall:psmisc" ) - if [ $FLUXIONSkipDependencies != 1 ];then while ! installer_utils_check_dependencies requiredCLITools[@]; do - if ! installer_utils_run_dependencies InstallerUtilsCheckDependencies[@]; then - echo - echo -e "${CRed}Dependency installation failed!$CClr" - echo "Press enter to retry, ctrl+c to exit..." - read -r bullshit - fi + if ! installer_utils_run_dependencies InstallerUtilsCheckDependencies[@]; then + echo + echo -e "${CRed}Dependency installation failed!$CClr" + echo "Press enter to retry, ctrl+c to exit..." + read -r bullshit + fi done - fi + if [ $FLUXIONMissingDependencies -eq 1 ] && [ $FLUXIONSkipDependencies -eq 1 ];then + echo -e "\n\n" + format_center_literals "[ ${CSRed}Missing dependencies: try to install using ./fluxion.sh -i${CClr} ]" + echo -e "$FormatCenterLiterals"; sleep 3 + + exit 7 + fi echo -e "\\n\\n" # This echo is for spacing } @@ -1014,8 +1020,7 @@ fluxion_get_interface() { # If only one interface exists and it's not unavailable, choose it. if [ "${#interfacesAvailable[@]}" -eq 1 -a \ "${interfacesAvailableState[0]}" != "[-]" -a \ - "$skipOption" == "" ]; then - FluxionInterfaceSelected="${interfacesAvailable[0]}" + "$skipOption" == "" ]; then FluxionInterfaceSelected="${interfacesAvailable[0]}" FluxionInterfaceSelectedState="${interfacesAvailableState[0]}" FluxionInterfaceSelectedInfo="${interfacesAvailableInfo[0]}" break @@ -1086,13 +1091,13 @@ fluxion_target_get_candidates() { #fi # Begin scanner and output all results to "dump-01.csv." - if ! xterm -title "$FLUXIONScannerHeader" $TOPLEFTBIG \ +if ! xterm -title "$FLUXIONScannerHeader" $TOPLEFTBIG \ -bg "#000000" -fg "#FFFFFF" -e \ "airodump-ng -Mat WPA "${2:+"--channel $2"}" "${3:+"--band $3"}" -w \"$FLUXIONWorkspacePath/dump\" $1" 2> $FLUXIONOutputDevice; then echo -e "$FLUXIONVLine$CRed $FLUXIONGeneralXTermFailureError" sleep 5 return 2 - fi +fi # Sanity check the capture files generated by the scanner. # If the file doesn't exist, or if it's empty, abort immediately. diff --git a/lib/installer/InstallerUtils.sh b/lib/installer/InstallerUtils.sh index e3af974..298bd79 100755 --- a/lib/installer/InstallerUtils.sh +++ b/lib/installer/InstallerUtils.sh @@ -218,7 +218,11 @@ installer_utils_check_dependencies() { if ! hash "$__installer_utils_check_dependencies__CLITool" 2>/dev/null; then __installer_utils_check_dependencies__state="$CRed Missing!$CClr" - InstallerUtilsCheckDependencies+=("$__installer_utils_check_dependencies__CLIToolInfo") + if [ $FLUXIONSkipDependencies -eq 0 ];then + InstallerUtilsCheckDependencies+=("$__installer_utils_check_dependencies__CLIToolInfo") + else + FLUXIONMissingDependencies=1 + fi fi format_center_literals "$InstallerUtilsNoticeMark ${__installer_utils_check_dependencies__identifier// /.}$__installer_utils_check_dependencies__state" @@ -271,10 +275,10 @@ installer_utils_run_dependencies() { local __installer_utils_run_dependencies__package for __installer_utils_run_dependencies__package in ${__installer_utils_run_dependencies__packages//|/ }; do clear - if $PackageManagerCLT $PackageManagerCLTInstallOptions $__installer_utils_run_dependencies__package; then - local __installer_utils_run_dependencies__packageStatus="installed" - break - fi + if $PackageManagerCLT $PackageManagerCLTInstallOptions $__installer_utils_run_dependencies__package; then + local __installer_utils_run_dependencies__packageStatus="installed" + break + fi done if [ -z ${__installer_utils_run_dependencies__packageStatus+x} ]; then