Fix #381. Create an option to optionally disable Network Manager killing

This commit is contained in:
v1s1t0r1sh3r3
2021-01-25 12:03:58 +01:00
parent f396ea0a36
commit 7aa8beb55a
2 changed files with 31 additions and 19 deletions

View File

@@ -25,6 +25,9 @@ AIRGEDDON_5GHZ_ENABLED=true
#Enabled true / Disabled false - Force to use iptables instead of nftables (it has no effect if nftables are not present) - Default value false
AIRGEDDON_FORCE_IPTABLES=false
#Enabled true / Disabled false - Force to kill Network Manager before launching Evil Twin attacks - Default value true
AIRGEDDON_FORCE_NETWORK_MANAGER_KILLING=true
#Available values: mdk3, mdk4 - Define which mdk version is going to be used - Default value mdk4
AIRGEDDON_MDK_VERSION=mdk4

View File

@@ -5402,7 +5402,7 @@ function clean_env_vars() {
debug_print
unset AIRGEDDON_AUTO_UPDATE AIRGEDDON_SKIP_INTRO AIRGEDDON_BASIC_COLORS AIRGEDDON_EXTENDED_COLORS AIRGEDDON_AUTO_CHANGE_LANGUAGE AIRGEDDON_SILENT_CHECKS AIRGEDDON_PRINT_HINTS AIRGEDDON_5GHZ_ENABLED AIRGEDDON_FORCE_IPTABLES AIRGEDDON_MDK_VERSION AIRGEDDON_PLUGINS_ENABLED AIRGEDDON_DEVELOPMENT_MODE AIRGEDDON_DEBUG_MODE AIRGEDDON_WINDOWS_HANDLING
unset AIRGEDDON_AUTO_UPDATE AIRGEDDON_SKIP_INTRO AIRGEDDON_BASIC_COLORS AIRGEDDON_EXTENDED_COLORS AIRGEDDON_AUTO_CHANGE_LANGUAGE AIRGEDDON_SILENT_CHECKS AIRGEDDON_PRINT_HINTS AIRGEDDON_5GHZ_ENABLED AIRGEDDON_FORCE_IPTABLES AIRGEDDON_FORCE_NETWORK_MANAGER_KILLING AIRGEDDON_MDK_VERSION AIRGEDDON_PLUGINS_ENABLED AIRGEDDON_DEVELOPMENT_MODE AIRGEDDON_DEBUG_MODE AIRGEDDON_WINDOWS_HANDLING
}
#Clean temporary files
@@ -9003,9 +9003,15 @@ function launch_fake_ap() {
kill "$(ps -C hostapd --no-headers -o pid | tr -d ' ')" &> /dev/null
fi
#TODO: create an option to be able to disable this
${airmon} check kill > /dev/null 2>&1
nm_processes_killed=1
if "${AIRGEDDON_FORCE_NETWORK_MANAGER_KILLING:-true}"; then
${airmon} check kill > /dev/null 2>&1
nm_processes_killed=1
else
if [ "${check_kill_needed}" -eq 1 ]; then
${airmon} check kill > /dev/null 2>&1
nm_processes_killed=1
fi
fi
if [ ${mac_spoofing_desired} -eq 1 ]; then
set_spoofed_mac "${interface}"
@@ -14688,19 +14694,20 @@ function env_vars_initialization() {
"AIRGEDDON_PRINT_HINTS" #6
"AIRGEDDON_5GHZ_ENABLED" #7
"AIRGEDDON_FORCE_IPTABLES" #8
"AIRGEDDON_MDK_VERSION" #9
"AIRGEDDON_PLUGINS_ENABLED" #10
"AIRGEDDON_DEVELOPMENT_MODE" #11
"AIRGEDDON_DEBUG_MODE" #12
"AIRGEDDON_WINDOWS_HANDLING" #13
"AIRGEDDON_FORCE_NETWORK_MANAGER_KILLING" #9
"AIRGEDDON_MDK_VERSION" #10
"AIRGEDDON_PLUGINS_ENABLED" #11
"AIRGEDDON_DEVELOPMENT_MODE" #12
"AIRGEDDON_DEBUG_MODE" #13
"AIRGEDDON_WINDOWS_HANDLING" #14
)
declare -gA nonboolean_options_env_vars
nonboolean_options_env_vars["${ordered_options_env_vars[9]},default_value"]="mdk4" #mdk_version
nonboolean_options_env_vars["${ordered_options_env_vars[13]},default_value"]="xterm" #windows_handling
nonboolean_options_env_vars["${ordered_options_env_vars[10]},default_value"]="mdk4" #mdk_version
nonboolean_options_env_vars["${ordered_options_env_vars[14]},default_value"]="xterm" #windows_handling
nonboolean_options_env_vars["${ordered_options_env_vars[9]},rcfile_text"]="#Available values: mdk3, mdk4 - Define which mdk version is going to be used - Default value ${nonboolean_options_env_vars[${ordered_options_env_vars[9]},'default_value']}"
nonboolean_options_env_vars["${ordered_options_env_vars[13]},rcfile_text"]="#Available values: xterm, tmux - Define the needed tool to be used for windows handling - Default value ${nonboolean_options_env_vars[${ordered_options_env_vars[13]},'default_value']}"
nonboolean_options_env_vars["${ordered_options_env_vars[10]},rcfile_text"]="#Available values: mdk3, mdk4 - Define which mdk version is going to be used - Default value ${nonboolean_options_env_vars[${ordered_options_env_vars[10]},'default_value']}"
nonboolean_options_env_vars["${ordered_options_env_vars[14]},rcfile_text"]="#Available values: xterm, tmux - Define the needed tool to be used for windows handling - Default value ${nonboolean_options_env_vars[${ordered_options_env_vars[14]},'default_value']}"
declare -gA boolean_options_env_vars
boolean_options_env_vars["${ordered_options_env_vars[0]},default_value"]="true" #auto_update
@@ -14712,9 +14719,10 @@ function env_vars_initialization() {
boolean_options_env_vars["${ordered_options_env_vars[6]},default_value"]="true" #print_hints
boolean_options_env_vars["${ordered_options_env_vars[7]},default_value"]="true" #5ghz_enabled
boolean_options_env_vars["${ordered_options_env_vars[8]},default_value"]="false" #force_iptables
boolean_options_env_vars["${ordered_options_env_vars[10]},default_value"]="true" #plugins_enabled
boolean_options_env_vars["${ordered_options_env_vars[11]},default_value"]="false" #development_mode
boolean_options_env_vars["${ordered_options_env_vars[12]},default_value"]="false" #debug_mode
boolean_options_env_vars["${ordered_options_env_vars[9]},default_value"]="true" #force_network_manager_killing
boolean_options_env_vars["${ordered_options_env_vars[11]},default_value"]="true" #plugins_enabled
boolean_options_env_vars["${ordered_options_env_vars[12]},default_value"]="false" #development_mode
boolean_options_env_vars["${ordered_options_env_vars[13]},default_value"]="false" #debug_mode
boolean_options_env_vars["${ordered_options_env_vars[0]},rcfile_text"]="#Enabled true / Disabled false - Auto update feature (it has no effect on development mode) - Default value ${boolean_options_env_vars[${ordered_options_env_vars[0]},'default_value']}"
boolean_options_env_vars["${ordered_options_env_vars[1]},rcfile_text"]="#Enabled true / Disabled false - Skip intro (it has no effect on development mode) - Default value ${boolean_options_env_vars[${ordered_options_env_vars[1]},'default_value']}"
@@ -14725,9 +14733,10 @@ function env_vars_initialization() {
boolean_options_env_vars["${ordered_options_env_vars[6]},rcfile_text"]="#Enabled true / Disabled false - Print help hints on menus - Default value ${boolean_options_env_vars[${ordered_options_env_vars[6]},'default_value']}"
boolean_options_env_vars["${ordered_options_env_vars[7]},rcfile_text"]="#Enabled true / Disabled false - Enable 5Ghz support (it has no effect if your cards are not 5Ghz compatible cards) - Default value ${boolean_options_env_vars[${ordered_options_env_vars[7]},'default_value']}"
boolean_options_env_vars["${ordered_options_env_vars[8]},rcfile_text"]="#Enabled true / Disabled false - Force to use iptables instead of nftables (it has no effect if nftables are not present) - Default value ${boolean_options_env_vars[${ordered_options_env_vars[8]},'default_value']}"
boolean_options_env_vars["${ordered_options_env_vars[10]},rcfile_text"]="#Enabled true / Disabled false - Enable plugins system - Default value ${boolean_options_env_vars[${ordered_options_env_vars[10]},'default_value']}"
boolean_options_env_vars["${ordered_options_env_vars[11]},rcfile_text"]="#Enabled true / Disabled false - Development mode for faster development skipping intro and all initial checks - Default value ${boolean_options_env_vars[${ordered_options_env_vars[11]},'default_value']}"
boolean_options_env_vars["${ordered_options_env_vars[12]},rcfile_text"]="#Enabled true / Disabled false - Debug mode for development printing debug information - Default value ${boolean_options_env_vars[${ordered_options_env_vars[12]},'default_value']}"
boolean_options_env_vars["${ordered_options_env_vars[9]},rcfile_text"]="#Enabled true / Disabled false - Force to kill Network Manager before launching Evil Twin attacks - Default value ${boolean_options_env_vars[${ordered_options_env_vars[9]},'default_value']}"
boolean_options_env_vars["${ordered_options_env_vars[11]},rcfile_text"]="#Enabled true / Disabled false - Enable plugins system - Default value ${boolean_options_env_vars[${ordered_options_env_vars[11]},'default_value']}"
boolean_options_env_vars["${ordered_options_env_vars[12]},rcfile_text"]="#Enabled true / Disabled false - Development mode for faster development skipping intro and all initial checks - Default value ${boolean_options_env_vars[${ordered_options_env_vars[12]},'default_value']}"
boolean_options_env_vars["${ordered_options_env_vars[13]},rcfile_text"]="#Enabled true / Disabled false - Debug mode for development printing debug information - Default value ${boolean_options_env_vars[${ordered_options_env_vars[13]},'default_value']}"
readarray -t ENV_VARS_ELEMENTS < <(printf %s\\n "${!nonboolean_options_env_vars[@]} ${!boolean_options_env_vars[@]}" | cut -d, -f1 | sort -u)
readarray -t ENV_BOOLEAN_VARS_ELEMENTS < <(printf %s\\n "${!boolean_options_env_vars[@]}" | cut -d, -f1 | sort -u)