Adjusted fluxion & libs interface colors.
This commit is contained in:
parent
6cdd09ebeb
commit
b7a4fa2e6e
21
fluxion.sh
21
fluxion.sh
|
@ -35,8 +35,8 @@ source lib/IOUtils.sh
|
||||||
source lib/HashUtils.sh
|
source lib/HashUtils.sh
|
||||||
|
|
||||||
################################ < FLUXION Parameters > ################################
|
################################ < FLUXION Parameters > ################################
|
||||||
FLUXIONPrompt="$CRed[${CBlu}fluxion$CYel@$CClr$HOSTNAME$CRed]-[$CYel~$CRed]$CClr "
|
FLUXIONPrompt="$CRed[${CSBlu}fluxion$CSYel@$CSWht$HOSTNAME$CClr$CRed]-[$CYel~$CRed]$CClr "
|
||||||
FLUXIONVLine="$CRed[$CYel*$CRed]$CClr"
|
FLUXIONVLine="$CRed[$CSYel*$CClr$CRed]$CClr"
|
||||||
|
|
||||||
################################ < Library Parameters > ################################
|
################################ < Library Parameters > ################################
|
||||||
InterfaceUtilsOutputDevice="$FLUXIONOutputDevice"
|
InterfaceUtilsOutputDevice="$FLUXIONOutputDevice"
|
||||||
|
@ -142,7 +142,6 @@ function fluxion_exitmode() {
|
||||||
systemctl restart NetworkManager &> $FLUXIONOutputDevice &
|
systemctl restart NetworkManager &> $FLUXIONOutputDevice &
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
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"
|
||||||
|
@ -202,16 +201,16 @@ function fluxion_header() {
|
||||||
format_apply_autosize "[%*s]\n"
|
format_apply_autosize "[%*s]\n"
|
||||||
local verticalBorder=$FormatApplyAutosize
|
local verticalBorder=$FormatApplyAutosize
|
||||||
|
|
||||||
format_apply_autosize "[%*s${CRed}FLUXION $FLUXIONVersion.$FLUXIONRevision ${CRed}< F${CYel}luxion ${CRed}I${CYel}s ${CRed}T${CYel}he ${CRed}F${CYel}uture >%*s$CBlu]\n";
|
format_apply_autosize "[%*s${CSRed}FLUXION $FLUXIONVersion${CSWht}.${CSBlu}$FLUXIONRevision$CSRed <$CIRed F${CIYel}luxion$CIRed I${CIYel}s$CIRed T${CIYel}he$CIRed F${CIYel}uture$CClr$CSYel >%*s$CSBlu]\n";
|
||||||
local headerTextFormat="$FormatApplyAutosize"
|
local headerTextFormat="$FormatApplyAutosize"
|
||||||
|
|
||||||
fluxion_conditional_clear
|
fluxion_conditional_clear
|
||||||
|
|
||||||
echo -e "`printf "$CRed$verticalBorder" "" | sed -r "s/ /~/g"`"
|
echo -e "`printf "$CSRed$verticalBorder" "" | sed -r "s/ /~/g"`"
|
||||||
printf "$CRed$verticalBorder" ""
|
printf "$CSRed$verticalBorder" ""
|
||||||
printf "$headerTextFormat" "" ""
|
printf "$headerTextFormat" "" ""
|
||||||
printf "$CBlu$verticalBorder" ""
|
printf "$CSBlu$verticalBorder" ""
|
||||||
echo -e "`printf "$CBlu$verticalBorder" "" | sed -r "s/ /~/g"`$CClr"
|
echo -e "`printf "$CSBlu$verticalBorder" "" | sed -r "s/ /~/g"`$CClr"
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
@ -249,7 +248,7 @@ if [ ! $FLUXIONDebug ]; then
|
||||||
format_center_literals "${CGrn}Site: ${CRed}https://github.com/FluxionNetwork/fluxion$CClr"; echo -e "$FormatCenterLiterals"
|
format_center_literals "${CGrn}Site: ${CRed}https://github.com/FluxionNetwork/fluxion$CClr"; echo -e "$FormatCenterLiterals"
|
||||||
|
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
format_center_literals "${CRed}FLUXION $CWht$FLUXIONVersion (rev. $CGrn$FLUXIONRevision$CWht)$CYel by$CWht ghost"; echo -e "$FormatCenterLiterals"
|
format_center_literals "${CSRed}FLUXION $FLUXIONVersion$CClr (rev. $CSBlu$FLUXIONRevision$CClr)$CYel by$CWht ghost"; echo -e "$FormatCenterLiterals"
|
||||||
|
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
if installer_utils_check_update "https://raw.githubusercontent.com/FluxionNetwork/fluxion/master/fluxion.sh" "FLUXIONVersion=" "FLUXIONRevision=" $FLUXIONVersion $FLUXIONRevision
|
if installer_utils_check_update "https://raw.githubusercontent.com/FluxionNetwork/fluxion/master/fluxion.sh" "FLUXIONVersion=" "FLUXIONRevision=" $FLUXIONVersion $FLUXIONRevision
|
||||||
|
@ -353,7 +352,7 @@ function fluxion_set_language() {
|
||||||
local languages
|
local languages
|
||||||
readarray -t languages < <(head -n 3 language/*.sh | grep -E "^# native: " | sed -E 's/# \w+: //')
|
readarray -t languages < <(head -n 3 language/*.sh | grep -E "^# native: " | sed -E 's/# \w+: //')
|
||||||
|
|
||||||
io_query_format_fields "$FLUXIONVLine Select your language" "\t$CRed[$CYel%d$CRed]$CClr %s / %s\n" languageCodes[@] languages[@]
|
io_query_format_fields "$FLUXIONVLine Select your language" "\t$CRed[$CSYel%d$CClr$CRed]$CClr %s / %s\n" languageCodes[@] languages[@]
|
||||||
|
|
||||||
FLUXIONLanguage=${IOQueryFormatFields[0]}
|
FLUXIONLanguage=${IOQueryFormatFields[0]}
|
||||||
|
|
||||||
|
@ -946,7 +945,7 @@ function fluxion_set_attack() {
|
||||||
identifiers+=("$FLUXIONGeneralBackOption")
|
identifiers+=("$FLUXIONGeneralBackOption")
|
||||||
descriptions+=("")
|
descriptions+=("")
|
||||||
|
|
||||||
io_query_format_fields "" "\t$CRed[$CYel%d$CRed]$CClr%0.0s $CCyn%b$CClr %b\n" attacks[@] identifiers[@] descriptions[@]
|
io_query_format_fields "" "\t$CRed[$CSYel%d$CClr$CRed]$CClr%0.0s $CCyn%b$CClr %b\n" attacks[@] identifiers[@] descriptions[@]
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ function io_input_choice() {
|
||||||
|
|
||||||
local __io_input_choice__input
|
local __io_input_choice__input
|
||||||
read __io_input_choice__input
|
read __io_input_choice__input
|
||||||
|
|
||||||
local __io_input_choice__choices
|
local __io_input_choice__choices
|
||||||
for __io_input_choice__choices in ${@}; do
|
for __io_input_choice__choices in ${@}; do
|
||||||
array_contains $__io_input_choice__choices "$__io_input_choice__input"
|
array_contains $__io_input_choice__choices "$__io_input_choice__input"
|
||||||
|
@ -51,7 +51,7 @@ function io_output_format_fields() {
|
||||||
# Determine the amount of arguments passed.
|
# Determine the amount of arguments passed.
|
||||||
local __io_output_format_fields__argument_count=${#@}
|
local __io_output_format_fields__argument_count=${#@}
|
||||||
|
|
||||||
# Load locally by indirect expansion, ${! ... },
|
# Load locally by indirect expansion, ${! ... },
|
||||||
# and mangle the variable number argument arrays.
|
# and mangle the variable number argument arrays.
|
||||||
local __io_output_format_fields__i
|
local __io_output_format_fields__i
|
||||||
for ((__io_output_format_fields__i = 3; \
|
for ((__io_output_format_fields__i = 3; \
|
||||||
|
@ -85,7 +85,7 @@ function io_query_format_fields() {
|
||||||
local __io_query_format_fields__query="$1"
|
local __io_query_format_fields__query="$1"
|
||||||
local __io_query_format_fields__format="$2"
|
local __io_query_format_fields__format="$2"
|
||||||
|
|
||||||
# Load locally by indirect expansion, ${! ... },
|
# Load locally by indirect expansion, ${! ... },
|
||||||
# and mangle the variable number argument arrays.
|
# and mangle the variable number argument arrays.
|
||||||
local __io_query_format_fields__i
|
local __io_query_format_fields__i
|
||||||
for ((__io_query_format_fields__i = 3; \
|
for ((__io_query_format_fields__i = 3; \
|
||||||
|
@ -124,9 +124,9 @@ function io_query_choice() {
|
||||||
if [ ${#@} -lt 2 ]; then
|
if [ ${#@} -lt 2 ]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
__io_query_choice__query=$([ -z "$1" ] && echo -n "" || echo -ne "$FLUXIONVLine $1\n")
|
__io_query_choice__query=$([ -z "$1" ] && echo -n "" || echo -ne "$FLUXIONVLine $1\n")
|
||||||
io_query_format_fields "$__io_query_choice__query" "\t$CRed[$CYel%d$CRed]$CClr %b\n" $2
|
io_query_format_fields "$__io_query_choice__query" "\t$CRed[$CSYel%d$CClr$CRed]$CClr %b\n" $2
|
||||||
|
|
||||||
IOQueryChoice="${IOQueryFormatFields[0]}"
|
IOQueryChoice="${IOQueryFormatFields[0]}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,7 +192,7 @@ function interface_prompt() {
|
||||||
InterfacePromptWISelectedState="[+]" # It passed the condition, it must be +
|
InterfacePromptWISelectedState="[+]" # It passed the condition, it must be +
|
||||||
InterfacePromptWISelectedInfo="${__interface_prompt__ifAvailableInfo[0]}"
|
InterfacePromptWISelectedInfo="${__interface_prompt__ifAvailableInfo[0]}"
|
||||||
else
|
else
|
||||||
format_apply_autosize "$CRed[$CYel%1d$CRed]%b %-8b %3s$CClr %-*.*s\n"
|
format_apply_autosize "$CRed[$CSYel%1d$CClr$CRed]%b %-8b %3s$CClr %-*.*s\n"
|
||||||
io_query_format_fields "$1" "$FormatApplyAutosize" \
|
io_query_format_fields "$1" "$FormatApplyAutosize" \
|
||||||
__interface_prompt__ifAvailableColor[@] __interface_prompt__ifAvailable[@] \
|
__interface_prompt__ifAvailableColor[@] __interface_prompt__ifAvailable[@] \
|
||||||
__interface_prompt__ifAvailableState[@] __interface_prompt__ifAvailableInfo[@]
|
__interface_prompt__ifAvailableState[@] __interface_prompt__ifAvailableInfo[@]
|
||||||
|
|
Loading…
Reference in New Issue