From 40386dc1250ad8eb0982be5a33d9c2ad122da7a9 Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Sun, 19 Feb 2017 23:19:35 +0200 Subject: [PATCH] Revert "Removed SC2119 and SC2120 warnings" This reverts commit 66f1642506b2225fd3cac8e944180867e50b611b. --- airgeddon.sh | 400 +++++++++++++++++++++++++-------------------------- 1 file changed, 200 insertions(+), 200 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 87fcec6dd..b1101d475 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -2,7 +2,7 @@ #Title........: airgeddon.sh #Description..: This is a multi-use bash script for Linux systems to audit wireless networks. #Author.......: v1s1t0r -#Date.........: 20170219 +#Date.........: 20170218 #Version......: 6.01 #Usage........: bash airgeddon.sh #Bash Version.: 4.2 or later @@ -4069,7 +4069,7 @@ function generate_dynamic_line() { #Wrapper to check managed mode on an interface function check_to_set_managed() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" check_interface_mode case "${ifacemode}" in @@ -4092,7 +4092,7 @@ function check_to_set_managed() { #Wrapper to check monitor mode on an interface function check_to_set_monitor() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" check_interface_mode case "${ifacemode}" in @@ -4115,7 +4115,7 @@ function check_to_set_monitor() { #Check for monitor mode on an interface function check_monitor_enabled() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" mode=$(iwconfig "${interface}" 2> /dev/null | grep Mode: | awk '{print $4}' | cut -d ':' -f 2) @@ -4131,7 +4131,7 @@ function check_monitor_enabled() { #Check if an interface is a wifi card or not function check_interface_wifi() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" execute_iwconfig_fix return $? @@ -4140,7 +4140,7 @@ function check_interface_wifi() { #Execute the iwconfig fix to know if an interface is a wifi card or not function execute_iwconfig_fix() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" iwconfig_fix iwcmd="iwconfig ${interface} ${iwcmdfix} > /dev/null 2> /dev/null" @@ -4152,7 +4152,7 @@ function execute_iwconfig_fix() { #Create a list of interfaces associated to its macs function renew_ifaces_and_macs_list() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" readarray -t IFACES_AND_MACS < <(ip link | egrep "^[0-9]+" | cut -d ':' -f 2 | awk '{print $1}' | grep lo -v | grep "${interface}" -v) declare -gA ifaces_and_macs @@ -4172,7 +4172,7 @@ function renew_ifaces_and_macs_list() { #Check the interface coherence between interface names and macs function check_interface_coherence() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" renew_ifaces_and_macs_list interface_auto_change=0 @@ -4204,7 +4204,7 @@ function check_interface_coherence() { #Prepare the vars to be used on wps pin database attacks function set_wps_mac_parameters() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" six_wpsbssid_first_digits=${wps_bssid:0:8} six_wpsbssid_first_digits_clean=${six_wpsbssid_first_digits//:} @@ -4217,7 +4217,7 @@ function set_wps_mac_parameters() { #Calculate pin based on Zhao Chunsheng algorithm (computepin), step 1 function calculate_computepin_algorithm_step1() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" hex_to_dec=$(printf '%d\n' 0x"${six_wpsbssid_last_digits_clean}") 2> /dev/null computepin_pin=$((hex_to_dec % 10000000)) @@ -4226,7 +4226,7 @@ function calculate_computepin_algorithm_step1() { #Calculate pin based on Zhao Chunsheng algorithm (computepin), step 2 function calculate_computepin_algorithm_step2() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" computepin_pin=$(printf '%08d\n' $((10#${computepin_pin} * 10 + checksum_digit))) } @@ -4234,7 +4234,7 @@ function calculate_computepin_algorithm_step2() { #Calculate pin based on Stefan Viehböck algorithm (easybox) function calculate_easybox_algorithm() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" hex_to_dec=($(printf "%04d" "0x${four_wpsbssid_last_digits_clean}" | sed 's/.*\(....\)/\1/;s/./& /g')) [[ ${four_wpsbssid_last_digits_clean} =~ ${four_wpsbssid_last_digits_clean//?/(.)} ]] && hexi=($(printf '%s\n' "${BASH_REMATCH[*]:1}")) @@ -4279,7 +4279,7 @@ function pin_checksum_rule() { #Manage the calls to check common wps pin algorithms function check_and_set_common_algorithms() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 388 "blue" @@ -4305,7 +4305,7 @@ function check_and_set_common_algorithms() { #Integrate calculated pins from algorithms into pins array function integrate_algorithms_pins() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" some_calculated_pin_included=0 for pin in "${calculated_pins[@]}"; do @@ -4333,7 +4333,7 @@ function integrate_algorithms_pins() { #Include the code of the pin database file function include_pin_dbfile() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" dbfile_to_include="source \"${scriptfolder}${known_pins_dbfile}\"" eval "${dbfile_to_include}" @@ -4342,7 +4342,7 @@ function include_pin_dbfile() { #Search for target wps bssid mac in pin database and set the vars to be used function search_in_pin_database() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" bssid_found_in_db=0 counter_pins_found=0 @@ -4363,7 +4363,7 @@ function search_in_pin_database() { #Prepare monitor mode avoiding the use of airmon-ng or airmon-zc generating two interfaces from one function prepare_et_monitor() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" disable_rfkill @@ -4379,7 +4379,7 @@ function prepare_et_monitor() { #Assure the mode of the interface before the Evil Twin process function prepare_et_interface() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" et_initial_state=${ifacemode} @@ -4401,7 +4401,7 @@ function prepare_et_interface() { #Restore the state of the interfaces after Evil Twin process function restore_et_interface() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 299 "blue" @@ -4428,7 +4428,7 @@ function restore_et_interface() { #Unblock if possible the interface if blocked function disable_rfkill() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if hash rfkill 2> /dev/null; then rfkill unblock all > /dev/null 2>&1 @@ -4438,7 +4438,7 @@ function disable_rfkill() { #Put the interface on managed mode and manage the possible name change function managed_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" check_to_set_managed @@ -4472,7 +4472,7 @@ function managed_option() { #Put the interface on monitor mode and manage the possible name change function monitor_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" check_to_set_monitor @@ -4521,7 +4521,7 @@ function monitor_option() { #Check the interface mode function check_interface_mode() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" execute_iwconfig_fix if [ "$?" != "0" ]; then @@ -4552,7 +4552,7 @@ function check_interface_mode() { #Language change menu function language_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 87 "title" @@ -4693,7 +4693,7 @@ function set_chipset() { #Internet interface selection menu function select_internet_interface() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ "${return_to_et_main_menu}" -eq 1 ]; then return 1 @@ -4786,7 +4786,7 @@ function select_internet_interface() { #Interface selection menu function select_interface() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 88 "title" @@ -4933,7 +4933,7 @@ function ask_bssid() { #Read the user input on essid questions function read_essid() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 29 "green" @@ -4943,7 +4943,7 @@ function read_essid() { #Validate the input on essid questions function ask_essid() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -z "${essid}" ]; then while [[ -z "${essid}" ]]; do @@ -4962,7 +4962,7 @@ function ask_essid() { #Read the user input on custom pin questions function read_custom_pin() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 363 "green" @@ -4972,7 +4972,7 @@ function read_custom_pin() { #Validate the input on custom pin questions function ask_custom_pin() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" local regexp="^[0-9]{8}$" custom_pin="" @@ -5047,7 +5047,7 @@ function ask_wps_timeout() { #Execute wps custom pin bully attack function exec_wps_custom_pin_bully_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5065,7 +5065,7 @@ function exec_wps_custom_pin_bully_attack() { #Execute wps custom pin reaver attack function exec_wps_custom_pin_reaver_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5083,7 +5083,7 @@ function exec_wps_custom_pin_reaver_attack() { #Execute bully pixie dust attack function exec_bully_pixiewps_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5101,7 +5101,7 @@ function exec_bully_pixiewps_attack() { #Execute reaver pixie dust attack function exec_reaver_pixiewps_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5119,7 +5119,7 @@ function exec_reaver_pixiewps_attack() { #Execute wps bruteforce pin bully attack function exec_wps_bruteforce_pin_bully_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5137,7 +5137,7 @@ function exec_wps_bruteforce_pin_bully_attack() { #Execute wps bruteforce pin reaver attack function exec_wps_bruteforce_pin_reaver_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5155,7 +5155,7 @@ function exec_wps_bruteforce_pin_reaver_attack() { #Execute wps pin database bully attack function exec_wps_pin_database_bully_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" wps_pin_database_prerequisites @@ -5168,7 +5168,7 @@ function exec_wps_pin_database_bully_attack() { #Execute wps pin database reaver attack function exec_wps_pin_database_reaver_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" wps_pin_database_prerequisites @@ -5181,7 +5181,7 @@ function exec_wps_pin_database_reaver_attack() { #Execute mdk3 deauth DoS attack function exec_mdk3deauth() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 89 "title" @@ -5201,7 +5201,7 @@ function exec_mdk3deauth() { #Execute aireplay DoS attack function exec_aireplaydeauth() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 90 "title" @@ -5219,7 +5219,7 @@ function exec_aireplaydeauth() { #Execute WDS confusion DoS attack function exec_wdsconfusion() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 91 "title" @@ -5235,7 +5235,7 @@ function exec_wdsconfusion() { #Execute Beacon flood DoS attack function exec_beaconflood() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 92 "title" @@ -5251,7 +5251,7 @@ function exec_beaconflood() { #Execute Auth DoS attack function exec_authdos() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 93 "title" @@ -5267,7 +5267,7 @@ function exec_authdos() { #Execute Michael Shutdown DoS attack function exec_michaelshutdown() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 94 "title" @@ -5283,7 +5283,7 @@ function exec_michaelshutdown() { #Validate Mdk3 parameters function mdk3_deauth_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 95 "title" @@ -5305,7 +5305,7 @@ function mdk3_deauth_option() { #Validate Aireplay parameters function aireplay_deauth_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 96 "title" @@ -5327,7 +5327,7 @@ function aireplay_deauth_option() { #Validate WDS confusion parameters function wds_confusion_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 97 "title" @@ -5349,7 +5349,7 @@ function wds_confusion_option() { #Validate Beacon flood parameters function beacon_flood_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 98 "title" @@ -5371,7 +5371,7 @@ function beacon_flood_option() { #Validate Auth DoS parameters function auth_dos_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 99 "title" @@ -5392,7 +5392,7 @@ function auth_dos_option() { #Validate Michael Shutdown parameters function michael_shutdown_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 100 "title" @@ -5413,7 +5413,7 @@ function michael_shutdown_option() { #Validate wps parameters for custom pin, pixie dust, bruteforce and pin database attacks function wps_attacks_parameters() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" check_monitor_enabled if [ "$?" != "0" ]; then @@ -5445,7 +5445,7 @@ function wps_attacks_parameters() { #Print selected interface function print_iface_selected() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -z "${interface}" ]; then language_strings "${language}" 41 "red" @@ -5461,7 +5461,7 @@ function print_iface_selected() { #Print selected internet interface function print_iface_internet_selected() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [[ "${et_mode}" != "et_captive_portal" ]] || [[ ${captive_portal_mode} = "internet" ]]; then if [ -z "${internet_interface}" ]; then @@ -5475,7 +5475,7 @@ function print_iface_internet_selected() { #Print selected target parameters (bssid, channel, essid and type of encryption) function print_all_target_vars() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5498,7 +5498,7 @@ function print_all_target_vars() { #Print selected target parameters on evil twin menu (bssid, channel and essid) function print_all_target_vars_et() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5526,7 +5526,7 @@ function print_all_target_vars_et() { #Print selected target parameters on evil twin submenus (bssid, channel, essid, DoS type and Handshake file) function print_et_target_vars() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5574,7 +5574,7 @@ function print_et_target_vars() { #Print selected target parameters on wps attacks menu (bssid, channel and essid) function print_all_target_vars_wps() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${wps_bssid}" ]; then language_strings "${language}" 335 "blue" @@ -5608,7 +5608,7 @@ function print_all_target_vars_wps() { #Print selected target parameters on decrypt menu (bssid, Handshake file, dictionary file and rules file) function print_decrypt_vars() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5634,7 +5634,7 @@ function print_decrypt_vars() { #Create the dependencies arrays function initialize_menu_options_dependencies() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clean_handshake_dependencies=(${optional_tools_names[0]}) aircrack_attacks_dependencies=(${optional_tools_names[1]}) @@ -5656,7 +5656,7 @@ function initialize_menu_options_dependencies() { #Set possible changes for some commands that can be found in different ways depending of the O.S. function set_possible_aliases() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" for item in "${!possible_alias_names[@]}"; do if ! hash "${item}" 2> /dev/null || [[ "${item}" = "beef" ]]; then @@ -5674,7 +5674,7 @@ function set_possible_aliases() { #Initialize optional_tools values function initialize_optional_tools_values() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" declare -gA optional_tools=() @@ -5686,7 +5686,7 @@ function initialize_optional_tools_values() { #Set some vars depending of the menu and invoke the printing of target vars function initialize_menu_and_print_selections() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" forbidden_options=() @@ -5751,7 +5751,7 @@ function initialize_menu_and_print_selections() { #Clean temporary files function clean_tmpfiles() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" rm -rf "${tmpdir}bl.txt" > /dev/null 2>&1 rm -rf "${tmpdir}handshake"* > /dev/null 2>&1 @@ -5783,7 +5783,7 @@ function clean_tmpfiles() { #Manage cleaning firewall rules and restore orginal routing state function clean_routing_rules() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${original_routing_state}" ]; then echo "${original_routing_state}" > /proc/sys/net/ipv4/ip_forward @@ -5795,7 +5795,7 @@ function clean_routing_rules() { #Clean iptables rules function clean_iptables() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" iptables -F iptables -t nat -F @@ -5921,7 +5921,7 @@ function print_hint() { #airgeddon main menu function main_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 101 "title" @@ -5991,7 +5991,7 @@ function main_menu() { #Evil Twin attacks menu function evil_twin_attacks_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 253 "title" @@ -6118,7 +6118,7 @@ function evil_twin_attacks_menu() { #beef pre attack menu function beef_pre_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ ${return_to_et_main_menu_from_beef} -eq 1 ]; then return @@ -6193,7 +6193,7 @@ function beef_pre_menu() { #WPS attacks menu function wps_attacks_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 334 "title" @@ -6420,7 +6420,7 @@ function wps_attacks_menu() { #Offline decryption attacks menu function decrypt_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 170 "title" @@ -6501,7 +6501,7 @@ function decrypt_menu() { #Read the user input on rules file questions function ask_rules() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" validpath=1 while [[ "${validpath}" != "0" ]]; do @@ -6513,7 +6513,7 @@ function ask_rules() { #Read the user input on dictionary file questions function ask_dictionary() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" validpath=1 while [[ "${validpath}" != "0" ]]; do @@ -6525,7 +6525,7 @@ function ask_dictionary() { #Read the user input on Handshake file questions function ask_capture_file() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" validpath=1 while [[ "${validpath}" != "0" ]]; do @@ -6537,7 +6537,7 @@ function ask_capture_file() { #Manage the questions on Handshake file questions function manage_asking_for_captured_file() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${enteredpath}" ]; then echo @@ -6554,7 +6554,7 @@ function manage_asking_for_captured_file() { #Manage the questions on dictionary file questions function manage_asking_for_dictionary_file() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${DICTIONARY}" ]; then echo @@ -6571,7 +6571,7 @@ function manage_asking_for_dictionary_file() { #Manage the questions on rules file questions function manage_asking_for_rule_file() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${RULES}" ]; then echo @@ -6743,7 +6743,7 @@ function select_wpa_bssid_target_from_captured_file() { #Validate and ask for the different parameters used in an aircrack dictionary based attack function aircrack_dictionary_attack_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" manage_asking_for_captured_file @@ -6763,7 +6763,7 @@ function aircrack_dictionary_attack_option() { #Validate and ask for the different parameters used in an aircrack bruteforce based attack function aircrack_bruteforce_attack_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" manage_asking_for_captured_file @@ -6790,7 +6790,7 @@ function aircrack_bruteforce_attack_option() { #Validate and ask for the different parameters used in a hashcat dictionary based attack function hashcat_dictionary_attack_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" manage_asking_for_captured_file @@ -6811,7 +6811,7 @@ function hashcat_dictionary_attack_option() { #Validate and ask for the different parameters used in a hashcat bruteforce based attack function hashcat_bruteforce_attack_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" manage_asking_for_captured_file @@ -6839,7 +6839,7 @@ function hashcat_bruteforce_attack_option() { #Validate and ask for the different parameters used in a hashcat rule based attack function hashcat_rulebased_attack_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" manage_asking_for_captured_file @@ -6862,7 +6862,7 @@ function hashcat_rulebased_attack_option() { #Check if the password was decrypted using hashcat and manage to save it on a file function manage_hashcat_pot() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" local regexp="All hashes have been recovered" if [ -n "${hashcat_fix}" ]; then @@ -6900,7 +6900,7 @@ function manage_hashcat_pot() { #Check if the passwords were captured using ettercap and manage to save them on a file function manage_ettercap_log() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" ettercap_log=0 ask_yesno 302 @@ -6925,7 +6925,7 @@ function manage_ettercap_log() { #Check if the passwords were captured using bettercap and manage to save them on a file function manage_bettercap_log() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" bettercap_log=0 ask_yesno 302 @@ -6950,7 +6950,7 @@ function manage_bettercap_log() { #Check if the passwords were captured using the captive portal Evil Twin attack and manage to save them on a file function manage_captive_portal_log() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" default_et_captive_portal_logpath=$(env | grep ^HOME | awk -F = '{print $2}') lastcharetcaptiveportallogpath=${default_et_captive_portal_logpath: -1} @@ -6968,7 +6968,7 @@ function manage_captive_portal_log() { #Captive portal language menu function set_captive_portal_language() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 293 "title" @@ -7020,7 +7020,7 @@ function set_captive_portal_language() { #Read and validate the minlength var function set_minlength() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" minlength=0 while [[ ! ${minlength} =~ ^[8-9]$|^[1-5][0-9]$|^6[0-3]$ ]]; do @@ -7033,7 +7033,7 @@ function set_minlength() { #Read and validate the maxlength var function set_maxlength() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" maxlength=0 while [[ ! ${maxlength} =~ ^[8-9]$|^[1-5][0-9]$|^6[0-3]$ ]]; do @@ -7046,7 +7046,7 @@ function set_maxlength() { #Manage the minlength and maxlength vars on bruteforce attacks function set_minlength_and_maxlength() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" set_minlength maxlength=0 @@ -7185,7 +7185,7 @@ function set_show_charset() { #Execute aircrack+crunch bruteforce attack function exec_aircrack_bruteforce_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" crunch "${minlength}" "${maxlength}" "${charset}" | aircrack-ng -a 2 -b "${bssid}" -w - "${enteredpath}" language_strings "${language}" 115 "read" @@ -7194,7 +7194,7 @@ function exec_aircrack_bruteforce_attack() { #Execute aircrack dictionary attack function exec_aircrack_dictionary_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" aircrack-ng -a 2 -b "${bssid}" -w "${DICTIONARY}" "${enteredpath}" language_strings "${language}" 115 "read" @@ -7203,7 +7203,7 @@ function exec_aircrack_dictionary_attack() { #Execute hashcat dictionary attack function exec_hashcat_dictionary_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 0 \"${tmpdir}hctmp.hccap\" \"${DICTIONARY}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" @@ -7215,7 +7215,7 @@ function exec_hashcat_dictionary_attack() { #Execute hashcat bruteforce attack function exec_hashcat_bruteforce_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 3 \"${tmpdir}hctmp.hccap\" \"${charset}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" @@ -7227,7 +7227,7 @@ function exec_hashcat_bruteforce_attack() { #Execute hashcat rule based attack function exec_hashcat_rulebased_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 0 \"${tmpdir}hctmp.hccap\" \"${DICTIONARY}\" -r \"${RULES}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" @@ -7239,7 +7239,7 @@ function exec_hashcat_rulebased_attack() { #Execute Evil Twin only Access Point attack function exec_et_onlyap_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" set_hostapd_config launch_fake_ap @@ -7262,7 +7262,7 @@ function exec_et_onlyap_attack() { #Execute Evil Twin with sniffing attack function exec_et_sniffing_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" set_hostapd_config launch_fake_ap @@ -7289,7 +7289,7 @@ function exec_et_sniffing_attack() { #Execute Evil Twin with sniffing+sslstrip attack function exec_et_sniffing_sslstrip_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" set_hostapd_config launch_fake_ap @@ -7317,7 +7317,7 @@ function exec_et_sniffing_sslstrip_attack() { #Execute Evil Twin with sniffing+bettercap-sslstrip2/beef attack function exec_et_sniffing_sslstrip2_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" set_hostapd_config launch_fake_ap @@ -7355,7 +7355,7 @@ function exec_et_sniffing_sslstrip2_attack() { #Execute captive portal Evil Twin attack function exec_et_captive_portal_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" set_hostapd_config launch_fake_ap @@ -7385,7 +7385,7 @@ function exec_et_captive_portal_attack() { #Create configuration file for hostapd function set_hostapd_config() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" tmpfiles_toclean=1 rm -rf "${tmpdir}${hostapd_file}" > /dev/null 2>&1 @@ -7405,7 +7405,7 @@ function set_hostapd_config() { #Launch hostapd fake Access Point function launch_fake_ap() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" killall hostapd > /dev/null 2>&1 ${airmon} check kill > /dev/null 2>&1 @@ -7431,7 +7431,7 @@ function launch_fake_ap() { #Create configuration file for dhcpd function set_dhcp_config() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" route | grep ${ip_range} > /dev/null if [ "$?" != "0" ]; then @@ -7514,7 +7514,7 @@ function set_dhcp_config() { #Set routing state and firewall rules for Evil Twin attacks function set_std_internet_routing_rules() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" routing_toclean=1 original_routing_state=$(cat /proc/sys/net/ipv4/ip_forward) @@ -7560,7 +7560,7 @@ function set_std_internet_routing_rules() { #Launch dhcpd server function launch_dhcp_server() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" killall dhcpd > /dev/null 2>&1 @@ -7584,7 +7584,7 @@ function launch_dhcp_server() { #Execute DoS for Evil Twin attacks function exec_et_deauth() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" prepare_et_monitor @@ -7986,7 +7986,7 @@ function set_wps_attack_script() { #Create here-doc bash script used for control windows on Evil Twin attacks function set_control_script() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" rm -rf "${tmpdir}${control_file}" > /dev/null 2>&1 @@ -8209,7 +8209,7 @@ function set_control_script() { #Launch dnsspoof dns black hole for captive portal Evil Twin attack function launch_dns_blackhole() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" recalculate_windows_sizes xterm -hold -bg black -fg green -geometry "${g4_middleright_window}" -T "DNS" -e "${optional_tools_names[12]} -i ${interface}" > /dev/null 2>&1 & @@ -8219,7 +8219,7 @@ function launch_dns_blackhole() { #Launch control window for Evil Twin attacks function launch_control_window() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" recalculate_windows_sizes case ${et_mode} in @@ -8250,7 +8250,7 @@ function launch_control_window() { #Create configuration file for lighttpd function set_webserver_config() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" rm -rf "${tmpdir}${webserver_file}" > /dev/null 2>&1 @@ -8275,7 +8275,7 @@ function set_webserver_config() { #Create captive portal files. Cgi bash scripts, css and js file function set_captive_portal_page() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" rm -rf -R "${tmpdir}${webdir}" > /dev/null 2>&1 mkdir "${tmpdir}${webdir}" > /dev/null 2>&1 @@ -8481,7 +8481,7 @@ function set_captive_portal_page() { #Launch lighttpd webserver for captive portal Evil Twin attack function launch_webserver() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" killall lighttpd > /dev/null 2>&1 recalculate_windows_sizes @@ -8497,7 +8497,7 @@ function launch_webserver() { #Launch sslstrip for sslstrip sniffing Evil Twin attack function launch_sslstrip() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" rm -rf "${tmpdir}${sslstrip_file}" > /dev/null 2>&1 recalculate_windows_sizes @@ -8508,7 +8508,7 @@ function launch_sslstrip() { #Launch ettercap sniffer function launch_ettercap_sniffing() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" recalculate_windows_sizes case ${et_mode} in @@ -8531,7 +8531,7 @@ function launch_ettercap_sniffing() { #Create configuration file for beef function set_beef_config() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" tmpfiles_toclean=1 rm -rf "${tmpdir}${beef_file}" > /dev/null 2>&1 @@ -8610,7 +8610,7 @@ function set_beef_config() { #Kill beef process function kill_beef() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" killall "${optional_tools_names[19]}" > /dev/null 2>&1 if [ "$?" != "0" ]; then @@ -8626,7 +8626,7 @@ function kill_beef() { #Detects if your beef is Flexible Brainfuck interpreter instead of BeEF function detect_fake_beef() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" readarray -t BEEF_OUTPUT < <(timeout -s SIGTERM 0.5 beef -h 2> /dev/null) @@ -8641,7 +8641,7 @@ function detect_fake_beef() { #Search for beef path function search_for_beef() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ "${beef_found}" -eq 0 ]; then for item in "${possible_beef_known_locations[@]}"; do @@ -8657,7 +8657,7 @@ function search_for_beef() { #Prepare system to work with beef function prepare_beef_start() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" valid_possible_beef_path=0 if [[ ${beef_found} -eq 0 ]] && [[ ${optional_tools[${optional_tools_names[19]}]} -eq 0 ]]; then @@ -8701,7 +8701,7 @@ function prepare_beef_start() { #Set beef path manually function manual_beef_set() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" while [[ "${valid_possible_beef_path}" != "1" ]]; do echo @@ -8778,7 +8778,7 @@ function rewrite_script_with_custom_beef() { #Start beef process as a service function start_beef_service() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" service "${optional_tools_names[19]}" restart > /dev/null 2>&1 if [ "$?" != "0" ]; then @@ -8789,7 +8789,7 @@ function start_beef_service() { #Launch beef browser exploitation framework function launch_beef() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" kill_beef @@ -8812,7 +8812,7 @@ function launch_beef() { #Launch bettercap sniffer function launch_bettercap_sniffing() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" recalculate_windows_sizes sniffing_scr_window_position=${g4_bottomright_window} @@ -8834,7 +8834,7 @@ function launch_bettercap_sniffing() { #Parse ettercap log searching for captured passwords function parse_ettercap_log() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 304 "blue" @@ -8874,7 +8874,7 @@ function parse_ettercap_log() { #Parse bettercap log searching for captured passwords function parse_bettercap_log() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 304 "blue" @@ -8932,7 +8932,7 @@ function parse_bettercap_log() { #Write on a file the id of the captive portal Evil Twin attack processes function write_et_processes() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" for item in "${et_processes[@]}"; do echo "${item}" >> "${tmpdir}${webdir}${processesfile}" @@ -8942,7 +8942,7 @@ function write_et_processes() { #Kill the Evil Twin processes function kill_et_windows() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" for item in "${et_processes[@]}"; do kill "${item}" &> /dev/null @@ -8953,7 +8953,7 @@ function kill_et_windows() { #Convert capture file to hashcat format function convert_cap_to_hashcat_format() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" tmpfiles_toclean=1 rm -rf "${tmpdir}hctmp"* > /dev/null 2>&1 @@ -8963,7 +8963,7 @@ function convert_cap_to_hashcat_format() { #Handshake tools menu function handshake_tools_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 120 "title" @@ -9023,7 +9023,7 @@ function handshake_tools_menu() { #Execute the cleaning of a Handshake file function exec_clean_handshake_file() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo check_valid_file_to_clean "${filetoclean}" @@ -9039,7 +9039,7 @@ function exec_clean_handshake_file() { #Validate and ask for the parameters used to clean a Handshake file function clean_handshake_file_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo readpath=0 @@ -9070,7 +9070,7 @@ function clean_handshake_file_option() { #DoS attacks menu function dos_attacks_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 102 "title" @@ -9171,7 +9171,7 @@ function dos_attacks_menu() { #Capture Handshake on Evil Twin attack function capture_handshake_evil_twin() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [[ ${enc} != "WPA" ]] && [[ ${enc} != "WPA2" ]]; then echo @@ -9241,7 +9241,7 @@ function capture_handshake_evil_twin() { #Capture Handshake on Handshake tools function capture_handshake() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [[ -z ${bssid} ]] || [[ -z ${essid} ]] || [[ -z ${channel} ]] || [[ "${essid}" = "(Hidden Network)" ]]; then echo @@ -9561,7 +9561,7 @@ function attack_handshake_menu() { #Launch the Handshake capture window function capture_handshake_window() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" language_strings "${language}" 143 "blue" echo @@ -9579,7 +9579,7 @@ function capture_handshake_window() { #Manage target exploration and parse the output files function explore_for_targets_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 103 "title" @@ -9655,7 +9655,7 @@ function explore_for_targets_option() { #Manage target exploration only for Access Points with WPS activated. Parse output files and print menu with results function explore_for_wps_targets_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 103 "title" @@ -9833,7 +9833,7 @@ function explore_for_wps_targets_option() { #Create a menu to select target from the parsed data function select_target() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 104 "title" @@ -9923,7 +9923,7 @@ function select_target() { #Perform a test to determine if fcs parameter is needed on wash scanning function set_wash_parametrization() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" fcs="" declare -gA wash_ifaces_already_set @@ -9942,7 +9942,7 @@ function set_wash_parametrization() { #Manage and validate the prerequisites for wps pin database attacks function wps_pin_database_prerequisites() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" set_wps_mac_parameters include_pin_dbfile @@ -9969,7 +9969,7 @@ function wps_pin_database_prerequisites() { #Manage and validate the prerequisites for Evil Twin attacks function et_prerequisites() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ ${retry_handshake_capture} -eq 1 ]; then return @@ -10104,7 +10104,7 @@ function et_prerequisites() { #Manage the Handshake file requirement for captive portal Evil Twin attack function ask_et_handshake_file() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo readpath=0 @@ -10145,7 +10145,7 @@ function ask_et_handshake_file() { #DoS Evil Twin attacks menu function et_dos_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ ${return_to_et_main_menu} -eq 1 ]; then return @@ -10323,7 +10323,7 @@ function et_dos_menu() { #Selected internet interface detection function detect_internet_interface() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ ${internet_interface_selected} -eq 1 ]; then return 0 @@ -10351,7 +10351,7 @@ function detect_internet_interface() { #Show about and credits function credits_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 105 "title" @@ -10380,7 +10380,7 @@ function credits_option() { #Show message for invalid selected language function invalid_language_selected() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 82 "red" @@ -10393,7 +10393,7 @@ function invalid_language_selected() { #Show message for captive portal invalid selected language function invalid_captive_portal_language_selected() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" language_strings "${language}" 82 "red" echo @@ -10404,7 +10404,7 @@ function invalid_captive_portal_language_selected() { #Show message for forbidden selected option function forbidden_menu_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 220 "red" @@ -10414,7 +10414,7 @@ function forbidden_menu_option() { #Show message for invalid selected option function invalid_menu_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 76 "red" @@ -10424,7 +10424,7 @@ function invalid_menu_option() { #Show message for invalid selected interface function invalid_iface_selected() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 77 "red" @@ -10437,7 +10437,7 @@ function invalid_iface_selected() { #Show message for invalid selected internet interface function invalid_internet_iface_selected() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 77 "red" @@ -10484,7 +10484,7 @@ function capture_traps() { #Exit the script managing possible pending tasks function exit_script_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" action_on_exit_taken=0 echo @@ -10544,7 +10544,7 @@ function exit_script_option() { #Exit the script managing possible pending tasks but not showing anything function hardcore_exit() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" exit_code=2 if [ "${ifacemode}" = "Monitor" ]; then @@ -10573,7 +10573,7 @@ function hardcore_exit() { #Generate a small time loop printing some dots function time_loop() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo -ne " " for (( j=1; j<=4; j++ )); do @@ -10585,7 +10585,7 @@ function time_loop() { #Determine which version of airmon to use function airmon_fix() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" airmon="airmon-ng" @@ -10597,7 +10597,7 @@ function airmon_fix() { #Prepare the fix for iwconfig command depending of the wireless tools version function iwconfig_fix() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" iwversion=$(iwconfig --version | grep version | awk '{print $4}') iwcmdfix="" @@ -10609,7 +10609,7 @@ function iwconfig_fix() { #Set hashcat parameters based on version function set_hashcat_parameters() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" hashcat_fix="" hashcat_charset_fix_needed=0 @@ -10622,7 +10622,7 @@ function set_hashcat_parameters() { #Determine hashcat version function get_hashcat_version() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" hashcat_version=$(hashcat -V 2> /dev/null) hashcat_version=${hashcat_version#"v"} @@ -10631,7 +10631,7 @@ function get_hashcat_version() { #Determine bettercap version function get_bettercap_version() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" bettercap_version=$(bettercap -v 2> /dev/null | egrep "^bettercap [0-9]" | awk '{print $2}') } @@ -10639,7 +10639,7 @@ function get_bettercap_version() { #Determine bully version function get_bully_version() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" bully_version=$(bully -V 2> /dev/null) bully_version=${bully_version#"v"} @@ -10648,7 +10648,7 @@ function get_bully_version() { #Determine reaver version function get_reaver_version() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" reaver_version=$(reaver -h 2>&1 > /dev/null | egrep "^Reaver v[0-9]" | awk '{print $2}') if [ -z "${reaver_version}" ]; then @@ -10660,7 +10660,7 @@ function get_reaver_version() { #Set verbosity for bully based on version function set_bully_verbosity() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if compare_floats_greater_or_equal "${bully_version}" "${minimum_bully_verbosity4_version}"; then bully_verbosity="4" @@ -10672,7 +10672,7 @@ function set_bully_verbosity() { #Validate if bully version is able to perform integrated pixiewps attack function validate_bully_pixiewps_version() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if compare_floats_greater_or_equal "${bully_version}" "${minimum_bully_pixiewps_version}"; then return 0 @@ -10683,7 +10683,7 @@ function validate_bully_pixiewps_version() { #Validate if reaver version is able to perform integrated pixiewps attack function validate_reaver_pixiewps_version() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if compare_floats_greater_or_equal "${reaver_version}" "${minimum_reaver_pixiewps_version}"; then return 0 @@ -10694,7 +10694,7 @@ function validate_reaver_pixiewps_version() { #Set the script folder var if necessary function set_script_folder_and_name() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -z "${scriptfolder}" ]; then scriptfolder=${0} @@ -10712,7 +10712,7 @@ function set_script_folder_and_name() { #Check if pins database file exist and try to download the new one if proceed function check_pins_database_file() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -f "${scriptfolder}${known_pins_dbfile}" ]; then language_strings "${language}" 376 "yellow" @@ -10780,7 +10780,7 @@ function check_pins_database_file() { #Download the pins database file function download_pins_database_file() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" remote_pindb_file=$(timeout -s SIGTERM 15 curl -L ${urlscript_pins_dbfile} 2> /dev/null) @@ -10795,7 +10795,7 @@ function download_pins_database_file() { #Ask for try to download pin db file again and set the var to skip it function ask_for_pin_dbfile_download_retry() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" ask_yesno 380 if [ ${yesno} = "n" ]; then @@ -10814,7 +10814,7 @@ function get_local_pin_dbfile_checksum() { #Get the checksum for remote pin database file function get_remote_pin_dbfile_checksum() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" remote_pin_dbfile_checksum=$(timeout -s SIGTERM 15 curl -L ${urlscript_pins_dbfile_checksum} 2> /dev/null | head -n 1) @@ -10827,7 +10827,7 @@ function get_remote_pin_dbfile_checksum() { #Check for possible non Linux operating systems function non_linux_os_check() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" case "${OSTYPE}" in solaris*) @@ -10845,7 +10845,7 @@ function non_linux_os_check() { #First phase of Linux distro detection based on uname output function detect_distro_phase1() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" for i in "${known_compatible_distros[@]}"; do uname -a | grep "${i}" -i > /dev/null @@ -10859,7 +10859,7 @@ function detect_distro_phase1() { #Second phase of Linux distro detection based on architecture and version file function detect_distro_phase2() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ "${distro}" = "Unknown Linux" ]; then if [ -f ${osversionfile_dir}"centos-release" ]; then @@ -10906,7 +10906,7 @@ function detect_distro_phase2() { #Detect if arm architecture is present on system function detect_arm_architecture() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" distro_already_known=0 uname -m | grep -i "arm" > /dev/null @@ -10931,7 +10931,7 @@ function detect_arm_architecture() { #Set some useful vars based on Linux distro function special_distro_features() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" case ${distro} in "Wifislax") @@ -11052,7 +11052,7 @@ function special_distro_features() { #Determine if NetworkManager must be killed on your system. Only needed for previous versions of 1.0.12 function check_if_kill_needed() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" nm_min_main_version="1" nm_min_subversion="0" @@ -11089,7 +11089,7 @@ function check_if_kill_needed() { #Do some checks for some general configuration function general_checkings() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" compatible=0 distro="Unknown Linux" @@ -11121,7 +11121,7 @@ function general_checkings() { #Check if the user is root function check_root_permissions() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" user=$(whoami) @@ -11133,7 +11133,7 @@ function check_root_permissions() { #Print Linux known distros function print_known_distros() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" all_known_compatible_distros=("${known_compatible_distros[@]}" "${known_arm_compatible_distros[@]}") IFS=$'\n' @@ -11149,7 +11149,7 @@ function print_known_distros() { #Check if you have installed the tools (essential and optional) that the script uses function check_compatibility() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 108 "blue" @@ -11250,7 +11250,7 @@ function check_compatibility() { #Check for the minimum bash version requirement function check_bash_version() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo bashversion="${BASH_VERSINFO[0]}.${BASH_VERSINFO[1]}" @@ -11266,7 +11266,7 @@ function check_bash_version() { #Check if you have installed the tools required to update the script function check_update_tools() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ ${auto_update} -eq 1 ]; then if [ ${update_toolsok} -eq 1 ]; then @@ -11282,7 +11282,7 @@ function check_update_tools() { #Check if window size is enough for intro function check_window_size_for_intro() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" window_width=$(tput cols) window_height=$(tput lines) @@ -11305,7 +11305,7 @@ function check_window_size_for_intro() { #Print the script intro function print_intro() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo -e "${yellow_color} .__ .___ .___" sleep 0.15 && echo -e " _____ |__|______ ____ ____ __| _/__| _/____ ____" @@ -11364,7 +11364,7 @@ function flying_saucer() { #Print animated ascii art flying saucer function print_animated_flying_saucer() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo -e "\033[s" @@ -11382,7 +11382,7 @@ function print_animated_flying_saucer() { #Initialize script settings function initialize_script_settings() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" exit_code=0 check_kill_needed=0 @@ -11406,7 +11406,7 @@ function initialize_script_settings() { #Detect screen resolution if possible function detect_screen_resolution() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" resolution_detected=0 if hash xdpyinfo 2> /dev/null; then @@ -11427,7 +11427,7 @@ function detect_screen_resolution() { #Set windows sizes and positions function set_windows_sizes() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" set_xsizes set_ysizes @@ -11458,7 +11458,7 @@ function set_windows_sizes() { #Set sizes for x axis function set_xsizes() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" xtotal=$(awk -v n1="${resolution_x}" "BEGIN{print n1 / ${xratio}}") @@ -11479,7 +11479,7 @@ function set_xsizes() { #Set sizes for y axis function set_ysizes() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" ytotal=$(awk -v n1="${resolution_y}" "BEGIN{print n1 / ${yratio}}") ytotaltmp=$(printf "%.0f" "${ytotal}" 2> /dev/null) @@ -11499,7 +11499,7 @@ function set_ysizes() { #Set positions for y axis function set_ypositions() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" middle_position=$((resolution_y / 3 + ywindow_edge_pixels)) } @@ -11507,7 +11507,7 @@ function set_ypositions() { #Recalculate windows sizes and positions function recalculate_windows_sizes() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" detect_screen_resolution set_windows_sizes @@ -11516,7 +11516,7 @@ function recalculate_windows_sizes() { #Script starting point function welcome() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear current_menu="pre_main_menu" @@ -11587,7 +11587,7 @@ function welcome() { #Avoid the problem of using airmon-zc without ethtool or lspci installed function airmonzc_security_check() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ "${airmon}" = "airmon-zc" ]; then if ! hash ethtool 2> /dev/null; then @@ -11627,7 +11627,7 @@ function compare_floats_greater_or_equal() { #Update and relaunch the script function download_last_version() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" rewrite_script_with_custom_beef "search" timeout -s SIGTERM 15 curl -L ${urlscript_directlink} -s -o "${0}" @@ -11649,7 +11649,7 @@ function download_last_version() { #Validate if the selected internet interface has internet access function validate_et_internet_interface() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 287 "blue" @@ -11698,7 +11698,7 @@ function check_default_route() { #Update the script if your version is lower than the cloud version function autoupdate_check() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 210 "blue" @@ -11734,7 +11734,7 @@ function autoupdate_check() { #Check if you can launch captive portal Evil Twin attack function check_et_without_internet_compatibility() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if ! hash "${optional_tools_names[12]}" 2> /dev/null; then return 1 @@ -11745,7 +11745,7 @@ function check_et_without_internet_compatibility() { #Change script language automatically if OS language is supported by the script and different from current language function autodetect_language() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" [[ $(locale | grep LANG) =~ ^(.*)=\"?([a-zA-Z]+)_(.*)$ ]] && lang="${BASH_REMATCH[2]}" @@ -11761,7 +11761,7 @@ function autodetect_language() { #Clean some known and controlled warnings for shellcheck tool function remove_warnings() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo "${clean_handshake_dependencies[@]}" > /dev/null 2>&1 echo "${aircrack_attacks_dependencies[@]}" > /dev/null 2>&1 @@ -11784,7 +11784,7 @@ function remove_warnings() { #Print a simple separator function print_simple_separator() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo_blue "---------" } @@ -11792,7 +11792,7 @@ function print_simple_separator() { #Print a large separator function print_large_separator() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo_blue "-------------------------------------------------------" }