Merge branch 'master' of github.com:FluxionNetwork/fluxion
This commit is contained in:
commit
7292f90369
24
fluxion.sh
24
fluxion.sh
|
@ -27,6 +27,9 @@ readonly FLUXIONRevision=12
|
|||
# Declare window ration bigger = smaller windows
|
||||
FLUXIONWindowRatio=4
|
||||
|
||||
# Allow to skip dependencies if required, not recommended
|
||||
FLUXIONSkipDependencies=0
|
||||
|
||||
# ============================================================ #
|
||||
# ================= < Script Sanity Checks > ================= #
|
||||
# ============================================================ #
|
||||
|
@ -80,7 +83,7 @@ source "$FLUXIONPath/lib/Help.sh"
|
|||
# ============================================================ #
|
||||
if ! FLUXIONCLIArguments=$(
|
||||
getopt --options="vdkrnmtbhe:c:l:a:r" \
|
||||
--longoptions="debug,version,killer,reloader,help,airmon-ng,multiplexer,target,test,auto,bssid:,essid:,channel:,language:,attack:,ratio:" \
|
||||
--longoptions="debug,version,killer,reloader,help,airmon-ng,multiplexer,target,test,auto,bssid:,essid:,channel:,language:,attack:,ratio,skip-dependencies" \
|
||||
--name="FLUXION V$FLUXIONVersion.$FLUXIONRevision" -- "$@"
|
||||
); then
|
||||
echo -e "${CRed}Aborted$CClr, parameter error detected..."; exit 5
|
||||
|
@ -120,6 +123,7 @@ while [ "$1" != "" -a "$1" != "--" ]; do
|
|||
-a|--attack) FluxionAttack=$2; shift;;
|
||||
--ratio) FLUXIONWindowRatio=$2; shift;;
|
||||
--auto) readonly FLUXIONAuto=1;;
|
||||
--skip-dependencies) readonly FLUXIONSkipDependencies=1;;
|
||||
esac
|
||||
shift # Shift new parameters
|
||||
done
|
||||
|
@ -274,14 +278,16 @@ fluxion_startup() {
|
|||
"fuser:psmisc" "killall:psmisc"
|
||||
)
|
||||
|
||||
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 bullshit
|
||||
fi
|
||||
done
|
||||
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 bullshit
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo -e "\n\n" # This echo is for spacing
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ InstallerUtilsNoticeMark="*"
|
|||
|
||||
PackageManagerLog="$InstallerUtilsWorkspacePath/package_manager.log"
|
||||
|
||||
function installer_utils_run_spinner() {
|
||||
installer_utils_run_spinner() {
|
||||
local pid=$1
|
||||
local delay=0.15
|
||||
local spinstr="|/-\\"
|
||||
|
@ -33,7 +33,7 @@ function installer_utils_run_spinner() {
|
|||
# $1 source - Online Info File (text)
|
||||
# $2 version regex - Online version (regex)
|
||||
# $3 revision regex - Online version (regex)
|
||||
function installer_utils_check_version() {
|
||||
installer_utils_check_version() {
|
||||
if [ ${#@} -ne 3 ]; then return 1; fi
|
||||
|
||||
# Attempt to retrieve versioning information from repository script.
|
||||
|
@ -59,7 +59,7 @@ function installer_utils_check_version() {
|
|||
# $3 version local - Local version (number)
|
||||
# $4 revision regex - Online version (regex)
|
||||
# $5 revision local - Local version (number)
|
||||
function installer_utils_check_update() {
|
||||
installer_utils_check_update() {
|
||||
# The following set of statements aren't very generic, need to be refactored.
|
||||
local versionDialog="Online Version"
|
||||
local versionDialogOffset=$(($(tput cols) / 2 + ((${#versionDialog} / 2) - 4)))
|
||||
|
@ -108,7 +108,7 @@ function installer_utils_check_update() {
|
|||
}
|
||||
|
||||
# Parameters: $1 - Update source (zip) $2 - Backup file name $3 - Update output
|
||||
function installer_utils_run_update() {
|
||||
installer_utils_run_update() {
|
||||
if [ ${#@} -ne 3 ]; then return 1; fi
|
||||
|
||||
local __installer_utils_run_update__source="$1"
|
||||
|
@ -204,7 +204,7 @@ function installer_utils_run_update() {
|
|||
}
|
||||
|
||||
# Parameters: $1 - CLI Tools required array $2 - CLI Tools missing array (will be populated)
|
||||
function installer_utils_check_dependencies() {
|
||||
installer_utils_check_dependencies() {
|
||||
if [ ! "$1" ]; then return 1; fi
|
||||
|
||||
local __installer_utils_check_dependencies__CLIToolsInfo=("${!1}")
|
||||
|
@ -229,15 +229,14 @@ function installer_utils_check_dependencies() {
|
|||
}
|
||||
|
||||
# Parameters: $1 - CLI Tools missing array (will be installed) $2 - substitutes array
|
||||
function installer_utils_run_dependencies() {
|
||||
installer_utils_run_dependencies() {
|
||||
if [ ! "$1" ]; then return 1; fi
|
||||
if ! ping -q -w 1 -c 1 8.8.8.8 &> /dev/null; then
|
||||
format_center_literals "[${CRed}!$CClr] ${CBYel}No internet connection found!$CClr"
|
||||
echo -e "\n\n$FormatCenterLiterals"
|
||||
|
||||
format_center_literals "[ ${CSRed}CANNOT CONTINUE${CClr} ]"
|
||||
echo -e "$FormatCenterLiterals"
|
||||
sleep 5
|
||||
echo -e "$FormatCenterLiterals"; sleep 3
|
||||
|
||||
return 3
|
||||
fi
|
||||
|
@ -254,12 +253,12 @@ function installer_utils_run_dependencies() {
|
|||
done
|
||||
|
||||
if [ ! "$PackageManagerCLT" ]; then
|
||||
format_center_literals "${CRed}[ ~ No Suitable Package Manager Found ~ ]$CClr"
|
||||
echo
|
||||
format_center_literals "${CRed}[ ~ No Suitable Package Manager Found ~ ]$CClr";echo
|
||||
sleep 3
|
||||
return 2
|
||||
fi
|
||||
|
||||
check_package_manager
|
||||
prep_package_manager
|
||||
|
||||
unset __installer_utils_run_dependencies__installerStatus
|
||||
|
|
|
@ -11,6 +11,10 @@ if [ -f "/etc/debian_version" ]; then
|
|||
echo "$(cat /etc/apt/sources.list | grep -v 'deb http://http.kali.org/kali kali-rolling main non-free contrib # Installed By FLUXION')" >/etc/apt/sources.list
|
||||
}
|
||||
|
||||
check_package_manager() {
|
||||
echo "Nothing to check." >$PackageManagerOutputDevice
|
||||
}
|
||||
|
||||
prep_package_manager() {
|
||||
if [ ! "$(cat /etc/apt/sources.list | egrep 'deb http://http.kali.org/kali ((kali-rolling|main|contrib|non-free) )*')" ]; then
|
||||
echo "Adding missing sources to package manager, please wait."
|
||||
|
|
|
@ -11,6 +11,10 @@ if [ -f "/etc/gentoo-release" ]; then
|
|||
echo "Nothing to unprepare." >$PackageManagerOutputDevice
|
||||
}
|
||||
|
||||
check_package_manager() {
|
||||
echo "Nothing to check." >$PackageManagerOutputDevice
|
||||
}
|
||||
|
||||
prep_package_manager() {
|
||||
echo "Nothing to prepare." >$PackageManagerOutputDevice
|
||||
}
|
||||
|
|
|
@ -19,6 +19,10 @@ if [ -f "/etc/arch-release" ]; then
|
|||
echo "Nothing to unprepare." >$PackageManagerOutputDevice
|
||||
}
|
||||
|
||||
check_package_manager() {
|
||||
if [ -f "/var/lib/pacman/db.lck" ];then echo -e "[\033[31m!\033[0m] Pacman is locked, can't install dependencies. Exit."; exit 4; fi
|
||||
}
|
||||
|
||||
prep_package_manager() {
|
||||
echo "Nothing to prepare." >$PackageManagerOutputDevice
|
||||
}
|
||||
|
|
|
@ -11,6 +11,10 @@ if [ -f "/etc/redhat-release" ]; then
|
|||
echo "Nothing to unprepare." >$PackageManagerOutputDevice
|
||||
}
|
||||
|
||||
check_package_manager () {
|
||||
echo "Nothing to check." >$PackageManagerOutputDevice
|
||||
}
|
||||
|
||||
prep_package_manager() {
|
||||
echo "Nothing to prepare." >$PackageManagerOutputDevice
|
||||
}
|
||||
|
|
|
@ -11,6 +11,10 @@ if [ -f "/etc/SuSE-release" ]; then
|
|||
echo "Nothing to unprepare." >$PackageManagerOutputDevice
|
||||
}
|
||||
|
||||
check_package_manager() {
|
||||
echo "Nothing to check." >$PackageManagerOutputDevice
|
||||
}
|
||||
|
||||
prep_package_manager() {
|
||||
echo "Nothing to prepare." >$PackageManagerOutputDevice
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue