Fluxion 5.4:

- Add dependencies check
    - Exit gracefully
This commit is contained in:
deltaxflux 2018-08-18 11:05:50 +02:00
parent 7dad0eaa25
commit 1072976153
2 changed files with 27 additions and 18 deletions

View File

@ -22,13 +22,14 @@ readonly FLUXIONNoiseFloor=-90
readonly FLUXIONNoiseCeiling=-60 readonly FLUXIONNoiseCeiling=-60
readonly FLUXIONVersion=5 readonly FLUXIONVersion=5
readonly FLUXIONRevision=2 readonly FLUXIONRevision=4
# Declare window ration bigger = smaller windows # Declare window ration bigger = smaller windows
FLUXIONWindowRatio=4 FLUXIONWindowRatio=4
# Allow to skip dependencies if required, not recommended # Allow to skip dependencies if required, not recommended
FLUXIONSkipDependencies=1 FLUXIONSkipDependencies=1
FLUXIONMissingDependencies=0
# ============================================================ # # ============================================================ #
# ================= < Script Sanity Checks > ================= # # ================= < Script Sanity Checks > ================= #
@ -279,7 +280,6 @@ fluxion_startup() {
"fuser:psmisc" "killall:psmisc" "fuser:psmisc" "killall:psmisc"
) )
if [ $FLUXIONSkipDependencies != 1 ];then
while ! installer_utils_check_dependencies requiredCLITools[@]; do while ! installer_utils_check_dependencies requiredCLITools[@]; do
if ! installer_utils_run_dependencies InstallerUtilsCheckDependencies[@]; then if ! installer_utils_run_dependencies InstallerUtilsCheckDependencies[@]; then
echo echo
@ -288,6 +288,12 @@ fluxion_startup() {
read -r bullshit read -r bullshit
fi fi
done done
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 fi
echo -e "\\n\\n" # This echo is for spacing 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 only one interface exists and it's not unavailable, choose it.
if [ "${#interfacesAvailable[@]}" -eq 1 -a \ if [ "${#interfacesAvailable[@]}" -eq 1 -a \
"${interfacesAvailableState[0]}" != "[-]" -a \ "${interfacesAvailableState[0]}" != "[-]" -a \
"$skipOption" == "" ]; then "$skipOption" == "" ]; then FluxionInterfaceSelected="${interfacesAvailable[0]}"
FluxionInterfaceSelected="${interfacesAvailable[0]}"
FluxionInterfaceSelectedState="${interfacesAvailableState[0]}" FluxionInterfaceSelectedState="${interfacesAvailableState[0]}"
FluxionInterfaceSelectedInfo="${interfacesAvailableInfo[0]}" FluxionInterfaceSelectedInfo="${interfacesAvailableInfo[0]}"
break break
@ -1086,13 +1091,13 @@ fluxion_target_get_candidates() {
#fi #fi
# Begin scanner and output all results to "dump-01.csv." # 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 \ -bg "#000000" -fg "#FFFFFF" -e \
"airodump-ng -Mat WPA "${2:+"--channel $2"}" "${3:+"--band $3"}" -w \"$FLUXIONWorkspacePath/dump\" $1" 2> $FLUXIONOutputDevice; then "airodump-ng -Mat WPA "${2:+"--channel $2"}" "${3:+"--band $3"}" -w \"$FLUXIONWorkspacePath/dump\" $1" 2> $FLUXIONOutputDevice; then
echo -e "$FLUXIONVLine$CRed $FLUXIONGeneralXTermFailureError" echo -e "$FLUXIONVLine$CRed $FLUXIONGeneralXTermFailureError"
sleep 5 sleep 5
return 2 return 2
fi fi
# Sanity check the capture files generated by the scanner. # Sanity check the capture files generated by the scanner.
# If the file doesn't exist, or if it's empty, abort immediately. # If the file doesn't exist, or if it's empty, abort immediately.

View File

@ -218,7 +218,11 @@ installer_utils_check_dependencies() {
if ! hash "$__installer_utils_check_dependencies__CLITool" 2>/dev/null; then if ! hash "$__installer_utils_check_dependencies__CLITool" 2>/dev/null; then
__installer_utils_check_dependencies__state="$CRed Missing!$CClr" __installer_utils_check_dependencies__state="$CRed Missing!$CClr"
if [ $FLUXIONSkipDependencies -eq 0 ];then
InstallerUtilsCheckDependencies+=("$__installer_utils_check_dependencies__CLIToolInfo") InstallerUtilsCheckDependencies+=("$__installer_utils_check_dependencies__CLIToolInfo")
else
FLUXIONMissingDependencies=1
fi
fi fi
format_center_literals "$InstallerUtilsNoticeMark ${__installer_utils_check_dependencies__identifier// /.}$__installer_utils_check_dependencies__state" format_center_literals "$InstallerUtilsNoticeMark ${__installer_utils_check_dependencies__identifier// /.}$__installer_utils_check_dependencies__state"