Corrected tab-space inconsistency.
This commit is contained in:
parent
29cd8c3186
commit
3375864bb1
43
fluxion.sh
43
fluxion.sh
|
@ -64,18 +64,18 @@ fi
|
||||||
|
|
||||||
################################### < XTerm Checks > ###################################
|
################################### < XTerm Checks > ###################################
|
||||||
if [ ! "${DISPLAY:-}" ]; then
|
if [ ! "${DISPLAY:-}" ]; then
|
||||||
echo -e "${CRed}The script should be exected inside a X (graphical) session.$CClr"
|
echo -e "${CRed}The script should be exected inside a X (graphical) session.$CClr"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! hash xdpyinfo 2>/dev/null; then
|
if ! hash xdpyinfo 2>/dev/null; then
|
||||||
echo -e "${CRed}xdpyinfo not installed, please install the relevant package for your distribution.$CClr"
|
echo -e "${CRed}xdpyinfo not installed, please install the relevant package for your distribution.$CClr"
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! xdpyinfo &> /dev/null; then
|
if ! xdpyinfo &> /dev/null; then
|
||||||
echo -e "${CRed}The script failed to initialize an xterm test session.$CClr"
|
echo -e "${CRed}The script failed to initialize an xterm test session.$CClr"
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################################# < Default Language > #################################
|
################################# < Default Language > #################################
|
||||||
|
@ -142,7 +142,7 @@ function fluxion_exitmode() {
|
||||||
systemctl restart NetworkManager &> $FLUXIONOutputDevice &
|
systemctl restart NetworkManager &> $FLUXIONOutputDevice &
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
killall lighttpd
|
killall lighttpd
|
||||||
|
|
||||||
echo -e "$CWht[$CGrn+$CWht] $CGrn$FLUXIONCleanupSuccessNotice$CClr"
|
echo -e "$CWht[$CGrn+$CWht] $CGrn$FLUXIONCleanupSuccessNotice$CClr"
|
||||||
echo -e "$CWht[$CGrn+$CWht] $CGry$FLUXIONThanksSupportersNotice$CClr"
|
echo -e "$CWht[$CGrn+$CWht] $CGry$FLUXIONThanksSupportersNotice$CClr"
|
||||||
|
@ -170,11 +170,11 @@ function fluxion_conditional_bail() {
|
||||||
|
|
||||||
# ERROR Report only in Developer Mode
|
# ERROR Report only in Developer Mode
|
||||||
function fluxion_error_report() {
|
function fluxion_error_report() {
|
||||||
echo "Error on line $1"
|
echo "Error on line $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$FLUXIONDebug" ]; then
|
if [ "$FLUXIONDebug" ]; then
|
||||||
trap 'fluxion_error_report $LINENUM' ERR
|
trap 'fluxion_error_report $LINENUM' ERR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function fluxion_handle_abort_attack() {
|
function fluxion_handle_abort_attack() {
|
||||||
|
@ -218,7 +218,7 @@ function fluxion_header() {
|
||||||
|
|
||||||
# Create working directory
|
# Create working directory
|
||||||
if [ ! -d "$FLUXIONWorkspacePath" ]; then
|
if [ ! -d "$FLUXIONWorkspacePath" ]; then
|
||||||
mkdir -p "$FLUXIONWorkspacePath" &> $FLUXIONOutputDevice
|
mkdir -p "$FLUXIONWorkspacePath" &> $FLUXIONOutputDevice
|
||||||
fi
|
fi
|
||||||
|
|
||||||
####################################### < Start > ######################################
|
####################################### < Start > ######################################
|
||||||
|
@ -440,7 +440,7 @@ function fluxion_run_interface() {
|
||||||
|
|
||||||
local ifSelected="$1"
|
local ifSelected="$1"
|
||||||
|
|
||||||
if [ "$FLUXIONWIReloadDriver" ]; then
|
if [ "$FLUXIONWIReloadDriver" ]; then
|
||||||
# Get selected interface's driver details/info-descriptor.
|
# Get selected interface's driver details/info-descriptor.
|
||||||
echo -e "$FLUXIONVLine $FLUXIONGatheringWIInfoNotice"
|
echo -e "$FLUXIONVLine $FLUXIONGatheringWIInfoNotice"
|
||||||
|
|
||||||
|
@ -460,26 +460,26 @@ function fluxion_run_interface() {
|
||||||
while interface_physical "$ifSelected"
|
while interface_physical "$ifSelected"
|
||||||
do sleep 1
|
do sleep 1
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$FLUXIONWIKillProcesses" ]; then
|
if [ "$FLUXIONWIKillProcesses" ]; then
|
||||||
# Get list of potentially troublesome programs.
|
# Get list of potentially troublesome programs.
|
||||||
echo -e "$FLUXIONVLine $FLUXIONFindingConflictingProcessesNotice"
|
echo -e "$FLUXIONVLine $FLUXIONFindingConflictingProcessesNotice"
|
||||||
# This shit has to go reeeeeal soon (airmon-ng)...
|
# This shit has to go reeeeeal soon (airmon-ng)...
|
||||||
local conflictPrograms=($(airmon-ng check | awk 'NR>6{print $2}'))
|
local conflictPrograms=($(airmon-ng check | awk 'NR>6{print $2}'))
|
||||||
|
|
||||||
# Kill potentially troublesome programs.
|
# Kill potentially troublesome programs.
|
||||||
echo -e "$FLUXIONVLine $FLUXIONKillingConflictingProcessesNotice"
|
echo -e "$FLUXIONVLine $FLUXIONKillingConflictingProcessesNotice"
|
||||||
for program in "${conflictPrograms[@]}"
|
for program in "${conflictPrograms[@]}"
|
||||||
do killall "$program" &> $FLUXIONOutputDevice
|
do killall "$program" &> $FLUXIONOutputDevice
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$FLUXIONWIReloadDriver" ]; then
|
if [ "$FLUXIONWIReloadDriver" ]; then
|
||||||
# I'm not really sure about this conditional here.
|
# I'm not really sure about this conditional here.
|
||||||
# FLUXION 2 had the conditional so I kept it there.
|
# FLUXION 2 had the conditional so I kept it there.
|
||||||
if [ ! "$(echo $ifDriver | egrep 'rt2800|rt73')" ]
|
if [ ! "$(echo $ifDriver | egrep 'rt2800|rt73')" ]
|
||||||
then modprobe "$ifDriver" &> $FLUXIONOutputDevice 2>&1
|
then modprobe "$ifDriver" &> $FLUXIONOutputDevice 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -488,7 +488,7 @@ function fluxion_run_interface() {
|
||||||
while ! interface_physical "$ifSelected"
|
while ! interface_physical "$ifSelected"
|
||||||
do sleep 1
|
do sleep 1
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Activate wireless interface monitor mode and save identifier.
|
# Activate wireless interface monitor mode and save identifier.
|
||||||
echo -e "$FLUXIONVLine $FLUXIONStartingWIMonitorNotice"
|
echo -e "$FLUXIONVLine $FLUXIONStartingWIMonitorNotice"
|
||||||
|
@ -518,7 +518,7 @@ function fluxion_set_scanner() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$FLUXIONAuto" ];then
|
if [ "$FLUXIONAuto" ];then
|
||||||
fluxion_run_scanner $WIMonitor
|
fluxion_run_scanner $WIMonitor
|
||||||
else
|
else
|
||||||
local choices=("$FLUXIONScannerChannelOptionAll" "$FLUXIONScannerChannelOptionSpecific" "$FLUXIONGeneralBackOption")
|
local choices=("$FLUXIONScannerChannelOptionAll" "$FLUXIONScannerChannelOptionSpecific" "$FLUXIONGeneralBackOption")
|
||||||
io_query_choice "$FLUXIONScannerChannelQuery" choices[@]
|
io_query_choice "$FLUXIONScannerChannelQuery" choices[@]
|
||||||
|
@ -708,13 +708,13 @@ function fluxion_set_target_ap() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function fluxion_show_ap_info() {
|
function fluxion_show_ap_info() {
|
||||||
format_apply_autosize "%*s$CBlu%7s$CClr: %-32b%*s\n"
|
format_apply_autosize "%*s$CBlu%7s$CClr: %-32b%*s\n"
|
||||||
|
|
||||||
printf "$FormatApplyAutosize" "" "ESSID" "$APTargetSSID / $APTargetEncryption" ""
|
printf "$FormatApplyAutosize" "" "ESSID" "$APTargetSSID / $APTargetEncryption" ""
|
||||||
printf "$FormatApplyAutosize" "" "Channel" "$APTargetChannel" ""
|
printf "$FormatApplyAutosize" "" "Channel" "$APTargetChannel" ""
|
||||||
printf "$FormatApplyAutosize" "" "BSSID" "$APTargetMAC ($CYel${APTargetMaker:-UNKNOWN}$CClr)" ""
|
printf "$FormatApplyAutosize" "" "BSSID" "$APTargetMAC ($CYel${APTargetMaker:-UNKNOWN}$CClr)" ""
|
||||||
|
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -886,7 +886,7 @@ function fluxion_unset_attack() {
|
||||||
FLUXIONAttack=""
|
FLUXIONAttack=""
|
||||||
}
|
}
|
||||||
|
|
||||||
# Select attack strategie that will be used
|
# Select the attack strategy to be used.
|
||||||
function fluxion_set_attack() {
|
function fluxion_set_attack() {
|
||||||
if [ "$FLUXIONAttack" ]; then return 0; fi
|
if [ "$FLUXIONAttack" ]; then return 0; fi
|
||||||
|
|
||||||
|
@ -940,6 +940,7 @@ function fluxion_set_attack() {
|
||||||
|
|
||||||
FLUXIONAttack=${IOQueryFormatFields[0]}
|
FLUXIONAttack=${IOQueryFormatFields[0]}
|
||||||
|
|
||||||
|
# Load attack and its corresponding language file.
|
||||||
source "attacks/$FLUXIONAttack/language/$FLUXIONLanguage.sh"
|
source "attacks/$FLUXIONAttack/language/$FLUXIONLanguage.sh"
|
||||||
source "attacks/$FLUXIONAttack/attack.sh"
|
source "attacks/$FLUXIONAttack/attack.sh"
|
||||||
|
|
||||||
|
@ -953,7 +954,7 @@ function fluxion_set_attack() {
|
||||||
|
|
||||||
# Attack
|
# Attack
|
||||||
function fluxion_run_attack() {
|
function fluxion_run_attack() {
|
||||||
start_attack
|
start_attack
|
||||||
|
|
||||||
local choices=("$FLUXIONSelectAnotherAttackOption" "$FLUXIONGeneralExitOption")
|
local choices=("$FLUXIONSelectAnotherAttackOption" "$FLUXIONGeneralExitOption")
|
||||||
io_query_choice "`io_dynamic_output $FLUXIONAttackInProgressNotice`" choices[@]
|
io_query_choice "`io_dynamic_output $FLUXIONAttackInProgressNotice`" choices[@]
|
||||||
|
|
Loading…
Reference in New Issue